This topic has not yet been rated - Rate this topic

Linking Implicitly

To implicitly link to a DLL, executables must obtain the following from the provider of the DLL:

  • A header file (.h file) containing the declarations of the exported functions and/or C++ classes. The classes, functions, and data should all have __declspec(dllimport), for more information, see dllexport, dllimport.

  • An import library (.LIB files) to link with. (The linker creates the import library when the DLL is built.)

  • The actual DLL (.dll file).

Executables using the DLL must include the header file containing the exported functions (or C++ classes) in each source file that contains calls to the exported functions. From a coding perspective, the function calls to the exported functions are just like any other function call.

To build the calling executable file, you must link with the import library. If you are using an external makefile, specify the file name of the import library where you list other object (.obj) files or libraries that you are linking with.

The operating system must be able to locate the DLL file when it loads the calling executable.

Did you find this helpful?
(1500 characters remaining)
Community Content Add
Annotations FAQ
To Microsoft Community:
First of all i would like to thank those of you who took the time to read this email. And would like to merely ask one question. Is there anywhere microsoft has someone that can reply to some immediate, but legitimate questions in working with Windows 7 - 64bit 2008 SP-1 platform software. I seem to in limbo. I maybe cought in between to different services. Please send me some info. or some helpful solutions. Thank you very much. Sincerely David Medrano.
Advertisement