Share via


IWMSWMIBridgeAdmin Object (Visual Basic .NET)

banner art

Previous Next

IWMSWMIBridgeAdmin Object (Visual Basic .NET)

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 Code

The following example illustrates how to retrieve an IWMSWMIBridgeAdmin object.

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

Private Sub RetrieveObj()

    ' 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

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

Previous Next