| View previous topic :: View next topic |
| Author |
Message |
zakusa Cheater
Reputation: 0
Joined: 09 Sep 2015 Posts: 48
|
Posted: Tue Oct 13, 2015 10:56 pm Post subject: no idea how to use setthreadcontext |
|
|
hi i saw that atom0s said that to use change register location you use set threadcontext but i need help my script isnt working below
#include <iostream>
#include <Windows.h>
#include <string>
#include <cstdlib>
using namespace std;
int Assemble()
{
__asm mov eax, 1
}
int main()
{
HWND process = FindWindow(NULL, "BOLOX");
if (process == 0) {
cerr << "game not opened";
} else {
DWORD p;
GetWindowThreadProcessId(process, &p);
HANDLE h = OpenProcess(PROCESS_ALL_ACCESS, FALSE, p);
if (!h) {
cerr << "you fail";
}
else {
int readcontent = SetThreadContext(h, (LPVOID)0x00000000, &Assemble, NULL);
system("PAUSE");
}
}
}
|
|
| Back to top |
|
 |
Innovation Grandmaster Cheater
Reputation: 12
Joined: 14 Aug 2008 Posts: 617
|
Posted: Thu Oct 15, 2015 5:06 am Post subject: |
|
|
Your code suffers from conceptual error, i.e., each process has its own virtual memory space.
Also note that your SetThreadContext parameters are incorrect to say the least.
|
|
| Back to top |
|
 |
STN I post too much
Reputation: 43
Joined: 09 Nov 2005 Posts: 2676
|
|
| Back to top |
|
 |
atom0s Moderator
Reputation: 205
Joined: 25 Jan 2006 Posts: 8587 Location: 127.0.0.1
|
Posted: Sat Oct 17, 2015 7:40 pm Post subject: |
|
|
I am just going to continue to lock your topics from now on. It is clear that you are making little to no effort in what you are doing. Instead you are just copy pasting code and expecting it to work. We are not going to spoon feed you answers on how to do things. It is very clear that you have little clue what you are doing with C/C++ in general and have no understanding of how to use API.
That said, I suggest you take the time to even learn the language before you attempt to get into game hacking related topics.
_________________
- Retired. |
|
| Back to top |
|
 |
|