Cheat Engine Forum Index Cheat Engine
The Official Site of Cheat Engine
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


[delphi] WPM integer problem

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming
View previous topic :: View next topic  
Author Message
Reak
I post too much
Reputation: 0

Joined: 15 May 2007
Posts: 3496

PostPosted: Fri Dec 28, 2007 7:07 pm    Post subject: [delphi] WPM integer problem Reply with quote

Helllo guyzz,

Well I am trying to use this as buf:
Code:
  PokeValue = $7536837C240C0075198B8688200000FF;


But it says
Code:
[Error] Unit1.pas(40): Integer constant too large


How can I fix this ?

PS: Irwin: hatez yu Sad
Back to top
View user's profile Send private message
the_undead
Expert Cheater
Reputation: 1

Joined: 12 Nov 2006
Posts: 235
Location: Johannesburg, South Africa

PostPosted: Fri Dec 28, 2007 7:18 pm    Post subject: Reply with quote

use a byte array! Youve told it to write an insanely large number.
_________________
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
samuri25404
Grandmaster Cheater
Reputation: 7

Joined: 04 May 2007
Posts: 955
Location: Why do you care?

PostPosted: Fri Dec 28, 2007 7:18 pm    Post subject: Reply with quote

WTF IS THAT?

~~

What the hell are you trying to inject?

Try splitting it up into smaller chunks and injecting them one at a time.

_________________
Wiccaan wrote:

Oh jeez, watchout I'm a bias person! Locked.


Auto Assembly Tuts:
In Depth Tutorial on AA
Extended
Back to top
View user's profile Send private message
Reak
I post too much
Reputation: 0

Joined: 15 May 2007
Posts: 3496

PostPosted: Fri Dec 28, 2007 7:46 pm    Post subject: Reply with quote

the_undead wrote:
use a byte array! Youve told it to write an insanely large number.


Sorry, but I've no exp with arrays.
You mean like:
Code:
...
var
str: test_array: array[1..15] of Byte;
..


and

Code:
Str :=  $7536837C240C0075198B8688200000FF;


If yes, same error.


Last edited by Reak on Fri Dec 28, 2007 8:21 pm; edited 1 time in total
Back to top
View user's profile Send private message
the_undead
Expert Cheater
Reputation: 1

Joined: 12 Nov 2006
Posts: 235
Location: Johannesburg, South Africa

PostPosted: Fri Dec 28, 2007 8:28 pm    Post subject: Reply with quote

rEakW0n wrote:
the_undead wrote:
use a byte array! Youve told it to write an insanely large number.


Sorry, but I've no exp with arrays.
You mean like:
Code:
...
var
str: test_array: array[1..15] of Byte;
..


and

Code:
Str :=  $7536837C240C0075198B8688200000FF;


If yes, same error.


Ok, my Delphi is rusty so bare with me:
var
str : array[1..12] of Byte = ( $75, $36, $83, $7C, $24 etc etc)

_________________
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
Reak
I post too much
Reputation: 0

Joined: 15 May 2007
Posts: 3496

PostPosted: Fri Dec 28, 2007 8:35 pm    Post subject: Reply with quote

Yea just tried that:

Code:

 huso: Array [0..15] of Byte =($75, $36, $83, $7C, $24, $0C, $00, $75, $19, $8B, $86, $88, $20, $00, $00, $FF);


and

Code:
buf^ := CHR(Sizeof(ToBeWritten));


And now it writes something horrible to the address:
Back to top
View user's profile Send private message
Dark Byte
Site Admin
Reputation: 474

Joined: 09 May 2003
Posts: 25957
Location: The netherlands

PostPosted: Sat Dec 29, 2007 2:05 am    Post subject: Reply with quote

what type is buf?
if pchar:
buf:=pchar(ToBeWritten);


I myself prefer the PByteArray type

anyhow, to write:

global var:
huso: Array [0..15] of Byte =($75, $36, $83, $7C, $24, $0C, $00, $75, $19, $8B, $86, $88, $20, $00, $00, $FF);

inside a function:
var byteswritten: dword;
...
begin
...
WriteProcessMemory(processhandle,pointer(addresstowriteto),@huso[0],16,byteswritten);
...

_________________
Tools give you results. Knowledge gives you control.

Like my help? Join me on Patreon so i can keep helping
Back to top
View user's profile Send private message MSN Messenger
Reak
I post too much
Reputation: 0

Joined: 15 May 2007
Posts: 3496

PostPosted: Sat Dec 29, 2007 3:47 pm    Post subject: Reply with quote

Thank you alot DB. This way is awesome. Very Happy
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group

CE Wiki   IRC (#CEF)   Twitter
Third party websites