WriteProcessMemory function Null safety kernel32

int WriteProcessMemory(
  1. int hProcess,
  2. Pointer<NativeType> lpBaseAddress,
  3. Pointer<NativeType> lpBuffer,
  4. int nSize,
  5. 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


int WriteProcessMemory(int hProcess, Pointer lpBaseAddress, Pointer lpBuffer,
        int nSize, Pointer<IntPtr> lpNumberOfBytesWritten) =>
        hProcess, lpBaseAddress, lpBuffer, nSize, lpNumberOfBytesWritten);