IWMSOnDemandPublishingPoint2 Interface
Previous | Next |
IWMSOnDemandPublishingPoint2 Interface
You can use the IWMSOnDemandPublishingPoint2 interface to enable Startup Profile for an on-demand publishing point.
- **Note **This interface is available only in Windows Server 2003, Enterprise Edition with Service Pack 1; Windows Server 2003, Datacenter Edition with Service Pack 1; and Windows Server 2008.
In addition to the methods inherited from IWMSOnDemandPublishingPoint, the IWMSOnDemandPublishingPoint2 interface exposes the following methods.
Method | Description |
get_AllowStartupProfile | Retrieves a Boolean value that indicates whether the publishing point allows the use of Startup Profile. |
put_AllowStartupProfile | Specifies a Boolean value that indicates whether the publishing point allows the use of Startup Profile. |
Example Code
The following example illustrates how to retrieve a pointer to an IWMSOnDemandPublishingPoint2 interface.
#include <windows.h> #include <atlbase.h> // Includes CComBSTR. #include "wmsserver.h" // Declare variables and interfaces. IWMSServer *pServer; IWMSPublishingPoints *pPubPoints; IWMSPublishingPoint *pPubPoint; IWMSOnDemandPublishingPoint2 *pODPubPoint2; 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 // IWMSOnDemandPublishingPoint2 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_IWMSOnDemandPublishingPoint2, (void **)&pODPubPoint2); if (FAILED(hr)) goto EXIT; pODPubPoint2->Release(); } // Release temporary COM objects. pPubPoint->Release(); } EXIT: // TODO: Release temporary COM objects and uninitialize COM.
See Also
Previous | Next |