View previous topic :: View next topic |
Author |
Message |
mikey_ How do I cheat?
Reputation: 0
Joined: 17 Nov 2014 Posts: 8
|
Posted: Sat Dec 13, 2014 9:06 am Post subject: how to read type float delphi |
|
|
how to read type float delphi from address 011AC958?
Code: |
function readfloat(WindowTitle:Pansichar;address:integer):single;
var
p : pointer;
puffer : single;
BytesRead: SIZE_T;
WindowName,ProcessId,ThreadId,HandleWindow : integer;
begin
p := ptr(address);
WindowName := FindWindow(nil,PWideChar(WindowTitle));
ThreadId := GetWindowThreadProcessId(WindowName,@ProcessId);
HandleWindow := OpenProcess(PROCESS_ALL_ACCESS,False,ProcessId);
ReadProcessMemory( HandleWindow, p , @puffer,sizeof(single), BytesRead); //READ
closehandle(HandleWindow);
readfloat := Puffer;
end;
|
help please
Description: |
|
Filesize: |
385 Bytes |
Viewed: |
6919 Time(s) |

|
|
|
Back to top |
|
 |
Dark Byte Site Admin
Reputation: 470
Joined: 09 May 2003 Posts: 25805 Location: The netherlands
|
Posted: Sat Dec 13, 2014 9:11 am Post subject: |
|
|
just like that. But make sure you are running it as administrator and have SE_DEBUG_PRIVILEGE
(or try less access rights to OpenProcess )
_________________
Do not ask me about online cheats. I don't know any and wont help finding them.
Like my help? Join me on Patreon so i can keep helping |
|
Back to top |
|
 |
mikey_ How do I cheat?
Reputation: 0
Joined: 17 Nov 2014 Posts: 8
|
Posted: Sat Dec 13, 2014 9:13 am Post subject: |
|
|
Dark Byte wrote: | just like that. But make sure you are running it as administrator and have SE_DEBUG_PRIVILEGE
(or try less access rights to OpenProcess ) |
it reads but not true
Description: |
|
Filesize: |
803 Bytes |
Viewed: |
6910 Time(s) |

|
|
|
Back to top |
|
 |
Dark Byte Site Admin
Reputation: 470
Joined: 09 May 2003 Posts: 25805 Location: The netherlands
|
Posted: Sat Dec 13, 2014 9:18 am Post subject: |
|
|
I think the read fails, and what you're seeing is the uninitialized variable
add puffer:=0; before ReadProcessMemory
And add some error checking to see what goes wrong
OpenProcess returns 0 on failure, and ReadProcessMemory returns false on failure
instead of PROCESS_ALL_ACCESS try PROCESS_VM_READ
_________________
Do not ask me about online cheats. I don't know any and wont help finding them.
Like my help? Join me on Patreon so i can keep helping |
|
Back to top |
|
 |
mikey_ How do I cheat?
Reputation: 0
Joined: 17 Nov 2014 Posts: 8
|
Posted: Sat Dec 13, 2014 9:59 am Post subject: |
|
|
Dark Byte wrote: | I think the read fails, and what you're seeing is the uninitialized variable
add puffer:=0; before ReadProcessMemory
And add some error checking to see what goes wrong
OpenProcess returns 0 on failure, and ReadProcessMemory returns false on failure
instead of PROCESS_ALL_ACCESS try PROCESS_VM_READ |
Thanks this was apparently the problem
|
|
Back to top |
|
 |
|