|
||
In conventional systems, DLLs may export by name or by ordinal. Symbian OS only supports exporting by ordinal. Exporting by ordinal reduces the time taken to find the item in the DLL export table and also reduces the size of the DLL as names need not be stored. Ordinals are used for accessing the address of a function in the DLL export table.
The only item which should be exported from a polymorphic interface DLL is a function which returns an instance of the object supplied by the DLL; this should be exported at ordinal 1.
Once a user program has created an instance of the object supplied by the DLL, other DLL functions may be accessed using the virtual function table; such functions do not need to be exported.
A module definition file (.def
) is a text file which lists the exported functions of a DLL; it is used in an ordinal build to insert ordinal information into the DLL export table.
It is only necessary to create this file for a polymorphic interface DLL; static interface DLLs use an import library to obtain relevant information about exported functions.