| View previous topic :: View next topic |
| Author |
Message |
cleiton Newbie cheater
Reputation: 0
Joined: 05 Mar 2014 Posts: 21
|
Posted: Tue Mar 17, 2015 9:30 am Post subject: How can I get the correct Thread ID? |
|
|
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 |
|
 |
atom0s Moderator
Reputation: 205
Joined: 25 Jan 2006 Posts: 8587 Location: 127.0.0.1
|
Posted: Tue Mar 17, 2015 4:52 pm Post subject: |
|
|
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 |
|
 |
cleiton Newbie cheater
Reputation: 0
Joined: 05 Mar 2014 Posts: 21
|
Posted: Tue Mar 17, 2015 7:32 pm Post subject: |
|
|
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 |
|
 |
atom0s Moderator
Reputation: 205
Joined: 25 Jan 2006 Posts: 8587 Location: 127.0.0.1
|
Posted: Wed Mar 18, 2015 2:30 pm Post subject: |
|
|
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 |
|
 |
cleiton Newbie cheater
Reputation: 0
Joined: 05 Mar 2014 Posts: 21
|
Posted: Thu Mar 19, 2015 6:56 am Post subject: |
|
|
| 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 |
|
 |
|