Share via


IWMSDiagnosticEvents Object (Visual Basic .NET)

The IWMSDiagnosticEvents object contains a collection of IWMSDiagnosticEvent objects. The collection can contain a maximum of 100 IWMSDiagnosticEvent objects. When this limit is reached, the oldest object in the collection is replaced by the newest. Each IWMSDiagnosticEventIWMSDiagnosticEvent Object (Visual Basic .NET) that describes a unique server or publishing point limit is included only once in the collection, but the time and date are updated to reflect the most recent occurrence.

The IWMSDiagnosticEvents object exposes the following properties and methods.

Property

Description

Count

Retrieves the number of IWMSDiagnosticEvent objects contained in the IWMSDiagnosticEvents collection.

Item

Retrieves an IWMSDiagnosticEvent object from the IWMSDiagnosticEvents collection.

length

Retrieves the number of IWMSDiagnosticEvent objects contained in the IWMSDiagnosticEvents collection. This method is provided for JScript compatibility.

Method

Description

RemoveAll

Removes all IWMSDiagnosticEvent objects from the IWMSDiagnosticEvents collection.

Example

The following example illustrates how to retrieve an IWMSDiagnosticEvents object.

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

Private Sub RetrieveObj()

    ' Declare variables.
    Dim Server As WMSServer
    Dim DiagnosticEvents As IWMSDiagnosticEvents

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

    ' Retrieve the IWMSDiagnosticEvents object.
    DiagnosticEvents = Server.DiagnosticEvents

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

See Also

Reference

IWMSDiagnosticEvent Object (Visual Basic .NET)

Concepts

Server Object Model (Visual Basic .NET)