Class IActiveScriptSite (unit AXScript)

Inherits from

IUnknown

IActiveScriptError interface

Constructors



Functions

function GetDocVersionString(out Version: TBSTR): HRESULT;

HRESULT GetDocVersionString( [out] BSTR *pbstrVersion); Called by the script engine to get a text-based version number of the current document.

function GetItemInfo(const pstrName: POleStr; dwReturnMask: DWORD; out ppiunkItem: IUnknown; out Info: ITypeInfo): HRESULT;

HRESULT GetItemInfo( [in] LPCOLESTR pstrName, [in] DWORD dwReturnMask, [out] IUnknown **ppiunkItem, [out] ITypeInfo **ppti); Called by the script engine to look up named items in host application.

function GetLCID(out Lcid: TLCID): HRESULT;

HRESULT GetLCID( [out] LCID *plcid); Allows the host application to indicate the local ID for localization of script/user interaction

function OnEnterScript: HRESULT;

HRESULT OnEnterScript(void); Called by the script engine to indicate the beginning of a unit of work.

function OnLeaveScript: HRESULT;

HRESULT OnLeaveScript(void); Called by the script engine to indicate the completion of a unit of work.

function OnScriptError(const pscripterror: IActiveScriptError): HRESULT;

HRESULT OnScriptError( [in] IActiveScriptError *pscripterror); Called when script execution or parsing encounters an error.

function OnScriptTerminate(const pvarResult: OleVariant; const pexcepinfo: TExcepInfo): HRESULT;

HRESULT OnScriptTerminate( [in] const VARIANT *pvarResult, [in] const EXCEPINFO *pexcepinfo); Called by the script engine when the script terminates.

function OnStateChange(ScriptState: TScriptState): HRESULT;

HRESULT OnStateChange( [in] SCRIPTSTATE ssScriptState); Called by the script engine when state changes either explicitly via SetScriptState or implicitly via other script engine events.

Properties

Events

Variables


Constructors


Functions


function GetDocVersionString(out Version: TBSTR): HRESULT;

HRESULT GetDocVersionString( [out] BSTR *pbstrVersion); Called by the script engine to get a text-based version number of the current document. This string can be used to validate that any cached state that the script engine may have saved is consistent with the current document.


function GetItemInfo(const pstrName: POleStr; dwReturnMask: DWORD; out ppiunkItem: IUnknown; out Info: ITypeInfo): HRESULT;

HRESULT GetItemInfo( [in] LPCOLESTR pstrName, [in] DWORD dwReturnMask, [out] IUnknown **ppiunkItem, [out] ITypeInfo **ppti); Called by the script engine to look up named items in host application. Used to map unresolved variable names in scripts to automation interface in host application. The dwReturnMask parameter will indicate whether the actual object (SCRIPTINFO_INKNOWN) or just a coclass type description (SCRIPTINFO_ITYPEINFO) is desired.


function GetLCID(out Lcid: TLCID): HRESULT;

HRESULT GetLCID( [out] LCID *plcid); Allows the host application to indicate the local ID for localization of script/user interaction


function OnEnterScript: HRESULT;

HRESULT OnEnterScript(void); Called by the script engine to indicate the beginning of a unit of work.


function OnLeaveScript: HRESULT;

HRESULT OnLeaveScript(void); Called by the script engine to indicate the completion of a unit of work.


function OnScriptError(const pscripterror: IActiveScriptError): HRESULT;

HRESULT OnScriptError( [in] IActiveScriptError *pscripterror); Called when script execution or parsing encounters an error. The script engine will provide an implementation of IActiveScriptError that describes the runtime error in terms of an EXCEPINFO in addition to indicating the location of the error in the original script text.


function OnScriptTerminate(const pvarResult: OleVariant; const pexcepinfo: TExcepInfo): HRESULT;

HRESULT OnScriptTerminate( [in] const VARIANT *pvarResult, [in] const EXCEPINFO *pexcepinfo); Called by the script engine when the script terminates. In most cases this method is not called, as it is possible that the parsed script may be used to dispatch events from the host application


function OnStateChange(ScriptState: TScriptState): HRESULT;

HRESULT OnStateChange( [in] SCRIPTSTATE ssScriptState); Called by the script engine when state changes either explicitly via SetScriptState or implicitly via other script engine events.


Properties


Events


Variables