IWMSCacheProxyPlugin Interface
Previous | Next |
IWMSCacheProxyPlugin Interface
The IWMSCacheProxyPlugin interface enables you to prestuff a cache and retrieve specific cache items.
In addition to the methods inherited from IWMSPlugin, the IWMSCacheProxyPlugin interface exposes the following methods.
Method | Description |
get_CacheItems | Retrieves an IWMSCacheItems interface containing a collection of IWMSCacheItem interfaces. |
PreStuff | Fills a cache with content. |
Example Code
The following example illustrates how to retrieve a pointer to an IWMSCacheProxyPlugin interface.
#include <windows.h> #include <atlbase.h> // Includes CComVariant. #include "wmsserver.h" // Declare variables and interfaces. IWMSServer *pServer; IWMSPlugins *pPlugins; IWMSPlugin *pPlugin; IWMSCacheProxyPlugin *pCacheProxyPlugin; 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 // that contains cache proxy plug-ins. hr = pServer->get_CacheProxy(&pPlugins); if (FAILED(hr)) goto EXIT; hr = pPlugins->get_Count(&lCount); if (FAILED(hr)) goto EXIT; // Retrieve the IWMSPlugin interface for the // first cache proxy plug-in. varIndex = 0; hr = pPlugins->get_Item(varIndex, &pPlugin); if (FAILED(hr)) goto EXIT; // Retrieve a pointer to the IWMSCacheProxyPlugin interface. hr = pPlugin->QueryInterface(IID_IWMSCacheProxyPlugin, (void **)&pCacheProxyPlugin); if (FAILED(hr)) goto EXIT; EXIT: // TODO: Release temporary COM objects and uninitialize COM.
See Also
Previous | Next |