Returns information about the state of any thread in the system, including such items as the execution state and the CPU registers for that thread's execution context. Since full thread context is preserved only when the thread is preempted, the CPU register information is available only for threads in the ready state or the suspended state where the thread has not suspended itself. Thus the primary purpose for this call is to examine a thread that has received an exception with its exception handler mode set to suspend the faulting thread.
BOOLEAN GetRtThreadState( RTHANDLE hThread, // handle for the thread to interrogate LPTHREADSTATE_SNAPHOT lpState // pointer to a THREADSTATE_SNAPSHOT structure );
hThread
lpState
TRUE
FALSE
E_OK 0x0000
E_BAD_ADDR 0x800F
lpInfo
does not refer to a writeable area of sufficient size to receive the data. Versions | Defined in | Include | Link to |
---|---|---|---|
INtime 3.0 | intime/rt/include/rtbase.h | rt.h | rt.lib |