private ReadProcessMemory ( |
||
hProcess | ||
lpBaseAddress | ||
buffer | [ | |
size | ||
lpNumberOfBytesRead | ||
return |
public virtual bool Read(int memoryAddress, byte[] buffer) { if (Diagnostic) { _readCalls++; } IntPtr ptrBytesReaded; MemoryReaderApi.ReadProcessMemory(m_hProcess, (IntPtr)memoryAddress, buffer, (uint)buffer.Length, out ptrBytesReaded); return((int)ptrBytesReaded == buffer.Length); }
public virtual byte[] Read(IntPtr memoryAddress, uint bytesToRead) { if (Diagnostic) { _readCalls++; } IntPtr ptrBytesReaded; var buffer = new byte[bytesToRead]; MemoryReaderApi.ReadProcessMemory(m_hProcess, memoryAddress, buffer, bytesToRead, out ptrBytesReaded); return(buffer); }