private WriteProcessMemory ( |
||
hProcess | ||
lpBaseAddress | ||
bBuffer | [ | |
size | uint | |
lpNumberOfBytesWritten | ||
Результат | int |
public bool Write(int iMemoryAddress, byte[] bBytesToWrite) { IntPtr ptr; MAPI.WriteProcessMemory(this.hReadProcess, (IntPtr)iMemoryAddress, bBytesToWrite, (uint)bBytesToWrite.Length, out ptr); return(ptr.ToInt32() == bBytesToWrite.Length); }
public bool Write(int iMemoryAddress, int[] iOffsets, byte[] bBytesToWrite) { IntPtr ptr; int num = this.CalculatePointer(iMemoryAddress, iOffsets); MAPI.WriteProcessMemory(this.hReadProcess, (IntPtr)num, bBytesToWrite, (uint)bBytesToWrite.Length, out ptr); return(ptr.ToInt32() == bBytesToWrite.Length); }
public bool Write(int iMemoryAddress, float iFloatToWrite) { IntPtr ptr; byte[] bytes = BitConverter.GetBytes(iFloatToWrite); MAPI.WriteProcessMemory(this.hReadProcess, (IntPtr)iMemoryAddress, bytes, 4, out ptr); return(ptr.ToInt32() == 4); }
public bool Write(int iMemoryAddress, double iDoubleToWrite) { IntPtr ptr; byte[] bytes = BitConverter.GetBytes(iDoubleToWrite); MAPI.WriteProcessMemory(this.hReadProcess, (IntPtr)iMemoryAddress, bytes, 8, out ptr); return(ptr.ToInt32() == 8); }
public bool Write(int iMemoryAddress, byte bByteToWrite) { IntPtr ptr; byte[] bBuffer = new byte[] { bByteToWrite }; MAPI.WriteProcessMemory(this.hReadProcess, (IntPtr)iMemoryAddress, bBuffer, 1, out ptr); return(ptr.ToInt32() == 1); }
public bool Write(int iMemoryAddress, int[] iOffsets, float iFloatToWrite) { IntPtr ptr; int num = this.CalculatePointer(iMemoryAddress, iOffsets); byte[] bytes = BitConverter.GetBytes(iFloatToWrite); MAPI.WriteProcessMemory(this.hReadProcess, (IntPtr)num, bytes, 4, out ptr); return(ptr.ToInt32() == 4); }
public bool Write(int iMemoryAddress, int[] iOffsets, byte bByteToWrite) { IntPtr ptr; int num = this.CalculatePointer(iMemoryAddress, iOffsets); byte[] bBuffer = new byte[] { bByteToWrite }; MAPI.WriteProcessMemory(this.hReadProcess, (IntPtr)num, bBuffer, 1, out ptr); return(ptr.ToInt32() == 1); }
public bool NOP(int iMemoryAddress, int iLength) { IntPtr ptr; byte[] bBuffer = new byte[iLength]; for (int i = 0; i < iLength; i++) { bBuffer[i] = 0x90; } MAPI.WriteProcessMemory(this.hReadProcess, (IntPtr)iMemoryAddress, bBuffer, (uint)iLength, out ptr); return(ptr.ToInt32() == iLength); }
public bool NOP(int iMemoryAddress, int[] iOffsets, int iLength) { IntPtr ptr; int num = this.CalculatePointer(iMemoryAddress, iOffsets); byte[] bBuffer = new byte[iLength]; for (int i = 0; i < iLength; i++) { bBuffer[i] = 0x90; } MAPI.WriteProcessMemory(this.hReadProcess, (IntPtr)num, bBuffer, (uint)iLength, out ptr); return(ptr.ToInt32() == bBuffer.Length); }
public bool Write(int iMemoryAddress, string sStringToWrite, int iMode = 0) { IntPtr ptr; byte[] bBuffer = new byte[1]; if (iMode == 0) { bBuffer = this.CreateAOBText(sStringToWrite); } else if (iMode == 1) { bBuffer = this.ReverseBytes(this.CreateAOBString(sStringToWrite)); } MAPI.WriteProcessMemory(this.hReadProcess, (IntPtr)iMemoryAddress, bBuffer, (uint)bBuffer.Length, out ptr); return(ptr.ToInt32() == bBuffer.Length); }
public bool Write(int iMemoryAddress, int[] iOffsets, string sStringToWrite, int iMode = 0) { IntPtr ptr; int num = this.CalculatePointer(iMemoryAddress, iOffsets); byte[] bBuffer = new byte[1]; if (iMode == 0) { bBuffer = this.CreateAOBText(sStringToWrite); } else if (iMode == 1) { bBuffer = this.ReverseBytes(this.CreateAOBString(sStringToWrite)); } MAPI.WriteProcessMemory(this.hReadProcess, (IntPtr)num, bBuffer, (uint)sStringToWrite.Length, out ptr); return(ptr.ToInt32() == sStringToWrite.Length); }