none
#pragma data_seg(".SHARED") char * RRS feed

  • Question

  • How can u share allocated memory with multiple instance of the DLL???

    For example,

    #pragma data_seg(".SHARED")
    bool g_bIsDeviceInUse = false;
    unsigned char *pucBuffer = NULL;
    #pragma data_seg()
    #pragma comment(linker, "/section:.SHARED,RWS")

    I can see that g_bIsDeviceInUse is showing the right value even if checked with this instance or another instance of DLL, but not for pucBuffer. If once instance allocated the memory and set pucBuffer to a value (e.g., "Summer"), but another instance will not show a value for pucBuffer, even though both instance shows the same memory location for pucBuffer.

    Wednesday, March 18, 2020 6:36 PM

Answers

All replies