Cheat Engine Forum Index Cheat Engine
The Official Site of Cheat Engine
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


Freezing values in DLL trainer

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming
View previous topic :: View next topic  
Author Message
Nigtronix
Cheater
Reputation: 0

Joined: 18 May 2007
Posts: 45

PostPosted: Sun May 27, 2007 1:34 am    Post subject: Freezing values in DLL trainer Reply with quote

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
View user's profile Send private message
Robotex
Master Cheater
Reputation: 0

Joined: 05 Sep 2006
Posts: 378
Location: The pizza country!

PostPosted: Sun May 27, 2007 2:19 am    Post subject: Reply with quote

as you said, check it in a loop
_________________

ASM/C++ Coder
Project Speranza lead developer
Back to top
View user's profile Send private message
Nigtronix
Cheater
Reputation: 0

Joined: 18 May 2007
Posts: 45

PostPosted: Sun May 27, 2007 8:37 am    Post subject: Reply with quote

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
View user's profile Send private message
assaf84
Expert Cheater
Reputation: 0

Joined: 03 Oct 2006
Posts: 238

PostPosted: Sun May 27, 2007 10:09 pm    Post subject: Reply with quote

try doing this on a seperate thread, and do sleep(100) instead of 2, it'll be still OK
Back to top
View user's profile Send private message
Uzeil
Moderator
Reputation: 6

Joined: 21 Oct 2006
Posts: 2411

PostPosted: Sun May 27, 2007 10:28 pm    Post subject: Reply with quote

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.

_________________


Mini Engine v3.0
Mipla v1.0

Reposted old threads out of the MS section.
Back to top
View user's profile Send private message
Nigtronix
Cheater
Reputation: 0

Joined: 18 May 2007
Posts: 45

PostPosted: Sun May 27, 2007 10:35 pm    Post subject: Reply with quote

Thanks guys, it works a lot better now!
Back to top
View user's profile Send private message
Nigtronix
Cheater
Reputation: 0

Joined: 18 May 2007
Posts: 45

PostPosted: Mon May 28, 2007 12:32 am    Post subject: Reply with quote

Thanks! Basically the same thing I have Very Happy Although the CreateThread needs to be called like this:

CreateThread(NULL, 0,
(LPTHREAD_START_ROUTINE)thread,
NULL, 0, &threadid);
Back to top
View user's profile Send private message
Nigtronix
Cheater
Reputation: 0

Joined: 18 May 2007
Posts: 45

PostPosted: Mon May 28, 2007 12:56 am    Post subject: Reply with quote

ThreadID needs to be a DWORD
Back to top
View user's profile Send private message
Flyte
Peanuts!!!!
Reputation: 6

Joined: 19 Apr 2006
Posts: 1887
Location: Canada

PostPosted: Mon May 28, 2007 7:29 am    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group

CE Wiki   IRC (#CEF)   Twitter
Third party websites