Solved What am I xxxxing up

Hexui Undetected CSGO Cheats Sinkicheat PUBG Cheat

Ayyyther

Newbie
Dank Tier Donator
Feb 14, 2016
36
143
1
C++:
			int test;
			ReadProcessMemory(hProc, (LPVOID)0x07F2549C, &test, sizeof(test), NULL);
			cout << test << endl;
Returns 0 no matter what. Proper address, since I can write to it and xxxx changes.

wat am i doing wrong. Alex couldn't spot it either.
 

Broihon

edgy 12 y/o
Escobar Tier VIP
Fleep Tier Donator
Dec 22, 2013
1,745
40,528
316
C++:
			int test;
			ReadProcessMemory(hProc, (LPVOID)0x07F2549C, &test, sizeof(test), NULL);
			cout << test << endl;
Returns 0 no matter what. Proper address, since I can write to it and xxxx changes.

wat am i doing wrong. Alex couldn't spot it either.
Call GetLastError after the RPM call and look up the error.
Is hProc valid?
 

Ayyyther

Newbie
Dank Tier Donator
Feb 14, 2016
36
143
1
Вroihon;38641 said:
Call GetLastError after the RPM call and look up the error.
Is hProc valid?
C++:
	HWND hWnd = FindWindow(0, "8bit_killer");
	if (hWnd == 0)
	{
		cout << "Cannot find window." << endl;
	}
	else {
		DWORD pId;
		GetWindowThreadProcessId(hWnd, &pId);
		HANDLE hProc = OpenProcess(PROCESS_ALL_ACCESS, FALSE, pId);

calling GetLastError() did nothing.
 

Broihon

edgy 12 y/o
Escobar Tier VIP
Fleep Tier Donator
Dec 22, 2013
1,745
40,528
316
C++:
	HWND hWnd = FindWindow(0, "8bit_killer");
	if (hWnd == 0)
	{
		cout << "Cannot find window." << endl;
	}
	else {
		DWORD pId;
		GetWindowThreadProcessId(hWnd, &pId);
		HANDLE hProc = OpenProcess(PROCESS_ALL_ACCESS, FALSE, pId);

calling GetLastError() did nothing.
Well, what error code did it return?

C++:
int test;
ReadProcessMemory(hProc, (LPVOID)0x07F2549C, &test, sizeof(test), NULL);
cout << GetLastError() << endl;
cout << test << endl;
 

Ayyyther

Newbie
Dank Tier Donator
Feb 14, 2016
36
143
1
Вroihon;38643 said:
Well, what error code did it return?

C++:
int test;
ReadProcessMemory(hProc, (LPVOID)0x07F2549C, &test, sizeof(test), NULL);
cout << GetLastError() << endl;
cout << test << endl;
Literally just 0.

Full ouput was

0
0
Process mem written.
 

Ayyyther

Newbie
Dank Tier Donator
Feb 14, 2016
36
143
1
Вroihon;38645 said:
Hmm, are you sure the address isn't 0 xD
Yes. Because on the line directly above it, I'm writing to the same address with a value of 500.

Also, the game is displaying it as 500. lol.
 

Broihon

edgy 12 y/o
Escobar Tier VIP
Fleep Tier Donator
Dec 22, 2013
1,745
40,528
316
C++:
int test = 0;
size_t Read = 0;
ReadProcessMemory(hProc, (LPVOID)0x07F2549C, &test, sizeof(test), &Read);
std::cout << test << std::endl;
std::cout << Read << std::endl;
try this.
 

Ayyyther

Newbie
Dank Tier Donator
Feb 14, 2016
36
143
1
Вroihon;38647 said:
C++:
int test = 0;
size_t Read = 0;
ReadProcessMemory(hProc, (LPVOID)0x07F2549C, &test, sizeof(test), &Read);
std::cout << test << std::endl;
std::cout << Read << std::endl;
try this.
output 4 this time.
 

Ayyyther

Newbie
Dank Tier Donator
Feb 14, 2016
36
143
1
Вroihon;38649 said:
0 and 4?
Well that means that RPM succesfully read 4 bytes from that address.
i have no idea
Oh, I might be retarded.

How would I go about reading the actual value from the address?
 

mambda

headass
Escobar Tier VIP
Trump Tier Donator
Jun 25, 2014
2,298
37,938
269
You did. the value is stored in test. If test holds 0 and there's no error then the address simply holds 0
 

mambda

headass
Escobar Tier VIP
Trump Tier Donator
Jun 25, 2014
2,298
37,938
269
So does your RPM return 0 or your GetLastError return 0?

Because rpm returning 0 is an error.
 

mambda

headass
Escobar Tier VIP
Trump Tier Donator
Jun 25, 2014
2,298
37,938
269
For future references, you can look up all winapi error codes on msdn. here's the linke for the first 0-499 errors.

https://msdn.microsoft.com/en-us/library/windows/desktop/ms681382(v=vs.85).aspx

yours is:

C++:
ERROR_TOO_MANY_OPEN_FILES
4 (0x4)
The system cannot open the file.
I'm fairly sure that this isn't your actual error and you possibly have an error from sooner. Put a GLE after the OpenProcess as well
 

Ayyyther

Newbie
Dank Tier Donator
Feb 14, 2016
36
143
1
Sorry. My bad. Read is returning 4.
test is returning 0.

GLE returned 0 there as well.
 

mambda

headass
Escobar Tier VIP
Trump Tier Donator
Jun 25, 2014
2,298
37,938
269
but what does the actual function return? If it returns 0 then it's reading exactly what you told it to read, can you show screenshots of this memory address and your console window?

and you said if you were to replace RPM with WPM and change nothing else it works fine? Could be access handle issues, for some reason not giving you vm_read
 

Ayyyther

Newbie
Dank Tier Donator
Feb 14, 2016
36
143
1
but what does the actual function return? If it returns 0 then it's reading exactly what you told it to read, can you show screenshots of this memory address and your console window?

and you said if you were to replace RPM with WPM and change nothing else it works fine? Could be access handle issues, for some reason not giving you vm_read
That'd be odd, considering I've had the same problem on two different games.
 

mambda

headass
Escobar Tier VIP
Trump Tier Donator
Jun 25, 2014
2,298
37,938
269
When in doubt run as admin. When in doubt twice give debug privileges.
 
Attention! Before you post:

Read the How to Ask Questions Guide
99% of questions are answered in the Beginner's Guide, do it before asking a question.

No Hack Requests. Post in the correct section.  Search the forum first. Read the rules.

How to make a good post:

  • Fill out the form correctly
  • Tell us the game name & coding language
  • Post everything we need to know to help you
  • Ask specific questions, be descriptive
  • Post errors, line numbers & screenshots
  • Post code snippets using code tags
  • If it's a large project, zip it up and attach it

If you do not comply, your post may be deleted.  We want to help, please make a good post and we will do our best to help you.

Community Mods