Share via


IWMSPlugins.Item (Visual Basic .NET)

banner art

Previous Next

IWMSPlugins.Item (Visual Basic .NET)

The Item property retrieves an IWMSPlugin object from the IWMSPlugins collection.

Syntax

  IWMSPlugin = IWMSPlugins.Item(
  varIndex As Variant
)

Parameters

varIndex

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

Property Value

An IWMSPlugin object.

Remarks

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

Example Code

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

Try
    ' 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.
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