IWMSContext::RemoveValue

banner art

Previous Next

IWMSContext::RemoveValue

The RemoveValue method removes a specific name-value pair from a context.

Syntax

  HRESULT RemoveValue(
  LPCWSTR  pstrName,
  long  lNameHint,
  long  lOptions
);

Parameters

pstrName

[in] LPCWSTR containing the name portion of the name-value pair in the context.

lNameHint

[in] long containing an optional key that can be used to more efficiently access a value.

lOptions

[in] Reserved for future use.

Return Values

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

Return code Number Description
DISP_E_BADINDEX 0x8002000B The property specified by the pstrName parameter could not be found.

Example Code

// Remove the current presentation context for the user.
HRESULT hr = pUserContext->RemoveValue( WMS_USER_PRESENTATION_CONTEXT,
                                        WMS_USER_PRESENTATION_CONTEXT_ID,
                                        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