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::GetCommandResponse
The GetCommandResponse method retrieves a pointer to an IWMSContext interface containing a command context. You can use the pointer to retrieve name-value pairs that describe a server response to a client request.
Syntax
HRESULT GetCommandResponse( 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.
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.
See Also
| Previous | Next |