Partager via


IWMSOnDemandPublishingPoint Interface

You can use the IWMSOnDemandPublishingPoint interface to describe the properties of an on-demand publishing point.

In addition to the methods that are inherited from the IWMSPublishingPoint IWMSPublishingPoint Interface, the IWMSOnDemandPublishingPoint interface exposes the following methods.

Method

Description

ExportXML

Creates a file that contains publishing point configuration data.

get_AllowContentCaching

Retrieves a Boolean value that indicates whether content from the publishing point can be cached.

get_DownloadBandwidth

Reserved for future use.

get_EnableClientWildcardDirectoryAccess

Retrieves a Boolean value that indicates whether wildcard characters can be used to access files and directories.

get_EnableDownload

Reserved for future use.

put_AllowContentCaching

Specifies a Boolean value that indicates whether content from the publishing point can be cached.

put_DownloadBandwidth

Reserved for future use.

put_EnableClientWildcardDirectoryAccess

Specifies a Boolean value that indicates whether wildcard characters can be used to access files and directories.

put_EnableDownload

Reserved for future use.

Example

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

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

// Declare variables and interfaces.
IWMSServer                  *pServer;
IWMSPublishingPoints        *pPubPoints;
IWMSPublishingPoint         *pPubPoint;
IWMSOnDemandPublishingPoint *pODPubPoint;

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 the IWMSPublishingPoints
// interface and retrieve the number of publishing points.
hr = pServer->get_PublishingPoints(&pPubPoints);
if (FAILED(hr)) goto EXIT;
hr = pPubPoints->get_Count(&lCount);
if (FAILED(hr)) goto EXIT;

// Retrieve each publishing point and query the
// IWMSOnDemandPublishingPoint interface.
for (long x = 0; x < lCount; x++)
{
    varIndex = x;
    hr = pPubPoints->get_Item(varIndex, &pPubPoint);
    if (FAILED(hr)) goto EXIT;

    // Retrieve the type of publishing point.
    WMS_PUBLISHING_POINT_TYPE pptType;
    hr = pPubPoint->get_Type(&pptType);
    if (FAILED(hr)) goto EXIT;

    if (pptType == WMS_PUBLISHING_POINT_TYPE_ON_DEMAND)
    {
        hr = pPubPoint->QueryInterface(IID_IWMSOnDemandPublishingPoint,
                                      (void **)&pODPubPoint);
        if (FAILED(hr)) goto EXIT;

        pODPubPoint->Release();
    }

    // Release temporary COM objects.
    pPubPoint->Release();
}

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

See Also

Reference

IWMSPublishingPoint Interface

IWMSPublishingPoints Interface

Concepts

Server Object Model Interfaces (C++)