![]() | GetCacheEntryValue |
Retrieves the value of a cache entry if the entry is valid.
template <typename T> void GetCacheEntryValue(const CString& strKey, T* pValue);
[in] Name of property from which to retreive the cached value. For more information, see property identifiers.
[out] Cached value. If the value is not valid, then the value of this parameter is undefined.
Returns true if the specified value is in the cache and is valid, otherwise false.
The following example demonstrates use of the GetCacheEntryValue function.
// CoAcme4321.cpp STDMETHODIMP Acme4321::Configure(double Frequency, double Bandwidth) { HRESULT hr = S_OK; double dFreq = 0; GetCacheEntryValue(_T("IAcme4321.Frequency"), &dFreq); return hr; }