IWMSNamedValue.Name (Visual Basic .NET)

The Name property retrieves the name portion of the name-value pair.

String = IWMSNamedValue.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.

Remarks

This property is read-only.

Example

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

Private Sub GetName()

    ' Declare variables.
    Dim Server As WMSServer
    Dim NamedValues As IWMSNamedValues
    Dim NamedValue As IWMSNamedValue
    Dim strName As String

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

    ' Retrieve the IWMSNamedValues object
    ' containing descriptive information about the server.
    NamedValues = Server.Properties

    ' Retrieve information about each name-value pair.
    For Each NamedValue In NamedValues
        ' Retrieve the name associated with this pair.
        strName = NamedValue.Name
    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

Reference

IWMSNamedValue Object (Visual Basic .NET)