Click here to Skip to main content
15,911,035 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hello,
I have C++ application and C#(WPF) application.
I would like to open a shared memory region between them, so both of them can Read/Write from/to this region. Of course i have to syncronize the memory access some how.

Is it possible?
Posted
Updated 27-Jun-13 3:07am
v2
Comments
pasztorpisti 27-Jun-13 10:33am    
Dealing with shared memory is quite dangerous and error prone - its like multithreaded programming, just a bit more difficult. Whenever possible I always consider using a streamed IPC communication method instead of shared memory (for example sockets). Sockets are my favorite because its so easy to use to interconnect different kind of systems/languages with it (not to mention that its quite easy to run the two processes on separate machines!). Of course depending on your problem to solve sockets may not be a viable option but really consider using simpler IPC than shared memory whenever possible.
[no name] 27-Jun-13 21:19pm    
Excellent advice.

This looks promising: "Sharing Files and Memory"[^] at MSDN.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900