Solved Writeprocessmemory don't work

Hexui Undetected CSGO Cheats Sinkicheat PUBG Cheat

Clarityworld

Jr.Coder
Full Member
Nobleman
Feb 20, 2015
71
523
2
Can someone please help me, what im doing wrong here. Im trying to write to a Pointer with 3 Offsets. The RPM works without a problem the Value is right but when I try to write to it there is no change.


C++:
DWORD Cam1;
ReadProcessMemory(phandle, (LPCVOID*)(BaseAddressStorm + 0x00056CF0), &Cam1, 4, NULL);
	

	

	ReadProcessMemory(phandle, (LPCVOID*)(Cam1 + 0x35), &Cam1, 4, NULL);





	ReadProcessMemory(phandle, (LPCVOID*)(Cam1 + 0x124), &Cam1, 4, NULL);



	
	ReadProcessMemory(phandle, (LPCVOID*)(Cam1 + 0x2b0), &Cam1, 4, NULL);
	
	cout << "Before wpm " << Cam1 << endl;
	float newsa = 1600;

	WriteProcessMemory(phandle, (LPVOID*)(Cam1), &newsa, sizeof(float), NULL);

	cout << "After wpm " << Cam1 << endl;
+BaseAddress dont work too not effect on Adress.
C++:
WriteProcessMemory(phandle, (LPVOID*)(BaseAddressDLL + Cam1), &newsa, sizeof(float), NULL);
 

Rake

Cesspool Admin
Administrator
Jan 21, 2014
12,105
78,998
2,374
You can try using this function and then calling WriteProcessMemory to overwrite the final value, in case your pointer logic is incorrect
How to Hack Any Game pt 2 Rake
 
Last edited:

mambda

headass
Escobar Tier VIP
Trump Tier Donator
Jun 25, 2014
2,298
37,938
269
you stored the value into the variable holding the address, didnt you? Would be easier if you commented it to show where you expect to see a value if im wrong
 

Traxin

Escobar Tier VIP
Dank Tier Donator
Aug 3, 2015
1,041
25,378
154
C++:
	cout << "Before wpm " << Cam1 << endl;
	float newsa = 1600;

	WriteProcessMemory(phandle, (LPVOID*)(Cam1), &newsa, sizeof(float), NULL);

	cout << "After wpm " << Cam1 << endl;
Well cout here is going to output the same thing both time because you would have to use RPM again to read the value stored in the evaluated pointer.
Cam1 = evaluated pointer here but... that's not the only issue. Like mambda was saying you're not really evaluating the pointer correctly for your code.

Unless your last offset is 0, which I doubt, then your last RPM isn't really necessary.
It should just be Cam1 += 0x2b0;

Then Cam1 will contain the ADDRESS for the value you want to modify, now you can pass it on to WPM and change your shit.
Before you were essentially trying to write to an address pointed at by the value that you're trying to modify, which may very well be invalid and that's why it may seem like nothing is happening.
 
L

Lacapod

Can someone please help me, what im doing wrong here. Im trying to write to a Pointer with 3 Offsets. The RPM works without a problem the Value is right but when I try to write to it there is no change.


C++:
DWORD Cam1;
ReadProcessMemory(phandle, (LPCVOID*)(BaseAddressStorm + 0x00056CF0), &Cam1, 4, NULL);
	

	

	ReadProcessMemory(phandle, (LPCVOID*)(Cam1 + 0x35), &Cam1, 4, NULL);





	ReadProcessMemory(phandle, (LPCVOID*)(Cam1 + 0x124), &Cam1, 4, NULL);



	
	ReadProcessMemory(phandle, (LPCVOID*)(Cam1 + 0x2b0), &Cam1, 4, NULL);
	
	cout << "Before wpm " << Cam1 << endl;
	float newsa = 1600;

	WriteProcessMemory(phandle, (LPVOID*)(Cam1), &newsa, sizeof(float), NULL);

	cout << "After wpm " << Cam1 << endl;
+BaseAddress dont work too not effect on Adress.
C++:
WriteProcessMemory(phandle, (LPVOID*)(BaseAddressDLL + Cam1), &newsa, sizeof(float), NULL);
How to read:

C++:
UINT_PTR Address = 0xBIGCOOCK; //or DWORD_PTR for compatibility and shit
int Value;
ReadProcessMemory(Handle, reinterpret_cast<void*>(Address), &Value, sizeof(Value), nullptr);
How to write a value /w offsets simply (Screw DMA amarite):

C++:
UINT_PTR Address = 0xFUUCKMYLIFE;
double Value = 69.00001;
PBYTE Offsets[] = {0x67, 0x68, 0x70};
WriteProcessMemory(Handle, reinterpret_cast<void*>(Address + Offsets), Value, 3, nullptr);
How to patch bytes:

C++:
UINT_PTR Address = 0xQQPLZ;
WriteProcessMemory(Handle, reinterpret_cast<void*>(Address), "0x90/0x90/0x24/", 3, nullptr);

I may have done something wrong there but fuuck it, im not a reliable source
 

Traxin

Escobar Tier VIP
Dank Tier Donator
Aug 3, 2015
1,041
25,378
154
Oh and LPCVOID* is a void** and not a void* which is actually what you need. The extra asterisk changes the meaning of that statement.
Whenever in doubt about what some of those win32 data types you could hover your mouse over them to see the typedef. You'll notice LPVOID is just a void* and LPCVOID is a const void*.
Just little things to keep in mind that will make remembering some of this stuff a bit easier.
 
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