宿主程序中使用dll共享段中的变量

dll:

#pragma data_seg("Shared")

LRESULT __declspec(dllexport) s_shardObj  = 0;

#pragma data_seg()


#pragma comment(linker, "/section:Shared,rws")


宿主程序:

LRESULT __declspec(dllimport) s_shardObj;

你可能感兴趣的:(dll,linker)