Microsoft® Windows® Script Interfaces IActiveScript::GetScriptThreadID |
Language Reference Previous Next |
HRESULT GetScriptThreadID( DWORD dwWin32ThreadID, // Win32 thread identifier SCRIPTTHREADID *pstidThread // receives scripting thread identifier );
Retrieves a scripting-engine-defined identifier for the thread associated with the given Win32 thread.
Return Value | Meaning |
S_OK | Success. |
E_POINTER | An invalid pointer was specified. |
E_UNEXPECTED | The call was not expected (for example, the scripting engine has not yet been loaded or initialized) and therefore failed. |
The retrieved identifier can be used in subsequent calls to script thread execution control methods such as the IActiveScript::InterruptScriptThread method.
This method can be called from non-base threads without resulting in a non-base callout to host objects or to the IActiveScriptSite interface.