| View previous topic :: View next topic |
| Author |
Message |
ShurikeN Advanced Cheater
Reputation: 0
Joined: 09 Jan 2008 Posts: 84
|
Posted: Fri May 09, 2008 9:12 am Post subject: [help]RPM array of bytes |
|
|
*sighs i've been doing this for long and i couldn't get it to work.
| Code: |
BYTE Bmamo = { 0xBA, 0xD4, 0x59, 0x6F, 0x75 };
BYTE BTest[sizeof(Bmamo)];
ReadProcessMemory( hTarget, (void*)0x00B411D4, (void*)&BTest[0], sizeof(BTest), NULL );
if( BTest == Bmamo ) // check if they are equal
{
//SUCCESS!!! i want to get in here but still no LUCK!!!
}
|
_________________
| Code: | XXXXXX XXXXXX
XXXXX XXXXX
XXXXXXXX
D I R E C T
XXXXXXXX
XXXXX XXXXX
XXXXXX XXXXXX
GameDev
|
|
|
| Back to top |
|
 |
tombana Master Cheater
Reputation: 2
Joined: 14 Jun 2007 Posts: 456 Location: The Netherlands
|
Posted: Fri May 09, 2008 9:27 am Post subject: |
|
|
| What value did ReadProcessMemory return? (Or GetLastError for that matter)
|
|
| Back to top |
|
 |
Noz3001 I'm a spammer
Reputation: 26
Joined: 29 May 2006 Posts: 6220 Location: /dev/null
|
Posted: Fri May 09, 2008 10:12 am Post subject: |
|
|
| you need to initialize the array BTest with a real number and dont use []'s in the API because that only sets the 1st BYTE.
|
|
| Back to top |
|
 |
haha01haha01 Grandmaster Cheater Supreme
Reputation: 0
Joined: 15 Jun 2007 Posts: 1233 Location: http://www.SaviourFagFails.com/
|
Posted: Fri May 09, 2008 10:17 am Post subject: |
|
|
| noz3001 wrote: | | you need to initialize the array BTest with a real number and dont use []'s in the API because that only sets the 1st BYTE. |
i hate the intialize variable thingy, it fucked my programs so many times...
y cant it just init itself -_-
|
|
| Back to top |
|
 |
tombana Master Cheater
Reputation: 2
Joined: 14 Jun 2007 Posts: 456 Location: The Netherlands
|
Posted: Fri May 09, 2008 10:41 am Post subject: |
|
|
| noz3001 wrote: | | you need to initialize the array BTest with a real number and dont use []'s in the API because that only sets the 1st BYTE. |
Using []'s won't only set the first byte I think, it doesn't matter. It will just set the amount of bytes it has read. So also initializing it shouldn't matter.
|
|
| Back to top |
|
 |
Noz3001 I'm a spammer
Reputation: 26
Joined: 29 May 2006 Posts: 6220 Location: /dev/null
|
Posted: Fri May 09, 2008 11:09 am Post subject: |
|
|
| tombana wrote: | | noz3001 wrote: | | you need to initialize the array BTest with a real number and dont use []'s in the API because that only sets the 1st BYTE. |
Using []'s won't only set the first byte I think, it doesn't matter. It will just set the amount of bytes it has read. So also initializing it shouldn't matter. |
I mean passing it as a param with [0].
|
|
| Back to top |
|
 |
Dark Byte Site Admin
Reputation: 474
Joined: 09 May 2003 Posts: 25969 Location: The netherlands
|
Posted: Fri May 09, 2008 1:22 pm Post subject: |
|
|
you can not compare arrays with ==
it'll just return false because the address of the first array is not the address of the 2nd array
use memcmp to check it's the same (or a for loop that checks it for each byte, but I prefer memcmp)
also, "BYTE BTest[sizeof(Bmamo)]; " is valid. nothing wrong with that
_________________
Tools give you results. Knowledge gives you control.
Like my help? Join me on Patreon so i can keep helping |
|
| Back to top |
|
 |
HalfPrime Grandmaster Cheater
Reputation: 0
Joined: 12 Mar 2008 Posts: 532 Location: Right there...On your monitor
|
Posted: Fri May 09, 2008 1:24 pm Post subject: |
|
|
That seems like kind of a funky comparison statement. You sure it's comparing the right stuff?
| Quote: | | I mean passing it as a param with [0]. |
The address of Btest and Btest[0] is the same, so it wouldn't matter because you provide the amount of bytes it should read.
_________________
|
|
| Back to top |
|
 |
tombana Master Cheater
Reputation: 2
Joined: 14 Jun 2007 Posts: 456 Location: The Netherlands
|
Posted: Sat May 10, 2008 2:48 am Post subject: |
|
|
| HalfPrime wrote: | | Quote: | | I mean passing it as a param with [0]. |
The address of Btest and Btest[0] is the same, so it wouldn't matter because you provide the amount of bytes it should read. |
Yes that's what I meant to say.
|
|
| Back to top |
|
 |
|