Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>If I correctly understand your requirements you need to communicate between processes <em>running on the same computer</em>. The processes probably run all in the same security context of the user which is logged on interactively.</p> <p>In the case I should mention that there are different aspects of the solution. One problem is just <em>to share</em> the data between the applications. Another problem is the protocol which defines how the common data could be accessed and modified and how the <em>communication</em> between the processes take place. You can have for example one process which <em>provide</em> the data and all another <em>subscribe</em> the data. Another case: you can have common data which can be read or modified by all the applications and you need just be sure that nobody modify the shared data on the same time or nobody access the data during another modify it. Of cause it could be many other different communication scenarios.</p> <p>Under the aspect I would suggest you two other options which you don't included in your question:</p> <ul> <li><strong>usage memory mapped files</strong> (see <a href="http://msdn.microsoft.com/en-us/library/ms810613.aspx" rel="nofollow">here</a> and <a href="http://msdn.microsoft.com/en-us/library/dd997372.aspx" rel="nofollow">here</a>)</li> <li><strong>usage of COM interface</strong></li> </ul> <p>Both ways can be good implemented in both .NET and unmanaged C++. The usage of memory mapped files is the best way from the performance point of view. If you create View which will be not associated with some physical file you will have just common memory which can be used between processes. You can use additionally an Mutex or Event to control that the memory will be not used at the same time by multiple applications.</p> <p>In the most simple scenario you can even use <a href="http://msdn.microsoft.com/en-us/library/thfhx4st%28v=vs.90%29.aspx" rel="nofollow">#pragma data_seg</a> in C++ to place some data in the named section of DLL and use <a href="http://msdn.microsoft.com/en-us/library/sf9b18xk%28v=vs.90%29.aspx" rel="nofollow">/SECTION</a> option (like <code>/SECTION:.MYSEC,RWS</code>) to make the data <em>shared</em>. You can use the DLL in all your .NET applications and in all unmanaged C++ application to access the common data. In the way you will have simple way to access to the common data.</p> <p>If you need to have some more complex <em>communication scenario</em> the approach with COM interface in C++/.NET could be the best choice. In case of I would recommend you <a href="http://www.codeproject.com/Articles/12579/Building-COM-Servers-in-NET" rel="nofollow">the article</a> which describes step by step how to implement Primary Interop Assembly with the COM interface only in .NET and uses it in both .NET and C++ COM for the communication.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload