WriteProcessMemory function kernel32
int
WriteProcessMemory(
- int hProcess,
- Pointer<
NativeType> lpBaseAddress, - Pointer<
NativeType> lpBuffer, - int nSize,
- Pointer<
IntPtr> lpNumberOfBytesWritten,
Writes data to an area of memory in a specified process. The entire area to be written to must be accessible or the operation fails.
BOOL WriteProcessMemory(
HANDLE hProcess,
LPVOID lpBaseAddress,
LPCVOID lpBuffer,
SIZE_T nSize,
SIZE_T *lpNumberOfBytesWritten
);
Implementation
int WriteProcessMemory(int hProcess, Pointer lpBaseAddress, Pointer lpBuffer,
int nSize, Pointer<IntPtr> lpNumberOfBytesWritten) =>
_WriteProcessMemory(
hProcess, lpBaseAddress, lpBuffer, nSize, lpNumberOfBytesWritten);