IWMSActiveScriptAdmin Object (C#)
Previous | Next |
IWMSActiveScriptAdmin Object (C#)
The IWMSActiveScriptAdmin object is the administration object for the WMS Active Script Event Handler plug-in. This plug-in enables scripting-language access to the internal events raised by the server.
The IWMSActiveScriptAdmin object exposes the following properties.
Property | Description |
EnableDebugging | Specifies and retrieves a Boolean value that indicates whether the Microsoft Script Debugger can be used to debug the script. |
ErrorCharacterPosition | Retrieves the character position of the last error that occurred in the script when loaded by the script engine. |
ErrorLineNumber | Retrieves the line number of the last error that occurred in the script when loaded by the script engine. |
ErrorText | Retrieves the text of the last error that occurred in the script when loaded by the script engine. |
FileName | Sets and retrieves the path to the script file. |
Example Code
The following example illustrates how to retrieve an IWMSActiveScriptAdmin object.
using Microsoft.WindowsMediaServices.Interop; using System.Runtime.InteropServices; // Declare variables. WMSServer Server; IWMSPlugin Plugin; IWMSActiveScriptAdmin ActiveScriptAdmin; try { // Create a new WMSServer object. Server = new WMSServerClass(); // Retrieve the plug-in to be configured. Plugin = Server.EventHandlers[ "WMS Active Script Event Handler"]; // Retrieve the custom interface of the plug-in. ActiveScriptAdmin = (IWMSActiveScriptAdmin)Plugin.CustomInterface; } catch (COMException comExc) { // TODO: Handle COM exceptions. } catch (Exception e) { // TODO: Handle exceptions. }
See Also
Previous | Next |