Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Windows Management Instrumentation (WMI) provides a flexible mechanism for delivering events through the WMS WMI Event Handler plug-in. The server registers as an event provider for WMI through event classes that you can manage by using the IWMSWMIBridgeAdmin object.
The IWMSWMIBridgeAdmin object exposes the following property.
Property |
Description |
---|---|
ExposedEventClasses |
Specifies and retrieves the exposed event classes. |
Example
The following example illustrates how to retrieve an IWMSWMIBridgeAdmin object.
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;
}
catch (COMException comExc) {
// TODO: Handle COM exceptions.
}
catch (Exception e) {
// TODO: Handle exceptions.
}