如何操作dll中的全局变量呢
v鼠来宝v 2004-06-25 11:41:48 我使用vc6中的win32动态连接库向导建立的程序中,有全局变量 nWin32test
使用隐式连接可以容易的操作
现在我想问一下,如果使用显式连接如何操作全局变量 nWin32test呢
另外
#ifdef WIN32TEST_EXPORTS
#define WIN32TEST_API __declspec(dllexport)
#else
#define WIN32TEST_API __declspec(dllimport)
#endif
// This class is exported from the win32test.dll
class WIN32TEST_API CWin32test {
public:
CWin32test(void);
// TODO: add your methods here.
};
extern WIN32TEST_API int nWin32test;
WIN32TEST_API int fnWin32test(void);
//---------------------------------------------
能否告诉我,在编译DLL过程中,WIN32TEST_API使用的是预定义的#define WIN32TEST_API __declspec(dllexport)吗,可是我没看到有WIN32TEST_EXPORTS的定义