Retrieves the current state of a script thread.

HRESULT GetScriptThreadState(
    SCRIPTTHREADID stidThread,    // identifier of script thread
    SCRIPTTHREADSTATE *pstsState  // receives state flag



[in] Identifier of the thread for which the state is desired, or one of the following special thread identifiers:

Value Meaning


The base thread; that is, the thread in which the scripting engine was instantiated.


The currently executing thread.


[out] Address of a variable that receives the state of the indicated thread. The state is indicated by one of the named constant values defined by the SCRIPTTHREADSTATE enumeration. If this parameter does not identify the current thread, the state may change at any time.

Expand imageReturn Value

Expand imageRemarks

Expand imageSee Also