Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- hFile = CreateFile("file", 0x80000000, 3, NULL, 3, 0x80, NULL);
- hMap = CreateFileMapping(hFile, NULL, 2, sizeHigh, sizeLow, NULL);
- ptr = MapViewOfFile(hMap, 4, 0, 0, size);
- CloseHandle(hMap);
- CloseHandle(hFile);
- /* At this point the handles are closed so programs that try
- to get share exclusive on the file succeed but I still have
- a pointer for reading the memory myself */
- UnmapViewOfFile(ptr);
Add Comment
Please, Sign In to add comment