INtime SDK Help
GetRtThreadState
INtime SDK v7 > About INtime > INtime Kernel > Threads > GetRtThreadState

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
);

Parameters

hThread
Handle for the thread whose information is requested.
lpState
Pointer to the THREADSTATE_SNAPSHOT structure where the thread state information is to be stored.

Return Values

TRUE
Success.
FALSE
Failure. To determine the status, call GetLastRtError.

Status

E_OK 0x0000
No exceptional conditions occurred.
E_BAD_ADDR 0x800F
lpInfo does not refer to a writeable area of sufficient size to receive the data.

Requirements

Versions Defined in Include Link to
INtime 3.0 intime/rt/include/rtbase.h rt.h rt.lib
See Also

Structures