Guest User

Untitled

a guest
Jan 20th, 2019
65
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.40 KB | None | 0 0
  1. hFile = CreateFile("file", 0x80000000, 3, NULL, 3, 0x80, NULL);
  2. hMap = CreateFileMapping(hFile, NULL, 2, sizeHigh, sizeLow, NULL);
  3. ptr = MapViewOfFile(hMap, 4, 0, 0, size);
  4. CloseHandle(hMap);
  5. CloseHandle(hFile);
  6.  
  7. /* At this point the handles are closed so programs that try
  8. to get share exclusive on the file succeed but I still have
  9. a pointer for reading the memory myself */
  10.  
  11. UnmapViewOfFile(ptr);
Add Comment
Please, Sign In to add comment