Sharing Data with File Mapping

File mapping is the copying of a file's contents to a process's virtual address space. When a file is mapped, the copy of the file's contents is called the file view, and the internal structure used to maintain the copy is called the file-mapping object. To share data, another process can create an identical file view in its own virtual address space by using the first process's file-mapping object to create the view.

A common example of processes sharing data is dynamic data exchange (DDE). In Windows 3.x, applications would allocate global memory with the GMEM_DDESHARE flag and use the memory handle. In Windows 98 and Windows 2000, applications should use file mapping. It is not necessary to actually have a file ...

Get Microsoft Windows 2000 API SuperBible now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.