__declspec(dllimport)
-
To be true, I have never used
dllimport
in my code while using a module. What's the actual use of it? No matter we use it or not, we are able to access the exported symbol right?---------------------------- 286? WOWW!:-O
-
Hi 8086, Raymond Chen wrote a series about imports and exports[^] and its implementation history. Its an excellent read and I think you will enjoy it. Best Wishes, -David Delaune
-
Hi 8086, Raymond Chen wrote a series about imports and exports[^] and its implementation history. Its an excellent read and I think you will enjoy it. Best Wishes, -David Delaune
Hi Randor, Just found this in MSDN : Using __declspec(dllimport) is optional on function declarations, but the compiler produces more efficient code if you use this keyword. However, you must use __declspec(dllimport) for the importing executable to access the DLL's public data symbols and objects. Note that the users of your DLL still need to link with an import library. Thanks for your reply.
---------------------------- 286? WOWW!:-O
-
Hi Randor, Just found this in MSDN : Using __declspec(dllimport) is optional on function declarations, but the compiler produces more efficient code if you use this keyword. However, you must use __declspec(dllimport) for the importing executable to access the DLL's public data symbols and objects. Note that the users of your DLL still need to link with an import library. Thanks for your reply.
---------------------------- 286? WOWW!:-O
Thats a fair but short description of dllimport. I apologize for sending you off to do your own research. Its just that sometimes I feel like I am answering the same questions over and over. Here is a thread from 2008 where dllimport was discussed. You can be surprised with what a well-formed codeproject search will find. http://www.codeproject.com/Messages/2431922/Re-import-library.aspx[^] Best Wishes, -David Delaune