IWMSActiveScriptAdmin.ErrorText (Visual Basic .NET)

The ErrorText property retrieves the text of the last error that occurred in the script when loaded by the script engine.

String = IWMSActiveScriptAdmin.ErrorText

Property Value

A String containing the error text.

Remarks

This property is read-only.

Example

Imports Microsoft.WindowsMediaServices.Interop
Imports System.Runtime.InteropServices

Private Sub GetErrorText()

    ' Declare variables.
    Dim Server As WMSServer
    Dim Plugin As IWMSPlugin
    Dim ActiveScriptAdmin As IWMSActiveScriptAdmin
    Dim ErrorText As String

Try
    ' Create the WMSServer object.
    Server = New WMSServer()

    ' Retrieve the plug-in to be configured.
    Plugin = Server.EventHandlers.Item( _
         "WMS Active Script Event Handler")

    ' Retrieve the custom interface of the plug-in.
    ActiveScriptAdmin = Plugin.CustomInterface

    ' Retrieve the text of the last known script error.
    ErrorText = ActiveScriptAdmin.ErrorText

Catch excCom As COMException
    ' TODO: Handle COM exceptions.
Catch exc As Exception
    ' TODO: Handle errors.
Finally
    ' TODO: Clean-up code goes here.
End Try

End Sub

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

Reference

IWMSActiveScriptAdmin Object (Visual Basic .NET)