Click or drag to resize

CCacheEntry<T>::SetValid

Sets the valid state of a cache entry to true.

virtual void CCacheEntry<T>::SetValid()
Example

The following example demonstrates use of the SetValid function.

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

  hr = InstrPrintCommand(Frequency, Gain);

  if (SUCCEEDED(hr))
  {
     // ...

     // Retrieve the cache entry for the Frequency property
     CCacheEntry<double>* pEntry = GetOrCreateCacheEntry<double>(_T("IAcme4321.Frequency"));

     pEntry->SetValid();
  }     

  return hr;
}
See Also

Download a complete CHM version of this documentation here.