IWMSPublishingPoint.MonikerName (C#)

banner art

Previous Next

IWMSPublishingPoint.MonikerName (C#)

The MonikerName property retrieves the moniker name of a publishing point.

Syntax

  string = IWMSPublishingPoint.Name;

Property Value

A string containing the moniker name.

If this property fails, it throws an exception.

Number Description
0xC00D145A You cannot retrieve the moniker name because the publishing point has been removed from the server.

Remarks

A moniker is a persistent COM component that encapsulates both the ability to locate an object or data and to retrieve that object or data into memory. The display name can be used to create the object, in this case a publishing point.

Example Code

The following example retrieves the moniker name for the default on-demand publishing point included with Windows Media Services. The name of this publishing point is simply a forward slash, and the moniker name equals "WMSServer:server_name\Publishing Points\/".

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

// Declare variables.
WMSServer            Server;
IWMSPublishingPoint  PubPoint;
string               MonikerName;

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

    // Retrieve the default publishing point.
    PubPoint = Server.PublishingPoints["/"];

    // Retrieve the moniker name.
    MonikerName = PubPoint.MonikerName;

}
catch (COMException comExc) {
    // TODO: Handle COM exceptions.
}
catch (Exception) 
{
    // 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