Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
.gif)
| Previous | Next |
IWMSPlugin.Name (C#)
The Name property specifies and retrieves the name of a specific instance of the IWMSPlugin object.
Syntax
Plugin .Name = string; string = Plugin.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 plug-in in the current plug-in collection. |
| 0xC00D1396L | string contains an invalid character. Invalid characters are: & " ' < > \ |
| 0xC00D1394L | string is a zero-length string. |
| 0xC00D1392L | string is longer than the maximum allowed length. |
Remarks
You can use the IWMSPlugin.Name method to specify a name. You can also specify a name when you clone a plug-in using the IWMSPlugins.Clone method.
Example Code
using Microsoft.WindowsMediaServices.Interop;
using System.Runtime.InteropServices;
// Declare variables.
WMSServer Server;
IWMSPlugins Plugins;
IWMSPlugin Plugin;
string strText;
try {
// Create a new WMSServer object.
Server = new WMSServerClass();
// Retrieve the IWMSPlugins object.
Plugins = Server.Authenticators;
// Retrieve information about each plug-in.
for (int i = 0; i < Plugins.Count; i++)
{
Plugin = Plugins[i];
// Retrieve the name of the plug-in.
strText = Plugin.Name;
// Change the displayed name of the plug-in.
Plugin.Name = "Something";
}
}
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
| Previous | Next |