So i'm getting this error message, can someone help me, already tried a lot of google answers :p nothing worked.
ctrl+shift+space result on ReadProcessMemory
**Parameters**
hProcess System.Cardinal
IpBaseAddress System.Pointer
IpBuffer System.Pointer
nSize System.Cardinal
IpNumberOfBytesRead System.Cardinal
**Returns**
System.Boolean
Ptr Function:
Ptr Function: function Ptr(Value: Integer): Pointer;
Variables
var
Form1: TForm1;
PH : THandle;
PID, ThID: DWORD;
H : THandle;
function Ptr(Value: Integer): Pointer;
Function
function LerInt(Address: Integer): Integer;
var
value:integer;
ler:dword;
begin
H := FindWindow(nil, 'Something Here :)');
ThID := GetWindowThreadProcessID(H, @PID);
PH := OpenProcess(PROCESS_ALL_ACCESS, FALSE, PID);
ReadProcessMemory(PH, Ptr(Address), @value, 4, ler); // THIS LINE
Result:=value;
end;
Ptris. Your lack of error checking is going to come back to haunt you. Win32 API calls won't throw exceptions. You have to check for errors. I say this at least 10 times a day. - David Heffernan