IWMSPlugin Object (C#)
You can use the IWMSPlugin object to manage a plug-in. The IWMSPlugin object exposes the following properties.
Property |
Description |
---|---|
CLSID |
Retrieves the CLSID of the plug-in. |
CustomInterface |
Retrieves the administration object for the plug-in. |
Enabled |
Specifies and retrieves a Boolean value indicating whether the plug-in is enabled. |
ErrorCode |
Retrieves an HRESULT error code for the plug-in. |
ErrorText |
Retrieves the text associated with the plug-in error. |
LoadType |
Specifies and retrieves an enumeration value that indicates whether the server loads authentication, event notification, and authorization plug-ins as in-process or out-of-process objects. |
MonikerName |
Retrieves the moniker display name for a plug-in. |
Name |
Specifies and retrieves the name of a specific instance of the IWMSPlugin object. |
Properties |
Retrieves an IWMSNamedValues collection containing name-value pairs that describe the plug-in. |
SelectionOrder |
Specifies and retrieves a zero-based value that is used by the server to determine the order in which a plug-in will be selected for use. |
Status |
Retrieves the status of the plug-in. |
SupportStatus |
Retrieves an enumeration value that indicates which version of Windows Server is required to load the plug-in. |
Version |
Retrieves the version number of the plug-in. |
Example
The following example illustrates how to retrieve an IWMSPlugin object.
using Microsoft.WindowsMediaServices.Interop;
using System.Runtime.InteropServices;
// Declare variables.
WMSServer Server;
IWMSPlugins Plugins;
IWMSPlugin Plugin;
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];
}
}
catch (COMException comExc) {
// TODO: Handle COM exceptions.
}
catch (Exception e) {
// TODO: Handle exceptions.
}