Share via


IWMSWMIBridgeAdmin.ExposedEventClasses (C#)

banner art

Previous Next

IWMSWMIBridgeAdmin.ExposedEventClasses (C#)

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

Syntax

  IWMSWMIBridgeAdmin
  .ExposedEventClasses = WMS_EVENT_CLASS;
WMS_EVENT_CLASS = IWMSWMIBridgeAdmin.ExposedEventClasses;

Property Value

A member of the WMS_EVENT_CLASS enumeration type indicating 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

using Microsoft.WindowsMediaServices.Interop;
using System.Runtime.InteropServices;

// Declare variables.
WMSServer Server;
IWMSPlugin Plugin;
IWMSWMIBridgeAdmin WMIBridgeAdmin;

try {
    // Create a new WMSServer object.
    Server = new WMSServerClass();

    // Retrieve the plug-in to be configured.
    Plugin = Server.EventHandlers[
                        "WMS WMI Event Handler"];

    // Retrieve the custom interface of the plug-in.
    WMIBridgeAdmin =
        (IWMSWMIBridgeAdmin)Plugin.CustomInterface;

    // Set the event classes exposed by
    // Windows Management Instrumentation.
    WMIBridgeAdmin.ExposedEventClasses =
                       WMS_EVENT_CLASS.WMS_WMI_CLASS_LIMIT_HIT |
                       WMS_EVENT_CLASS.WMS_WMI_CLASS_SERVER |
                       WMS_EVENT_CLASS.WMS_WMI_CLASS_PUBLISHING_POINT;
}
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