Click or drag to resize

GetCacheEntryValue

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

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

[in] Name of property from which to retreive the cached value. For more information, see property identifiers.

pValue

[out] Cached value. If the value is not valid, then the value of this parameter is undefined.

Return Value

Returns true if the specified value is in the cache and is valid, otherwise false.

Example

The following example demonstrates use of the GetCacheEntryValue function.

C++
// CoAcme4321.cpp
STDMETHODIMP Acme4321::Configure(double Frequency, double Bandwidth)
{
  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.