Share via


IWMSPlugin.MonikerName (C#)

banner art

Previous Next

IWMSPlugin.MonikerName (C#)

The MonikerName property retrieves a moniker display name for a plug-in.

Syntax

  string = Plugin.MonikerName;

Property Value

A String containing the moniker name

If this property fails, it throws an exception.

Number Description
0xC00D003D The namespace containing the moniker name could not be opened.

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 plug-in.

Example Code

The following example retrieves the moniker name for the WMS Anonymous User Plug-in included with Windows Media Services. The moniker equals "WMSServer:server_name\Authentication\Object Store\WMS Anonymous User Authentication".

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

// Declare variables.
WMSServer          Server;
IWMSPlugin         Plugin;
string             MonikerName;

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

    // Retrieve the WMS Anonymous User Authentication plug-in.
    Plugin = Server.Authenticators["WMS Anonymous User Authentication"];

    // Retrieve the moniker name.
    MonikerName = Plugin.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