IWMSPlugins.Item (Visual Basic .NET)

The Item property retrieves an IWMSPluginIWMSPlugin Object (Visual Basic .NET) from the IWMSPlugins collection.

IWMSPlugin = IWMSPlugins.Item(
  varIndex As Variant

Property Value

An IWMSPlugin object.



[in] Variant containing the index or name of the plug-in.


This property is read-only. You can use the IWMSPlugin.Name method to find the plug-in name.


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

Private Sub GetPluginItem()

    ' Declare variables.
    Dim Server As WMSServer
    Dim Plugins As IWMSPlugins
    Dim Plugin As IWMSPlugin
    Dim strText As String

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

    ' Retrieve the IWMSPlugins object.
    Plugins = Server.EventHandlers

    ' Retrieve information about each plug-in.
    For i = 0 To Plugins.Count - 1
        Plugin = Plugins.Item(i)
        ' Retrieve the name of the plug-in.
        strText = Plugin.Name
    Next i

Catch excCom As COMException
    ' TODO: Handle COM exceptions.
Catch exc As Exception
    ' TODO: Handle errors.
    ' TODO: Clean-up code goes here.
End Try

End Sub


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


IWMSPlugin Object (Visual Basic .NET)

IWMSPlugin.Name (Visual Basic .NET)

IWMSPlugins Object (Visual Basic .NET)