IWMSCommandContext::GetCommandRequest

banner art

Previous Next

IWMSCommandContext::GetCommandRequest

The GetCommandRequest method retrieves a pointer to an IWMSContext interface containing a command request context. You can use the pointer to retrieve values from the context.

Syntax

  HRESULT GetCommandRequest(
  IWMSContext**  ppProps
);

Parameters

ppProps

[out] Pointer to a pointer to an IWMSContext interface.

Return Values

If the method succeeds, it returns S_OK. If it fails, it returns an HRESULT error code.

Return code Number Description
E_INVALIDARG 0x80070057 The ppProps parameter is NULL.

Example Code

// Declare variables.
IWMSContext *pCommandRequest = NULL;
long fCreatingNewPublishingPoint = 0;

// Retrieve the command request context.
hr = pCommandCtx->GetCommandRequest( &pCommandRequest );
if( SUCCEEDED( hr ) )
{
    if( NULL != pCommandRequest )
    {
       // Use the command request context to determine whether
       // the server is creating a new publishing point.
       hr = pCommandRequest->GetLongValue( WMS_COMMAND_CONTEXT_PUSH_CREATING_NEW_PUBLISHING_POINT,
                                           WMS_COMMAND_CONTEXT_PUSH_CREATING_NEW_PUBLISHING_POINT_ID,
                                           &fCreatingNewPublishingPoint,
                                           0 );

          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