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.
Definition at line 33 of file kdpatch.cpp.
FunctionPatch::FunctionPatch::MemoryLocker::MemoryLocker | ( | void * | pData, | |
ULONG | size | |||
) | [inline] |
Locks read-only pages in memory and creates an additional read-write mapping.
Definition at line 41 of file kdpatch.cpp.
FunctionPatch::FunctionPatch::MemoryLocker::~MemoryLocker | ( | ) | [inline] |
void* FunctionPatch::FunctionPatch::MemoryLocker::GetPointer | ( | ) | [inline] |
Returns a write-enabled pointer to a read-only memory block.
Definition at line 60 of file kdpatch.cpp.
PMDL FunctionPatch::FunctionPatch::MemoryLocker::m_pMdl [private] |
Definition at line 36 of file kdpatch.cpp.
PVOID FunctionPatch::FunctionPatch::MemoryLocker::m_pPointer [private] |
Definition at line 37 of file kdpatch.cpp.