public static void WriteRawMemory(this System.Diagnostics.Process process, byte[] buffer, ulong memoryPointer) { if (!Native.WriteProcessMemory(process.Handle, memoryPointer, buffer, (uint)buffer.Length, 0)) { throw new Exception($"WriteBuffer - WriteProcessMemory() failed - {Marshal.GetLastWin32Error():x2}"); } }