Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
.gif)
| Previous | Next |
IWMSCommandContext::EraseCommandResponse
The EraseCommandResponse method deletes a server response by erasing all of the name-value pairs in the command response context.
Syntax
HRESULT EraseCommandResponse();
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 server response 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
// response 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_RESPONSE_CONTEXT_TYPE,
pUserContext,
&pContext );
if (FAILED(hr)) goto EXIT;
}
else
{
// Reuse an existing context.
hr = pContext->EraseCommandResponse( );
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 |