Static member variable in template, with multiple dlls

后端 未结 7 948
不思量自难忘°
不思量自难忘° 2020-12-15 19:44

My code is built to multiple .dll files, and I have a template class that has a static member variable.

I want the same instance of this static member variable to be

7条回答
  •  半阙折子戏
    2020-12-15 20:18

    You already try this usage :

    #pragma data_seg(".JOE")
    HWND hWndServer = NULL;
    HHOOK hook = NULL;
    #pragma data_seg()
    #pragma comment(linker, "/section:.JOE,rws")  
    

    Note that variable need beam initialized.

    More info : http://msdn.microsoft.com/en-us/library/ms997537.aspx http://www.flounder.com/hooks.htm

    Good luck.

提交回复
热议问题