IWMSPublishingPoint.MonikerName (Visual Basic .NET)

banner art

Previous Next

IWMSPublishingPoint.MonikerName (Visual Basic .NET)

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\/".

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

Private Sub GetMonikerName()

' Declare Variables
    Dim Server As WMSServer
    Dim PubPoint As IWMSPublishingPoint
    Dim MonikerName As String

Try
    ' Create the WMSServer object.
    Server = CreateObject("WMSServer.Server")

    ' Retrieve the default on-demand publishing point.
    PubPoint = Server.PublishingPoints.Item("/")

    ' Retrieve the moniker name.
    MonikerName = PubPoint.MonikerName

Catch excCom As COMException
    ' TODO: Handle COM exceptions.
Catch e As Exception
    ' TODO: Handle error.
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

Previous Next