Share via


IWMSWMIBridgeAdmin.ExposedEventClasses (Visual Basic .NET)

banner art

Previous Next

IWMSWMIBridgeAdmin.ExposedEventClasses (Visual Basic .NET)

The ExposedEventClasses property specifies and retrieves an enumeration value containing the event class.

Syntax

  IWMSWMIBridgeAdmin
  .ExposedEventClasses = WMS_EVENT_CLASS
WMS_EVENT_CLASS = IWMSWMIBridgeAdmin.ExposedEventClasses

Property Value

A member of a WMS_EVENT_CLASS enumeration value containing the event class. This must be one of the following values.

Value Description
WMS_WMI_CLASS_UNKNOWN Indicates an unknown event class.
WMS_WMI_CLASS_CLIENT Indicates WMI events for the client.
WMS_WMI_CLASS_SERVER Indicates WMI events for the server.
WMS_WMI_CLASS_PUBLISHING_POINT Indicates WMI events for the publishing point.
WMS_WMI_CLASS_LIMIT_CHANGE Indicates WMI events for limit changes.
WMS_WMI_CLASS_LIMIT_HIT Indicates WMI events for limit hits.
WMS_WMI_CLASS_PLUGIN Indicates WMI events for plug-ins.
WMS_WMI_CLASS_CACHE Indicates WMI events for a cache.
WMS_WMI_CLASS_PLAYLIST Indicates WMI events for playlists.

If this property fails, it throws an exception.

Number Description
0x80004005 The server cannot find the WMS WMI Event Handler plug-in.

Example Code

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

Private Sub SetEventClass()

    ' Declare variables.
    Dim Server As WMSServer
    Dim Plugin As IWMSPlugin
    Dim WMIBridgeAdmin As IWMSWMIBridgeAdmin

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

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

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

    ' Set the event classes exposed by
    ' Windows Management Instrumentation.
    WMIBridgeAdmin.ExposedEventClasses = _
         WMS_EVENT_CLASS.WMS_WMI_CLASS_LIMIT_HIT Or _
         WMS_EVENT_CLASS.WMS_WMI_CLASS_SERVER Or _
         WMS_EVENT_CLASS.WMS_WMI_CLASS_PUBLISHING_POINT

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