You may try CreateFileMapping.
The CreateFileMapping function returns a handle to the file mapping object. This handle will be used when creating a file view so that you can access the shared memory. When you call CreateFileMapping, you specify an object name, the number of bytes to be mapped from the file, and the read/write permission for the mapped memory. The first process that calls CreateFileMapping creates the file mapping object.
For more details refer this link
Remember:To ensure that other processes cannot write to the portion of the file that is mapped, you should open the file with exclusive access.