Shared Memory (Section) wrapper using C++/CLI

Monday, May 5, 2008

C++/CLI allows relatively easy wrapping of unmanaged elements into usable types from the managed world. In the unmanaged world, I've been using for years the notion of shared memory - the ability to share block of memory between OS processes in an easy way. I've not seen this exact functionality anywhere in the .NET framework, so I decided to implement a simple mechanism around the file mapping concept (as it's referred in the SDK docs); and besides, it's a nice enough thing to try with C++/CLI.The native functions in question are CreateFileMapping, MapViewOfFile and friends. Quite easy to use...