myShared is an arbitrary name. It must not collide with names .bss etc (see /SECTION in MSDN).
RWS indicates Read/Write/Shared. (See /SECTION in MSDN)
Avoid sharing process-specific info such as pointers, HANDLEs etc.
Won't work with Vista Services.
- #pragma data_seg(".myShared")
- #pragma comment(linker, "/SECTION:.myShared,RWS")
- int shared = 1; // goes in .myShared. Must be initialized.
- #pragma data_seg() // revert to default
You need to login to post a comment.