IWMSActiveScriptAdmin.ErrorLineNumber (C#)
.gif)
| Previous | Next |
IWMSActiveScriptAdmin.ErrorLineNumber (C#)
The ErrorLineNumber property retrieves the line number of the last error that occurred in the script when loaded by the script engine.
Syntax
int = ActiveScriptAdmin.ErrorLineNumber;
Property Value
int containing the error line number.
Remarks
This property is read-only.
Example Code
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;
// Retrieve the line number of the last known script error.
int iErrorLine = ActiveScriptAdmin.ErrorLineNumber;
}
catch (COMException comExc) {
// TODO: Handle COM exceptions.
}
catch (Exception e) {
// TODO: Handle exceptions.
}
Requirements
Reference: Add a reference to Microsoft.WindowsMediaServices.
Namespace: Microsoft.WindowsMediaServices.Interop.
Assembly: Microsoft.WindowsMediaServices.dll.
Library: WMSServerTypeLib.dll.
Platform: Windows ServerĀ 2003 family, Windows ServerĀ 2008 family.
See Also
| Previous | Next |