Public Member Functions | |
MemoryLocker (void *pData, ULONG size) | |
Locks read-only pages in memory and creates an additional read-write mapping. | |
~MemoryLocker () | |
Destroys the additional read-write mapping. | |
void * | GetPointer () |
Returns a write-enabled pointer to a read-only memory block. | |
Private Attributes | |
PMDL | m_pMdl |
PVOID | m_pPointer |
This class allows modifying read-only kernel memory. On x86 targets, all kernel memory is always writable by kernel-mode code, however, on x64 targets, some memory (such as code segments) is marked as read-only. This class allows retreiving a write-enabled pointer to a read-only memory block.
FunctionPatch::FunctionPatch::MemoryLocker::MemoryLocker | ( | void * | pData, | |
ULONG | size | |||
) | [inline] |
Locks read-only pages in memory and creates an additional read-write mapping.
FunctionPatch::FunctionPatch::MemoryLocker::~MemoryLocker | ( | ) | [inline] |
Destroys the additional read-write mapping.
void* FunctionPatch::FunctionPatch::MemoryLocker::GetPointer | ( | ) | [inline] |
Returns a write-enabled pointer to a read-only memory block.
PMDL FunctionPatch::FunctionPatch::MemoryLocker::m_pMdl [private] |
PVOID FunctionPatch::FunctionPatch::MemoryLocker::m_pPointer [private] |