public static bool WriteMemory(Int64 MemoryAddress, byte[] Buffer) { uint oldProtect; Managed.VirtualProtectEx(pHandle, (IntPtr)MemoryAddress, (uint)Buffer.Length, Managed.PAGE_READWRITE, out oldProtect); IntPtr ptrBytesWritten; return(Managed.WriteProcessMemory(pHandle, MemoryAddress, Buffer, (uint)Buffer.Length, out ptrBytesWritten)); }