Share via


IWMSCommandContext::EraseCommandRequest

banner art

Previous Next

IWMSCommandContext::EraseCommandRequest

The EraseCommandRequest method deletes a client request by erasing all of the name-value pairs in the command request context.

Syntax

  HRESULT EraseCommandRequest();

Parameters

This method takes no parameters.

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 client request is empty.

Remarks

For more information about creating a command context, see IWMSClassObject::AllocIWMSCommandContext.

Example Code

// This example illustrates how to create a new command
// request context or reuse an existing one by erasing its
// contents. The server sends your plug-in a pointer to the
// IWMSClassObject interface, pClassFactory, when it calls the
// IWMSBasicPlugin::InitializePlugin method.
if ( NULL == pContext)
{
    hr = pClassFactory->AllocIWMSContext( IID_IWMSContext,
                             WMS_COMMAND_REQUEST_CONTEXT_TYPE,
                             pUserContext,
                             &pContext );
    if (FAILED(hr)) goto EXIT;
}
else
{
    // Reuse an existing context.
    hr = pContext->EraseCommandRequest( );
    if (FAILED(hr)) goto EXIT;
}

EXIT:
    // TODO: Release temporary objects.

Requirements

Header: wmscontext.h.

Library: WMSServerTypeLib.dll.

Platform: Windows Server 2003, Enterprise Edition; Windows Server 2003, Datacenter Edition; Windows Server 2008.

See Also

Previous Next