// wdbgexts.h
PWINDBG_WRITE_PROCESS_MEMORY_ROUTINE PwindbgWriteProcessMemoryRoutine;
ULONG PwindbgWriteProcessMemoryRoutine(
ULONG_PTR offset,
LPCVOID lpBuffer,
ULONG cb,
PULONG lpcbBytesWritten
)
{...}
View the official Windows Driver Kit DDI referenceNo description available.
The PWINDBG_WRITE_PROCESS_MEMORY_ROUTINE (WriteMemory) function works like the Win32 WriteProcessMemory routine. It writes memory to the process being debugged. The entire area to be written must be accessible, or the operation fails.
offsetSpecifies the base address of the memory to be written in the process that is being debugged.
lpBufferPoints to the buffer that contains the data to be written.
cbSpecifies the number of bytes that WriteMemory should write.
lpcbBytesWrittenReceives the actual number of bytes that WriteMemory transferred from the buffer. This parameter is optional; if it is NULL, it is ignored.
If the routine succeeds, the return value is TRUE; otherwise, it is FALSE.
For a WdbgExts extension, include wdbgexts.h. For a DbgEng extension, include wdbgexts.h before dbgeng.h. See Writing DbgEng Extension Code for details.