Share memory between two .net application

  • Thread starter Thread starter Gjoshi029
  • Start date Start date
G

Gjoshi029

How can i share a common memory between two .net programs.
Can it be possible.

Kindly help me.

Thanks
 
Gjoshi029 said:
How can i share a common memory between two .net programs.
Can it be possible.

You can map to a shared memory section using Win32 API
and copy to and from it using the Marshal class.

Arne
 
Peter said:
You can't actually share the "memory" because two .NET applications would
each be runnning in a separate AppDomain. However, you can use techniques
such as Memory Mapped Files or Named Pipes to "share" communication or data
between processes.

It should be noted that CreateFileMapping and MapViewOfFile does
not require a separate file (by using -1 as file handle it gets
mapped to the pagefile).

Arne
 
Back
Top