Const INVALID_HANDLE_VALUE
= -1 Const PAGE_READWRITE
= &H04 Const FILE_MAP_ALL_ACCESS
= &HF001F hMapFile = CreateFileMapping(INVALID_HANDLE_VALUE, 0, PAGE_READWRITE, 0, sharedSize, sharedName)
CommonShared = 0
pBuf = MapViewOfFile(hMapFile, FILE_MAP_ALL_ACCESS, 0, 0, sharedSize)
CloseHandle hMapFile
CommonShared = 0
CopyMemory pBuf, pShared.OFFSET, sharedSize
CommonShared = -1
EndShare hMapFile, pBuf
Const FILE_MAP_ALL_ACCESS
= &HF001F hMapFile = OpenFileMapping(FILE_MAP_ALL_ACCESS, 0, sharedName)
ReadShared = 0
pBuf = MapViewOfFile(hMapFile, FILE_MAP_ALL_ACCESS, 0, 0, sharedSize)
ReadShared = 0
destVar
= _Mem(pBuf
, sharedSize
) ReadShared = -1
EndShare hMapFile, pBuf
UnmapViewOfFile hMap
CloseHandle pMapBuf