OWLNext    7.0
Borland's Object Windows Library for the modern age
Loading...
Searching...
No Matches
Importing (calling) DLL Functions

You call a DLL function from an application just as you would call a function defined in the application itself.

However, you must import the DLL functions that your application calls.

To import a DLL function,

  • Add an IMPORTS section to the calling application's module definition (.DEF) file and list the DLL function as an import.
  • Link an import library that contains import information for the DLL function to the calling application. (Use IMPLIB to make the import library.)
  • Explicitly load the DLL using LoadLibrary and obtain function addresses using GetProcAddress.

When your application executes, the files for the called DLLs must be in one of the following locations, or your application will not be able to find the DLL files and will not load:

  • In the current directory
  • On the path
  • In the Windows or Windows system directory

See Also