Executes the specified script in the provided language.
HRESULT execScript( BSTR code, BSTR language, VARIANT *pvarRet );
- [in] BSTR that specifies the code to be executed.
- [in] BSTR that specifies the language in which the code is executed. The language defaults to Microsoft JScript.
- [out, retval] Address of a VARIANT of type VT_EMPTY. This method always returns VT_EMPTY.
Returns S_OK if successful, or an error value otherwise.
Script executed through the IHTMLWindow2::execScript method can access all global variables available to the calling script. This can be useful when you want the functionality of another scripting language that would not otherwise be available in JScript, such as the Microsoft Visual Basic Scripting Edition (VBScript) MsgBox function.