IWMSLoggingAdmin::get_Dirty
Previous | Next |
IWMSLoggingAdmin::get_Dirty
The get_Dirty method retrieves a Boolean value indicating whether the currently running configuration is different from the stored configuration.
Syntax
HRESULT get_Dirty( VARIANT_BOOL* pfDirty );
Parameters
pfDirty
[out] Pointer to a VARIANT_BOOL indicating whether the currently running configuration is different from the stored configuration.
Return Values
If the method succeeds, it returns S_OK. If it fails, it returns an HRESULT error code.
Return code | Number | Description |
E_FAIL | 0x80004005 | The server cannot find the WMS Client Logging plug-in. |
E_POINTER | 0x80004003 | The pCycle parameter is NULL. |
Remarks
If a property is modified while the plug-in is enabled, this flag is set to TRUE. When this flag is set, the currently running profile of the plug-in is different from the stored profile. Changes to the profile will be applied when the plug-in is re-enabled. If a log is cycled or changes from disabled to enabled, the stored configuration is applied to the plug-in, and this flag is cleared.
When this flag is TRUE, the properties of the plug-in reflect the currently running instance of the plug-in. They do not reflect the stored configuration.
This property is read only.
Example Code
#include <windows.h> #include <atlbase.h> // Includes CComVariant. // To access system plug-in interfaces, the // entire type library must be imported as shown. #import "WMSServerTypeLib.dll" no_namespace named_guids \ raw_interfaces_only // Declare variables and interfaces. IWMSServer *pServer; IWMSPlugins *pPlugins; IWMSPlugin *pPlugin; IDispatch *pDispatch; IWMSLoggingAdmin *pLogAdmin; HRESULT hr; VARIANT_BOOL bDirty; CComVariant varIndex; // 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 // containing event handler plug-ins. hr = pServer->get_EventHandlers(&pPlugins); if (FAILED(hr)) goto EXIT; // Retrieve a pointer to the IWMSPlugin interface // of the plug-in to be configured. varIndex = "WMS Client Logging"; hr = pPlugins->get_Item(varIndex, &pPlugin); if (FAILED(hr)) goto EXIT; // Retrieve a pointer to the custom interface // of the plug-in. hr = pPlugin->get_CustomInterface(&pDispatch); if (FAILED(hr)) goto EXIT; // Query the specific administration interface // for the plug-in. hr = pDispatch->QueryInterface(IID_IWMSLoggingAdmin, (void **)&pLogAdmin); if (FAILED(hr)) goto EXIT; // Retrieve a Boolean value indicating // whether the log needs to be cycled // in order to use new configuration options. hr = pLogAdmin->get_Dirty(&bDirty); if (FAILED(hr)) goto EXIT; EXIT: // TODO: Release temporary COM objects and uninitialize COM.
Requirements
Library: WMSServerTypeLib.dll.
Platform: Windows Server 2003 family, Windows Server 2008 family.
See Also
Previous | Next |