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 


How can I get the correct Thread ID?

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

Joined: 05 Mar 2014
Posts: 21

PostPosted: Tue Mar 17, 2015 9:30 am    Post subject: How can I get the correct Thread ID? Reply with quote

Hi everyone,
I'm having a trouble while i'm trying to get any Thread ID, I'm using OpenThread API to get the thread id but this function is returning an incorrect threadid, how can I solve that? How can I get the thread id without using openthread api?

Thanks a lot
Back to top
View user's profile Send private message
atom0s
Moderator
Reputation: 205

Joined: 25 Jan 2006
Posts: 8587
Location: 127.0.0.1

PostPosted: Tue Mar 17, 2015 4:52 pm    Post subject: Reply with quote

OpenThread does not return or obtain a thread id, it obtains a handle.

If you need to locate thread ids you can use the following API instead:
- CreateToolhelp32Snapshot
- Thread32First
- Thread32Next

You will need to compare the owner process id to locate the threads within the owner process of your choice etc.

_________________
- Retired.
Back to top
View user's profile Send private message Visit poster's website
cleiton
Newbie cheater
Reputation: 0

Joined: 05 Mar 2014
Posts: 21

PostPosted: Tue Mar 17, 2015 7:32 pm    Post subject: Reply with quote

Sorry I mean Thread Handle, my code works I did it as you said and it doesn't work in windows that Avast's installed.
How can I solve that? How can I get thread handle without use OpenThread API?
Thanks
Back to top
View user's profile Send private message
atom0s
Moderator
Reputation: 205

Joined: 25 Jan 2006
Posts: 8587
Location: 127.0.0.1

PostPosted: Wed Mar 18, 2015 2:30 pm    Post subject: Reply with quote

You'll need to show the code you have issues with, can't really help without seeing if you are doing something wrong.
_________________
- Retired.
Back to top
View user's profile Send private message Visit poster's website
cleiton
Newbie cheater
Reputation: 0

Joined: 05 Mar 2014
Posts: 21

PostPosted: Thu Mar 19, 2015 6:56 am    Post subject: Reply with quote

My code works, it isn't the problem, the problem is when the PC has AVAST ANTI VIRUS installed, the code doesn't get the correct thread handle.
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