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.
The GetCommandResponse method retrieves a pointer to an IWMSContextIWMSContext Interface containing a Command Context. You can use the pointer to retrieve name-value pairs that describe a server response to a client request.
HRESULT GetCommandResponse(
IWMSContext** ppProps
);
Arguments
ppProps |
[out] Pointer to a pointer to an IWMSContext interface. |
Return Value
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
// Declare variables.
LPWSTR wstrPPName = NULL;
IWMSContext* pCommandResponse = NULL;
// Use a pointer to the command context to retrieve the name
// of the publishing point to which a client is connected.
hr = pCommandCtx->GetCommandResponse( &pCommandResponse );
if( SUCCEEDED( hr ) )
{
if( NULL != pCommandResponse )
{
hr = pCommandResponse->GetStringValue(
WMS_COMMAND_CONTEXT_PUBPOINT_NAME,
WMS_COMMAND_CONTEXT_PUBPOINT_NAME_ID,
&wstrPPName,
0 );
if(FAILED(hr) || (NULL==wstrPPName)) goto EXIT:
}
}
EXIT:
// TODO: Release temporary objects and uninitialize COM.
Requirements
Header: wmscontext.h.
Library: WMSServerTypeLib.dll.
Platform: Windows Server 2003, Enterprise Edition; Windows Server 2003, Datacenter Edition; Windows Server 2008.