Click or drag to resize

CCacheEntry<T>::UpdateValue

Retrieves the value of a cache entry if the entry is valid.

template <typename T>
void GetCacheEntryValue(const CString& strKey, T* value);
Parameters
strKey

[in] Name of the property for which we want to retrieve the cached value. For more information, see the topic Property Identifiers.

value

[out] Value of cache entry. If the entry is not valid, then this value is undefined.

Example

The following example demonstrates use of the UpdateValue function.

C++
// CoAcme4321.cpp
STDMETHODIMP Acme4321::Configure(double Frequency, double Gain)
{
  HRESULT hr = S_OK;

  double dFreq = 0;
  GetCacheEntryValue(_T("IAcme4321.Frequency"), &dFreq);

  return hr;
}
See Also

Download a complete CHM version of this documentation here.