IWMSPlugin Interface
Previous | Next |
IWMSPlugin Interface
You can use the IWMSPlugin interface to manage a plug-in.
In addition to the methods inherited from IDispatch, the IWMSPlugin interface exposes the following methods.
Method | Description |
get_CLSID | Retrieves the CLSID of the plug-in. |
get_CustomInterface | Retrieves a pointer to the administration interface for the plug-in. |
get_Enabled | Retrieves a Boolean value indicating whether the plug-in is enabled. |
get_ErrorCode | Retrieves an HRESULT error code for the plug-in. |
get_ErrorText | Retrieves the text associated with the plug-in error. |
get_LoadType | 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. |
get_MonikerName | Retrieves a moniker display name for a plug-in. |
get_Name | Retrieves the name of a specific instance of the IWMSPlugin interface. |
get_Properties | Retrieves an IWMSNamedValues collection containing name-value pairs that describe the plug-in. |
get_SelectionOrder | 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. |
get_Status | Retrieves the status of the plug-in. |
get_SupportStatus | Retrieves an enumeration value that indicates which member of the Windows Server family is required to load the plug-in. |
get_Version | Retrieves the version number of the plug-in. |
put_Enabled | Specifies a Boolean value indicating whether the plug-in is enabled. |
put_LoadType | Specifies an enumeration value that indicates whether the server loads authentication, event notification, and authorization plug-ins as in-process or out-of-process objects. |
put_Name | Specifies the name of a specific instance of the IWMSPlugin interface. |
put_SelectionOrder | Specifies a zero-based value that is used by the server to determine the order in which a plug-in will be selected for use. |
Example Code
The following example illustrates how to retrieve a pointer to an IWMSPlugin interface.
#include <windows.h> #include <atlbase.h> // Includes CComVariant. #include "wmsserver.h" // Declare variables and interfaces. IWMSServer *pServer; IWMSPlugins *pPlugins; IWMSPlugin *pPlugin; HRESULT hr; CComVariant varIndex; long lCount; // Initialize the COM library and retrieve a pointer // to an IWMSServer interface. hr = CoInitialize(NULL); hr = CoCreateInstance(CLSID_WMSServer, NULL, CLSCTX_ALL, IID_IWMSServer, (void **)&pServer); if (FAILED(hr)) goto EXIT; // Retrieve a pointer to an IWMSPlugins interface // and retrieve the total count of plug-ins. hr = pServer->get_Authenticators(&pPlugins); if (FAILED(hr)) goto EXIT; hr = pPlugins->get_Count(&lCount); if (FAILED(hr)) goto EXIT; for (long x = 0; x < lCount; x++) { varIndex = x; hr = pPlugins->get_Item(varIndex, &pPlugin); if (FAILED(hr)) goto EXIT; // Release temporary COM objects. pPlugin->Release(); } EXIT: // TODO: Release temporary COM objects and uninitialize COM.
See Also
Previous | Next |