Using File Mapping

The following code samples illustrate how two processes might access an existing file as named shared memory.

·Creating named shared memory

·Reading and writing

·Cleaning up

As discussed earlier in this overview, the processes must synchronize their access to the memory. For more information, see Synchronization.