Program Development using Unix Win32 API

Contents

Virtual memory operations
Shared libraries
Memory mapped files
Shared memory
">

Virtual memory operations

The Win32 API has a set of operations to manipulate virtual memory. These include
VirtualAlloc()
VirtualFree()
VirtualLock()  // doesn't work on Windows95
VirtualProtect()
VirtualQuery()
VirtualUnlock()

Shared libraries

There is support for DLLs. Special Makefiles, header files and dependency files need to be created. The standard memory allocation functions do not work properly in DLLs and have to be replaced by GlobalAlloc() and GlobalFree().

Memory mapped files

Files can be mapped into memory by
CreateFileMapping()
MapViewOfFile()
UnmapViewOfFile()

Shared memory

Shared memory between processes is done by mapping a common file into each address space. A special file ``value'' can be used when no actual file needs to be used for this i.e. for transient sharing.

Jan Newmarch (http://jan.newmarch.name)
jan@newmarch.name
Last modified: Sun Nov 16 23:13:02 EST 1997
Copyright ©Jan Newmarch