-
-
Save mvankuipers/36bec0aef16fbbeb141596beb6484c89 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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