How can i share a common memory between two .net programs.
Can it be possible.
Kindly help me.
Thanks
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.
-- Peter
Site: http://www.eggheadcafe.com
UnBlog: http://petesbloggerama.blogspot.com
Short Urls & more: http://ittyurl.net
> How can i share a common memory between two .net programs.
> Can it be possible.
>
> Kindly help me.
>
> Thanks
Arne Vajhøj - 29 Mar 2008 18:58 GMT
> 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
> 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