Returns a handle for either the calling thread, the calling thread's process, or the root process, depending on the encoded request.
RTHANDLE GetRtThreadHandles( BYTE bySelection );
bySelection
Value | Returned handle |
---|---|
THIS_THREAD |
Calling thread. |
THIS_PROCESS |
Calling thread's process. |
ROOT_PROCESS |
Root process. |
A call to GetRtThreadHandles always results in a system call to the kernel. Cached versions of the calling thread's handle and the calling process' handle may be returned via the C library gettid and getpid functions. If you call these functions a lot the C library alternatives may result in better overall performance.
The appropriate handle's value. This call has no failure mode.
Versions | Defined in | Include | Link to |
---|---|---|---|
INtime 3.0 | intime/rt/include/rtbase.h | rt.h | rt.lib |