This topic has not yet been rated - Rate this topic

IDebugThread2::GetThreadId

Gets the system thread identifier.

int GetThreadId ( 
   out uint pdwThreadId
);
pdwThreadId

[out] Returns the system thread identifier.

If successful, returns S_OK; otherwise, returns an error code.

A thread ID is used to identify a thread among all other threads in a process.

The following example shows how to implement this method for a simple CProgram object that implements the IDebugThread2 interface.

HRESULT CProgram::GetThreadId(DWORD* pdwThreadId) {   
   *pdwThreadId = GetCurrentThreadId();  
   return NOERROR;  
}  
Did you find this helpful?
(1500 characters remaining)
Community Content Add
Annotations FAQ