Share via


IWMSNamedValue.Name (C#)

banner art

Previous Next

IWMSNamedValue.Name (C#)

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

Syntax

  string = IWMSNamedValue.Name;

Property Value

A string containing the name.

If this property fails, it throws an exception.

Number Description
0x8007000E There is insufficient memory to complete the function.

Remarks

This property is read-only.

Example Code

using Microsoft.WindowsMediaServices.Interop;
using System.Runtime.InteropServices;

// Declare variables.
WMSServer                   Server;
IWMSNamedValues             NamedValues;
IWMSNamedValue              NamedValue;

string                      strName;

try {
    // Create a new WMSServer object.
    Server = new WMSServerClass();

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

    // Retrieve information about each name-value pair.
    for (int i = 0; i < NamedValues.Count; i++)
    {
        NamedValue = NamedValues.get_Item(i);

        // Retrieve the name associated with this pair.
        strName = NamedValue.Name;
    }
}
catch (COMException comExc) {
    // TODO: Handle COM exceptions.
}
catch (Exception e) {
    // TODO: Handle exceptions.
}

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