| View previous topic :: View next topic |
| Author |
Message |
Nigtronix Cheater
Reputation: 0
Joined: 18 May 2007 Posts: 45
|
Posted: Sun May 27, 2007 1:34 am Post subject: Freezing values in DLL trainer |
|
|
What is the most efficient method to freeze a memory address from changing. I was thinking checking with RPM in a thread of the DLL but it would have to loop every say 2mS?
Thanks
|
|
| Back to top |
|
 |
Robotex Master Cheater
Reputation: 0
Joined: 05 Sep 2006 Posts: 378 Location: The pizza country!
|
Posted: Sun May 27, 2007 2:19 am Post subject: |
|
|
as you said, check it in a loop
_________________
ASM/C++ Coder
Project Speranza lead developer |
|
| Back to top |
|
 |
Nigtronix Cheater
Reputation: 0
Joined: 18 May 2007 Posts: 45
|
Posted: Sun May 27, 2007 8:37 am Post subject: |
|
|
| Yeah only way I can see doing it, but sometimes my thread in the application fails for a certain time then works again. Also, the CPU usage sometimes spikes even with Sleep();
|
|
| Back to top |
|
 |
assaf84 Expert Cheater
Reputation: 0
Joined: 03 Oct 2006 Posts: 238
|
Posted: Sun May 27, 2007 10:09 pm Post subject: |
|
|
| try doing this on a seperate thread, and do sleep(100) instead of 2, it'll be still OK
|
|
| Back to top |
|
 |
Uzeil Moderator
Reputation: 6
Joined: 21 Oct 2006 Posts: 2411
|
Posted: Sun May 27, 2007 10:28 pm Post subject: |
|
|
You don't need to use RPM if you're injected into the process. You can just read the memory directly.
And if you're freezing it, you just need to write the specified value to it constantly, which you'll need to do in a seperate thread if you want it to be done effectively without raping all the other events you need to be happening.
_________________
|
|
| Back to top |
|
 |
Nigtronix Cheater
Reputation: 0
Joined: 18 May 2007 Posts: 45
|
Posted: Sun May 27, 2007 10:35 pm Post subject: |
|
|
| Thanks guys, it works a lot better now!
|
|
| Back to top |
|
 |
Nigtronix Cheater
Reputation: 0
Joined: 18 May 2007 Posts: 45
|
Posted: Mon May 28, 2007 12:32 am Post subject: |
|
|
Thanks! Basically the same thing I have Although the CreateThread needs to be called like this:
CreateThread(NULL, 0,
(LPTHREAD_START_ROUTINE)thread,
NULL, 0, &threadid);
|
|
| Back to top |
|
 |
Nigtronix Cheater
Reputation: 0
Joined: 18 May 2007 Posts: 45
|
Posted: Mon May 28, 2007 12:56 am Post subject: |
|
|
| ThreadID needs to be a DWORD
|
|
| Back to top |
|
 |
Flyte Peanuts!!!!
Reputation: 6
Joined: 19 Apr 2006 Posts: 1887 Location: Canada
|
Posted: Mon May 28, 2007 7:29 am Post subject: |
|
|
| high6 wrote: | | Nigtronix wrote: | | ThreadID needs to be a DWORD |
It said LPDWORD so thats what I made it. |
LPDWORD is just a pointer to a DWORD.
You can use either. DWORD just needs the ampersand sign (&).
|
|
| Back to top |
|
 |
|