First, the Windows-specific syntax, __declspec (dllexport), is needed to export any functions, variables, or classes from a DLL.
第一点,要从一个dll中导出任何函数、变量、或者类,都需要使用Windows特定的语法__declspec (dllexport)。
By simply applying the _declspec (dllexport) modifier to all the functions in the CDB class, we make the class exportable in a DLL.
通过简单地应用_ declspec (dllexport)到CD B类里的所有函数,我们让这个类导出到dll里了。
DEF, and export DllGetClassObject. (You cannot use _declspec(dllexport) because the function is already declared in ole2. h with different modifiers.
且导出DllGetClassObject。 (你不能使用_declspec(dllexport)因为这个函数已经在ole2.h里以不同的修饰进行了声明)。
应用推荐