-
Автор темы
- #1
Нужна ваша помощь. Описание проблемы в заголовке.
C#:
public int ReadBytes(int baseAddress, byte[] offsets)
{
if (pID != 0 && baseAddress != 0 && offsets.Length !=0)
{
byte[] buffer = new byte[4];
int bytespread;
var handle = OpenProcess(0x001F0FFF, false, pID);
ReadProcessMemory(handle, (IntPtr)baseAddress, buffer, 4, out bytespread);
for (var i = 0; i < offsets.Length; i++)
{
baseAddress = BitConverter.ToInt32(buffer, 0);
baseAddress += offsets[i];
ReadProcessMemory(handle, (IntPtr)baseAddress, buffer, 4, out bytespread);
}
var result = BitConverter.ToInt32(buffer, 0);
CloseHandle(handle);
return BitConverter.ToInt32(buffer, 0);
}
return 0;