Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Puts the scripting engine into the given state. This method can be called from non-base threads without resulting in a non-base callout to host objects or to the IActiveScriptSite interface.
Syntax
HRESULT SetScriptState(
SCRIPTSTATE ss // identifier of new state
);
Parameters
ss
[in] Sets the scripting engine to the given state. Can be one of the values defined in the SCRIPTSTATE Enumeration enumeration.
Return Value
Returns one of the following values:
Return Value | Meaning |
---|---|
S_OK |
Success. |
E_FAIL |
The scripting engine does not support the transition back to the initialized state. The host must discard this scripting engine and create, initialize, and load a new scripting engine to achieve the same effect. |
E_UNEXPECTED |
The call was not expected (for example, the scripting engine has not yet been loaded or initialized) and therefore failed. |
OLESCRIPT_S_PENDING |
The method was queued successfully, but the state has not changed yet. When the state changes, the site will be called back through the IActiveScriptSite::OnStateChange method. |
S_FALSE |
The method succeeded, but the script was already in the given state. |
Remarks
For more information about scripting engine states, see the Script Engine States section of Windows Script Engines .
See also
IActiveScript::Clone
IActiveScript::GetScriptDispatch
IActiveScript::InterruptScriptThread
IActiveScriptParse::ParseScriptText
IActiveScriptSite::GetItemInfo