} int APIENTRY WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow) { DialogBox(hInstance,ID_DLG,NULL,MainProc); return 0; } /////////////////////////////////////// //dll.c #include #include //定义全局共享变量 #pragma data_seg(".Shared") static int haveinit=0;//初始化 static int noinit; //未初始化 #pragma data_seg() #pragma comment(linker, "/section:.Shared,rws") __declspec(dllexport) LRESULT CALLBACK TestProc(int code, WPARAM wParam, LPARAM lParam) { if (code >= 0) { CWPSTRUCT *msg = (CWPSTRUCT *) lParam; if (msg->message==WM_NULL) { char Text[50];
|
鏀惰棌鎴愬姛鏌ョ湅鏀惰棌>>
正在阅读:VC学习:全局共享变量的困惑VC学习:全局共享变量的困惑
2004-02-14 09:34
出处:CSDN
责任编辑:linjixiong
键盘也能翻页,试试“← →”键