#pragma data_seg(".SHARED")
char buffer[80] = { 0 };
#pragma data_seg()
#pragma comment(linker, "/section:.SHARED,rws")
And this will appear to work just fine but not actually be shared :
#pragma data_seg(".SHARED")
char buffer[80];
#pragma data_seg()
#pragma comment(linker, "/section:.SHARED,rws")
One thing I'm actually not sure about is whether you can put C++ classes with constructors in the DLL shared data space and have that work right (eg. be shared, and just be constructed/destructed once when the last DLL instance dies).
No comments:
Post a Comment