Method | Description | |
---|---|---|
ActiveScriptSiteWrapper ( |
Constructs instance of ActiveScriptSiteWrapper
|
|
ActiveScriptSiteWrapper ( |
Constructs instance of ActiveScriptSiteWrapper
|
|
CallFunction ( string functionName ) : object |
Calls a function
|
|
DeleteProperty ( string propertyName ) : void |
Removes a global object property
|
|
Dispose ( ) : void |
Destroys object
|
|
ExecuteScriptText ( string code, bool isExpression ) : object |
Executes a script text
|
|
GetDocVersionString ( string &version ) : void |
Retrieves a host-defined string that uniquely identifies the current document version. If the related document has changed outside the scope of Windows Script (as in the case of an HTML page being edited with Notepad), the scripting engine can save this along with its persisted state, forcing a recompile the next time the script is loaded.
|
|
GetItemInfo ( string name, ScriptInfoFlags returnMask, object &item, |
Allows the scripting engine to obtain information about an item added with the IActiveScript.AddNamedItem method
|
|
GetLcid ( int &lcid ) : void |
Retrieves the locale identifier associated with the host's user interface. The scripting engine uses the identifier to ensure that error strings and other user-interface elements generated by the engine appear in the appropriate language.
|
|
GetProperty ( string propertyName ) : object |
Gets a value of global object property
|
|
HasProperty ( string propertyName ) : bool |
Сhecks for the existence of a global object property
|
|
OnEnterScript ( ) : void |
Informs the host that the scripting engine has begun executing the script code
|
|
OnLeaveScript ( ) : void |
Informs the host that the scripting engine has returned from executing script code
|
|
OnScriptError ( IActiveScriptError scriptError ) : void |
Informs the host that an execution error occurred while the engine was running the script.
|
|
OnScriptTerminate ( object result, System.Runtime.InteropServices.ComTypes.EXCEPINFO exceptionInfo ) : void |
Informs the host that the script has completed execution
|
|
OnStateChange ( ScriptState scriptState ) : void |
Informs the host that the scripting engine has changed states
|
|
SetProperty ( string propertyName, object value ) : void |
Sets a value to global object property
|
Method | Description | |
---|---|---|
OnScriptError ( |
Informs the host that an execution error occurred while the engine was running the script
|
Method | Description | |
---|---|---|
Dispose ( bool disposing ) : void |
Destroys object
|
|
GetAndResetLastException ( ) : |
Gets and resets a last exception. Returns null for none.
|
|
GetItem ( string name ) : object |
Allows the scripting engine to obtain information about an item added with the IActiveScript.AddNamedItem method
|
|
GetTypeInfo ( string name ) : |
Allows the scripting engine to obtain information about an item added with the IActiveScript.AddNamedItem method. Gets the COM ITypeInfo
|
|
InitScriptDispatch ( ) : void |
Initializes a script dispatch
|
|
ThrowError ( ) : void |
public ActiveScriptSiteWrapper ( |
||
pActiveScript | Pointer to an instance of native JavaScript engine | |
activeScript | IActiveScript | Instance of native JavaScript engine |
return | System |
public ActiveScriptSiteWrapper ( |
||
pActiveScript | Pointer to an instance of native JavaScript engine | |
activeScript | IActiveScript | Instance of native JavaScript engine |
documentVersion | string | Host-defined document version string |
return | System |
public CallFunction ( string functionName ) : object | ||
functionName | string | Function name |
return | object |
public DeleteProperty ( string propertyName ) : void | ||
propertyName | string | Name of property |
return | void |
public ExecuteScriptText ( string code, bool isExpression ) : object | ||
code | string | Script text |
isExpression | bool | Flag that script text needs to run as an expression |
return | object |
public GetDocVersionString ( string &version ) : void | ||
version | string | The host-defined document version string |
return | void |
public GetItemInfo ( string name, ScriptInfoFlags returnMask, object &item, |
||
name | string | The name associated with the item, as specified in the /// IActiveScript.AddNamedItem method |
returnMask | ScriptInfoFlags | A bit mask specifying what information about the item should be /// returned. The scripting engine should request the minimum amount of information possible /// because some of the return parameters (for example, ITypeInfo) can take considerable /// time to load or generate |
item | object | A variable that receives a pointer to the IUnknown interface associated /// with the given item. The scripting engine can use the IUnknown.QueryInterface method to /// obtain the IDispatch interface for the item. This parameter receives null if returnMask /// does not include the ScriptInfo.IUnknown value. Also, it receives null if there is no /// object associated with the item name; this mechanism is used to create a simple class when /// the named item was added with the ScriptItem.CodeOnly flag set in the /// IActiveScript.AddNamedItem method. |
pTypeInfo | A variable that receives a pointer to the ITypeInfo interface /// associated with the item. This parameter receives null if returnMask does not include the /// ScriptInfo.ITypeInfo value, or if type information is not available for this item. If type /// information is not available, the object cannot source events, and name binding must be /// realized with the IDispatch.GetIDsOfNames method. Note that the ITypeInfo interface /// retrieved describes the item's coclass (TKIND_COCLASS) because the object may support /// multiple interfaces and event interfaces. If the item supports the IProvideMultipleTypeInfo /// interface, the ITypeInfo interface retrieved is the same as the index zero ITypeInfo that /// would be obtained using the IProvideMultipleTypeInfo.GetInfoOfIndex method. | |
return | void |
public GetLcid ( int &lcid ) : void | ||
lcid | int | A variable that receives the locale identifier for user-interface /// elements displayed by the scripting engine |
return | void |
public GetProperty ( string propertyName ) : object | ||
propertyName | string | Name of property |
return | object |
public HasProperty ( string propertyName ) : bool | ||
propertyName | string | Name of property |
return | bool |
protected OnScriptError ( |
||
exception | The exception | |
return | void |
public OnScriptError ( IActiveScriptError scriptError ) : void | ||
scriptError | IActiveScriptError | A host can use this interface to obtain information about the /// execution error |
return | void |
public OnScriptTerminate ( object result, System.Runtime.InteropServices.ComTypes.EXCEPINFO exceptionInfo ) : void | ||
result | object | A variable that contains the script result, or null if the script /// produced no result |
exceptionInfo | System.Runtime.InteropServices.ComTypes.EXCEPINFO | Contains exception information generated when the script /// terminated, or null if no exception was generated |
return | void |
public OnStateChange ( ScriptState scriptState ) : void | ||
scriptState | ScriptState | Indicates the new script state |
return | void |
public SetProperty ( string propertyName, object value ) : void | ||
propertyName | string | Name of property |
value | object | Value of property |
return | void |