Class IActiveScript (unit AXScript) |
Inherits from
IUnknown
IActiveScriptSiteWindow interface
function AddNamedItem(Name: POleStr; Flags: DWORD): HRESULT;
HRESULT AddNamedItem( [in] LPCOLESTR pstrName, [in] DWORD dwFlags); Adds a variable name to the namespace of the script engine.
function AddTypeLib(TypeLib: TGUID; Major: DWORD; Minor: DWORD; Flags: DWORD): HRESULT;
HRESULT AddTypeLib( [in] REFGUID rguidTypeLib, [in] DWORD dwMajor, [in] DWORD dwMinor, [in] DWORD dwFlags); Adds the type and constant defintions contained in the designated type library to the namespace of the scripting engine.
function Clone(out ActiveScript: IActiveScript): HRESULT;
HRESULT Clone( [out] IActiveScript **ppscript); Duplicates the current script engine, replicating any parsed script text and named items, but no the actual pointers to the site's objects.
function Close: HRESULT;
HRESULT Close(void); Forces the engine to enter the closed state, resetting any parsed scripts and disconnecting/releasing all of the host's objects.
function GetCurrentScriptThreadID(out Thread: TScriptThreadID): HRESULT;
HRESULT GetCurrentScriptThreadID( [out] SCRIPTTHREADID *pstidThread); Gets the script's logical thread ID that corresponds to the current physical thread.
function GetScriptDispatch(ItemName: POleStr; out Disp: IDispatch): HRESULT;
HRESULT GetScriptDispatch( [in] LPCOLESTR pstrItemName, [out] IDispatch **ppdisp); Gets the IDispatch pointer to the scripting engine.
function GetScriptSite(riid: TGUID; out OleObject: Pointer): HRESULT;
HRESULT GetScriptSite( [in] REFIID riid, [iid_is][out] void **ppvObject); Queries the engine for the connected site
function GetScriptState(out State: TScriptState): HRESULT;
HRESULT GetScriptState( [out] SCRIPTSTATE *pssState); Queries the engine for its current state
function GetScriptThreadID(Win32ThreadID: DWORD; out Thread: TScriptThreadID): HRESULT;
HRESULT GetScriptThreadID( [in] DWORD dwWin32ThreadID, [out] SCRIPTTHREADID *pstidThread); Gets the logical thread ID that corresponds to the specified physical thread.
function GetScriptThreadState(Thread: TScriptThreadID; out State: TScriptThreadState): HRESULT;
HRESULT GetScriptThreadState( [in] SCRIPTTHREADID stidThread, [out] SCRIPTTHREADSTATE *pstsState); Gets the logical thread ID running state, which is either SCRIPTTHREADSTATE_NOTINSCRIPT or SCRIPTTHEADSTATE_RUNNING.
function InterruptScriptThread(Thread: TScriptThreadID; const ExcepInfo: TExcepInfo; Flags: DWORD): HRESULT;
HRESULT InterruptScriptThread( [in] SCRIPTTHREADID stidThread, [in] const EXCEPINFO *pexcepInfo, [in] DWORD dwFlags); Similar to Terminatethread, this method stope the execution of a script thread.
function SetScriptSite(ActiveScriptSite: IActiveScriptSite): HRESULT;
HRESULT SetScriptSite( [in] IActiveScriptSite *pass); Conects the host's application site object to the engine
function SetScriptState(State: TScriptState): HRESULT;
HRESULT SetScriptState( [in] SCRIPTSTATE ss); Causes the engine to enter the designate state
function AddNamedItem(Name: POleStr; Flags: DWORD): HRESULT;
HRESULT AddNamedItem( [in] LPCOLESTR pstrName, [in] DWORD dwFlags); Adds a variable name to the namespace of the script engine. The engine will call the site's GetItemInfo to resolve the name to an object.
function AddTypeLib(TypeLib: TGUID; Major: DWORD; Minor: DWORD; Flags: DWORD): HRESULT;
HRESULT AddTypeLib( [in] REFGUID rguidTypeLib, [in] DWORD dwMajor, [in] DWORD dwMinor, [in] DWORD dwFlags); Adds the type and constant defintions contained in the designated type library to the namespace of the scripting engine.
function Clone(out ActiveScript: IActiveScript): HRESULT;
HRESULT Clone( [out] IActiveScript **ppscript); Duplicates the current script engine, replicating any parsed script text and named items, but no the actual pointers to the site's objects.
function Close: HRESULT;
HRESULT Close(void); Forces the engine to enter the closed state, resetting any parsed scripts and disconnecting/releasing all of the host's objects.
function GetCurrentScriptThreadID(out Thread: TScriptThreadID): HRESULT;
HRESULT GetCurrentScriptThreadID( [out] SCRIPTTHREADID *pstidThread); Gets the script's logical thread ID that corresponds to the current physical thread. This allows script engines to execute script code on arbitrary threads that may be distinct from the site's thread.
function GetScriptDispatch(ItemName: POleStr; out Disp: IDispatch): HRESULT;
HRESULT GetScriptDispatch( [in] LPCOLESTR pstrItemName, [out] IDispatch **ppdisp); Gets the IDispatch pointer to the scripting engine.
function GetScriptSite(riid: TGUID; out OleObject: Pointer): HRESULT;
HRESULT GetScriptSite( [in] REFIID riid, [iid_is][out] void **ppvObject); Queries the engine for the connected site
function GetScriptState(out State: TScriptState): HRESULT;
HRESULT GetScriptState( [out] SCRIPTSTATE *pssState); Queries the engine for its current state
function GetScriptThreadID(Win32ThreadID: DWORD; out Thread: TScriptThreadID): HRESULT;
HRESULT GetScriptThreadID( [in] DWORD dwWin32ThreadID, [out] SCRIPTTHREADID *pstidThread); Gets the logical thread ID that corresponds to the specified physical thread. This allows script engines to execute script code on arbitrary threads that may be distinct from the sites thread.
function GetScriptThreadState(Thread: TScriptThreadID; out State: TScriptThreadState): HRESULT;
HRESULT GetScriptThreadState( [in] SCRIPTTHREADID stidThread, [out] SCRIPTTHREADSTATE *pstsState); Gets the logical thread ID running state, which is either SCRIPTTHREADSTATE_NOTINSCRIPT or SCRIPTTHEADSTATE_RUNNING.
function InterruptScriptThread(Thread: TScriptThreadID; const ExcepInfo: TExcepInfo; Flags: DWORD): HRESULT;
HRESULT InterruptScriptThread( [in] SCRIPTTHREADID stidThread, [in] const EXCEPINFO *pexcepInfo, [in] DWORD dwFlags); Similar to Terminatethread, this method stope the execution of a script thread.
function SetScriptSite(ActiveScriptSite: IActiveScriptSite): HRESULT;
HRESULT SetScriptSite( [in] IActiveScriptSite *pass); Conects the host's application site object to the engine
function SetScriptState(State: TScriptState): HRESULT;
HRESULT SetScriptState( [in] SCRIPTSTATE ss); Causes the engine to enter the designate state