The call to CreateFileMapping() creates a named shared-memory object called SharedObject.
The consumer process will communicate using this shared-memory segment by creating a mapping to the same named object.
The producer then creates a view of the memory-mapped file in its virtual address space.
By passing the last three parameters the value 0, it indicates that the mapped view is the entire file.
It could instead have passed values specifying an offset and size, thus creating a view containing only a subsection of the file.
(It is important to note that the entire mapping may not be loaded into memory when the mapping is established. Rather, the mapped file may be demand-paged, thus bringing pages into memory only as they are accessed.)
The MapViewOfFile() function returns a pointer to the shared-memory object; any accesses to this memory location are thus accesses to the memory-mapped