IActiveScript::GetScriptThreadIDIActiveScript::GetScriptThreadID*
*Contents  *Index  *Topic Contents
*Previous Topic: IActiveScript::GetScriptState
*Next Topic: IActiveScript::GetScriptThreadState

IActiveScript::GetScriptThreadID

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.

dwWin32ThreadID
[in] Thread identifier of a running Win32 thread in the current process. Use the GetCurrentScriptThreadID function to retrieve the thread identifier of the currently executing thread.
pstidThread
[out] Address of a variable that receives the script thread identifier associated with the given Win32 thread. The interpretation of this identifier is left to the scripting engine, but it can be just a copy of the Windows thread identifier. Note that if the Win32 thread terminates, this identifier becomes unassigned and may subsequently be assigned to another thread.

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.


Up Top of Page
© 1997 Microsoft Corporation. All rights reserved. Terms of Use.