模块定义文件格式以及memory share segments

c++看dynamic linking的 module define format:

1 LIBRARY GlobalHookDll   //dll名称
2 EXPORTS
3 SetHook        @3
4 SEGMENTS               //共享memory段
5 .MySec    READ WRITE SHARED  


 等价于下面:

 

//use share memory
#pragma data_seg(".MySec")  //the name of setion's length must less than 8
HWND g_hWnd 
= NULL;
#pragma data_seg()

/*#pragma comment(linker,"/section:.MySec,RWS")*/


posted @ 2010-12-04 21:41  Repository  阅读(252)  评论(0编辑  收藏  举报