IWMSServer.Name (C#)

The Name property retrieves the server name.

string = IWMSServer.Name;

Property Value

A string that contains the name of the server.

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

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

// Declare variables.
WMSServer   Server;
string      strText;

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

    // Retrieve the displayed name of the server.
    strText = Server.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

Reference

IWMSServer Object (C#)