[in] New value to store in the cache entry.
CCacheEntry<T>::UpdateValue
Stores a value in a cache entry and marks the entry as valid.
Syntax
Section titled “Syntax”void CCacheEntry<T>::UpdateValue(T value);Parameters
Section titled “Parameters”value
Example
Section titled “Example”The following example demonstrates use of the UpdateValue function.
STDMETHODIMP Acme4321::put_Bandwidth(double val){ HRESULT hr = S_OK;
// Send the new value to the instrument hr = InstrPrintCommand(val);
// If the instrument was updated successfully, update the cache entry // for the Bandwidth property so it reflects the new value if (SUCCEEDED(hr)) { CCacheEntry<double>* pEntry = GetOrCreateCacheEntry<double>(_T("IAcme4321.Bandwidth")); pEntry->UpdateValue(val); }
return hr;}See also
Section titled “See also”