Advertisement

DLLEXPORT/DLLIMPORT

Started by December 29, 2000 02:11 PM
0 comments, last by mrfujiak 24 years ago
Hi, I was wondering if someone could give me a quick explanation of these two commands... (__declspec(dllimport);__declspec(dllexport)??). Using these means you dont have to use .def files? when you use these are the dll''s linked with .lib files? any help would be great, thx in advance -mrfujiak
-mrfujiak
No!

VC needs to know whethere a dll declaration is for creating a funtcions in a dll or for loading function from a dll. That''s the difference between export & import.

If you use the wizard to set up a .dll project, it''ll make the macro & set the compiler directive to export mode. By default its in import mode. Sooo all you have to do is include the same .h file used to create the .dll and you can load the function from the .dll without creating additional seperate function declarations.


You could create a .lib instead of a .dll, but then it''s set at compile time, not run time like a .dll.
- The trade-off between price and quality does not exist in Japan. Rather, the idea that high quality brings on cost reduction is widely accepted.-- Tajima & Matsubara

This topic is closed to new replies.

Advertisement