| // Create a section object to demonstrate shared memory. | |
| HANDLE Mapping = CreateFileMapping(INVALID_HANDLE_VALUE, NULL, PAGE_READWRITE, 0, 4096, L"memdemosec"); | |
| // Map the section into our process. | |
| PVOID Shared = MapViewOfFile(Mapping, FILE_MAP_ALL_ACCESS, 0, 0, 4096); | |
| // Use the memory to make sure it's resident. | |
| reinterpret_cast<PBYTE>(Shared)[0] = 0xFF; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment