Go4Expert (http://www.go4expert.com/)
-   C++ (http://www.go4expert.com/forums/cpp/)
-   -   Shared memory in VC++ (http://www.go4expert.com/forums/shared-memory-vcpp-t21935/)

123music 28Apr2010 18:17

Shared memory in VC++

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..

All times are GMT +5.5. The time now is 22:34.