Click or drag to resize

CCacheEntry<T>::Invalidate

Invalidates a cache entry so that the next set or get operation results in communication with the instrument.

virtual void CCacheEntry<T>::Invalidate();
Example

The following example demonstrates use of the Invalidate function.

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

   // We want to couple the frequency to the bandwidth, so we must
   // invalidate the cached bandwidth whenever the frequency changes

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

   // Invalidate the entry
   pEntry->Invalidate();

  return hr;
}
See Also

Download a complete CHM version of this documentation here.