IWMSPlugin.Name (Visual Basic .NET)

banner art

Previous Next

IWMSPlugin.Name (Visual Basic .NET)

The Name property specifies and retrieves the name of a specific instance of the IWMSPlugin object.

Syntax

  Plugin
  .Name = String
String = Plugin.Name

Property Value

A String containing the name.

If this property fails, it returns an error number.

Number Description
0x8007000E There is insufficient memory to complete the function.
0xC00D0036L String is already being used by another plug-in in the current plug-in collection.
0xC00D1396L String contains an invalid character. Invalid characters are: & " ' < > \
0xC00D1394L String is a zero-length string.
0xC00D1392L String is longer than the maximum allowed length.

Remarks

You can use the IWMSPlugin.Name method to specify a name. You can also specify a name when you clone a plug-in using the IWMSPlugins.Clone method.

Example Code

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

Private Sub SetPluginName()

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

    ' Retrieve information about each plug-in.
    For Each Plugin In Plugins

        ' Retrieve the name of the plug-in.
        strText = Plugin.Name

        ' Change the displayed name of the plug-in.
        Plugin.Name = "Something"

    Next

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