鏀惰棌 (0) +1 璧� (0) +1 韪� (0) +1
鏀惰棌鎴愬姛鏌ョ湅鏀惰棌>>

正在阅读:VC学习:全局共享变量的困惑VC学习:全局共享变量的困惑

2004-02-14 09:34 出处:CSDN 作者:ggg82 责任编辑:linjixiong

  }
  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];

察看评论详细内容 我要发表评论
作者笔名简短内容 发表时间
:

键盘也能翻页,试试“← →”键

相关文章

关注我们

最新资讯离线随时看 聊天吐槽赢奖品
鎵嬫満璁块棶鍥炲埌椤堕儴