IWMSPublishingPoint.Name (C#)

banner art

Previous Next

IWMSPublishingPoint.Name (C#)

The Name property specifies and retrieves the name of the publishing point.


  .Name = string;
string = IWMSPublishingPoint.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.
0xC00D0036L string is already being used by another publishing point.
0xC00D1455L string contains an invalid character. Invalid characters are: & " ' < > \ and the ANSI characters 0-31 and 127.
0xC00D1392L string is longer than the maximum length allowed.
0xC00D145AL The publishing point was already removed.
0xC00D1452L The method is not supported for cache proxy publishing points.


The name must be unique. You can indicate the home publishing point by specifying only the forward slash character (/). There can be only one home publishing point, and it can be either a broadcast or on-demand publishing point. A home publishing point is not mandatory, but it enables clients to connect using the shorter URL formats such as protocol://server_name and protocol://server_name/file_name.

All other publishing point names must not contain a leading or trailing /, but a / character is permitted in the middle of a name. The following characters are not permitted:

< > \ ? % & '  # { } | ^ [ ] `

White spaces are permitted in the name, but the server will strip leading and trailing white spaces.

Example Code

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

// Declare variables.
WMSServer              Server;
IWMSPublishingPoints   PubPoints;
IWMSPublishingPoint    PubPoint;

string                 strText;

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

    // Retrieve the IWMSPublishingPoints object.
    PubPoints = Server.PublishingPoints;

    // Retrieve information about each publishing point.
    for (int i = 0; i < PubPoints.Count; i++)
        PubPoint = PubPoints[i];

        // Retrieve the displayed name of the publishing point.
        strText = PubPoint.Name;

        // Change the name of the publishing point.
        strText = "Modified Pub Point Name";
        PubPoint.Name = strText;
catch (COMException comExc) {
    // TODO: Handle COM exceptions.
catch (Exception e) {
    // TODO: Handle exceptions.


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