How can we exchange data using shared memory with an “Object” between two managed processes?

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.

+1
source share
3

.NET .

, . , , ( , , 32- ).

++, v-, . .NET , . , .

, ? , , , . ?

. .NET , . ( ++- , . ). ++/CLI, , .NET.

+3

, , , , , , .

.Net-, Windows Forms WPF, API- Windows Microsoft , .

API- , , Microsoft , API- , . , ,

APIs Microsoft Microsoft UI Automation Framework, . API- Windows API- Windows, .

MSDN Magazine .

+5

IPC, .

+1

All Articles