IWMSRootDirectories Interface
The IWMSRootDirectories interface contains a collection of root directory paths for the enabled data source plug-ins.
In addition to the methods inherited from IDispatch, the IWMSRootDirectories interface exposes the following methods.
Method |
Description |
---|---|
get_Count |
Retrieves the number of root directory paths in the IWMSRootDirectories collection. |
get_Item |
Retrieves a specific root directory path from the IWMSRootDirectories collection. |
get_length |
Retrieves the number of root directory paths in the IWMSRootDirectories collection. This method is provided for JScript compatibility. |
Example
The following example illustrates how to retrieve a pointer to an IWMSRootDirectories interface.
#include <windows.h>
#include "wmsserver.h"
// Declare variables and interfaces.
IWMSServer *pServer;
IWMSRootDirectories *pRootDirectories;
HRESULT hr;
// 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 IWMSRootDirectories
// interface.
hr = pServer->get_RootDirectories(&pRootDirectories);
if (FAILED(hr)) goto EXIT;
EXIT:
// TODO: Release temporary COM objects and uninitialize COM.