ordinal_number functions can also be imported by number. This is the entry number in decimal, starting at 1, in the EXPORTing module's export table to link to. local_name must be specified when using ordinals, otherwise there is no symbolic reference to internally resolve.

In the DLL calling code, local_name and function_name need to be declared as external.

NAME module_name

module_name is a symbol by which the module should be identified when resolving IMPORT records in a calling program.

IMPORTed module names can contain a partial path. For example, DLL\spelling_checker would instruct the loader to look in <execution path>\DLL for a module with a name of spelling_checker.

NOTES:

You must take the responsibility to make sure that the IMPORTed function or module calling conventions match the calling code. For example, the loader will load a 16-bit module to resolve an IMPORT in a 32-bit program without complaint. In this case, if the IMPORTing program does a 16-bit far call, then everything will work correctly, but a 32-bit call will fail unless the 16-bit DLL module ends with a 32-bit RET instruction.

Importing by function name may slow your performance if the symbols are frequently referenced. In such cases, consider using the ordinal command to speed up the access times because module name references are automatically converted to ordinals in an internal list which will only be processed once at load time.

Next Page

Previous Page

Go to Table of Contents

Go back to Devore Software & Consulting home page