Jump to content
Sign in to follow this  

Thread address.

Recommended Posts


Guys how can i get the address of a thread? :graduated:

something like this "StartAddress"

Share this post

Link to post
Share on other sites

You'll need to open a thread handle with THREAD_QUERY_INFORMATION access, and you can retrieve the start address using something along the lines of the below code. (Note '-2' is a pseudo-handle to the current thread):

Local $iPtrSz=4,$aRet,$hThread=Ptr(-2)
If @AutoItX64 Then $iPtrSz*=2
If Not @error And $aRet[0]=0 And $aRet[5]=$iPtrSz Then
    ConsoleWrite("Start address:"&$aRet[3]&@CRLF)
    ConsoleWrite("Error getting start address"&@CRLF)

*edit: added @error check

Edited by Ascend4nt

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  


Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.