flat assembler
Message board for the users of flat assembler.
![]() |
Author |
|
chris 19 Jan 2006, 06:53
Hi, shism2
GetExitCodeThread takes the thread handle not the thread id as the first parameter. http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dllproc/base/getexitcodethread.asp |
|||
![]() |
|
shism2 19 Jan 2006, 12:11
so how can I get my starting process thread handle ?
|
|||
![]() |
|
velox 19 Jan 2006, 12:26
the return value of CreateThread / CreateRemoteThread api is the handle.
|
|||
![]() |
|
shism2 19 Jan 2006, 20:26
i know that... but how can I get my own process thread handle...
|
|||
![]() |
|
velox 19 Jan 2006, 21:51
GetCurrentProcess, GetCurrentThread - read msdn for more information, especially if you want to obtain a "real" handle, which is valid in other
processes too.. |
|||
![]() |
|
shism2 19 Jan 2006, 22:07
Code: invoke GetCurrentThread mov dword [threadter],eax invoke CreateRemoteThread,-1,0,0,start6,0,0,thrid ;invoke CreateThread,0,0,start5,0,0,thrid ;invoke CloseHandle,eax ;invoke TerminateThread,eax,0 SysInvoke ZWTerminateThread,0,0 proc start6 align 16 invoke GetExitCodeThread, dword [threadter],dword [codebegin] The program just crashes... at GetExitCodeThread |
|||
![]() |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2025, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.