The GetThreadId method of the IRemoteThreadEx interface returns the Win32 thread ID for this thread.
HRESULT GetThreadId(ULONG *pdwTid)
[out] *pdwTid | Returns the Win32 thread ID for this thread. |
S_OK Success.
E_FAIL The associated thread has terminated.