Share via


IWMSFileDescriptions Interface

banner art

Previous Next

IWMSFileDescriptions Interface

The IWMSFileDescriptions interface contains a collection of IWMSFileDescription interfaces.

In addition to the methods inherited from IDispatch, the IWMSFileDescriptions interface exposes the following methods.

Method Description
CreateDataSourceDirectory Creates a new directory that can be used to store content.
Delete Removes an IWMSFileDescription interface from the IWMSFileDescriptions collection.
get_Count Retrieves the number of IWMSFileDescription interfaces contained in the IWMSFileDescriptions collection.
get_Item Retrieves an IWMSFileDescription interface from the IWMSFileDescriptions collection.
get_length Retrieves the number of IWMSFileDescription interfaces contained in the IWMSFileDescriptions collection. This method is provided for JScript compatibility.

Example Code

The following example illustrates how to retrieve a pointer to an IWMSFileDescriptions interface.

#include <windows.h>
#include <atlbase.h>    // Includes CComBSTR.
#include "wmsserver.h"

// Declare variables and interfaces.
IWMSServer              *pServer;
IWMSFileDescriptions    *pFileDescriptions;

HRESULT         hr;
CComBSTR        bstrPath;

// 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 IWMSFileDescriptions interface.
bstrPath = "file://c:\\wmpub\\wmroot";
hr = pServer->get_FileDescriptions(bstrPath,
                                   WMS_FILE_UNSPECIFIED,
                                   &pFileDescriptions);
if (FAILED(hr)) goto EXIT;

EXIT:
    // TODO: Release temporary COM objects and uninitialize COM.

See Also

Previous Next