How can I exchange data between two managed processes using shared memory partitions? I use "object"C ++ / CLI code internally to share data with another piece of memory in another process. I am using the following code segment.
#define BUFFER_SIZE 32768
#pragma data_seg (".SHAREDMEMORY")
bool _Locked = false;
bool _Initialized = false;
unsigned char[10000] data = NULL;
#pragma data_seg()
#pragma comment(linker,"/SECTION:.SHAREDMEMORY,RWS")
but I need it:
#pragma data_seg (".SHAREDMEMORY")
bool _Locked = false;
bool _Initialized = false;
object^ _object = nullptr;
#pragma data_seg()
#pragma comment(linker,"/SECTION:.SHAREDMEMORY,RWS")
He says that "global or static variable may not have managed type System::Int32^"he gives other errors, such as "missing ; before '^'".
I need to copy the data of a .NET object "Control"into this shared segment, and I need to transfer it to another process.
Usman source
share