1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Shared memory in VC++

Discussion in 'C++' started by 123music, Apr 28, 2010.

  1. 123music

    123music New Member

    Joined:
    Apr 28, 2010
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    0
    Hi,

    I am trying to share memory between two VC++ projects.

    I created a shared segment as

    #pragma data_seg(".SHARED")
    unsigned char buffer[5] = {0};
    unsigned char offset[5] = {0};

    #pragma data_seg()

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

    In one project i am writing data into the buffer and offset arrays and from another project i am trying to read from these arrays.

    But it is not working..

    Pl help..
     

Share This Page