Share via


IWMSDiagnosticEvents.RemoveAll (Visual Basic .NET)

banner art

Previous Next

IWMSDiagnosticEvents.RemoveAll (Visual Basic .NET)

The RemoveAll method removes all IWMSDiagnosticEvent objects from the IWMSDiagnosticEvents collection.

Syntax

  IWMSDiagnosticEvents
  .RemoveAll()

Parameters

This method takes no parameters.

Return Values

This method does not return a value.

Example Code

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

Private Sub RemoveAllEvents()

    ' 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

    ' Remove all diagnostic events.
    DiagnosticEvents.RemoveAll()

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

Previous Next