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 |
IWMSContext::SetQwordValue
The SetQwordValue method specifies a CURRENCY value in the context.
Syntax
HRESULT SetQwordValue( LPCWSTR pstrName, long lNameHint, CURRENCY qwValue, long lOptions );
Parameters
pstrName
[in] LPCWSTR specifying 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.
qwValue
[in] CURRENCY value for the context. CURRENCY is a 64 bit value.
lOptions
[in] long containing either zero or the WMS_CONTEXT_SET_PROPERTY_NAME_BY_VALUE enumeration flag defined in the WMS_CONTEXT_OPTIONS enumeration type. By default, the name is specified by reference.
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 pstrName parameter is NULL. |
| E_OUTOFMEMORY | 0x8007000E | Could not allocate memory for the value. |
Example Code
// Use a pointer to the presentation context to
// create a temporary property that points to a
// user-defined object.
if ( NULL != pPresentationContext )
{
QWORD qwValue = ( QWORD ) ( ( CCacheEntry* ) this );
hr = pPresentationContext->SetQwordValue(
L"CCacheEntry Class Pointer",
WMS_CONTEXT_NO_NAME_HINT,
* ( ( CURRENCY * ) &qwValue ),
WMS_CONTEXT_SET_PROPERTY_NAME_BY_VALUE
);
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 |