Home COM GDI+ WebBrowser Data Access

IOleCache Interface

 

IID_IOleCache

{0000011E-0000-0000-C000-000000000046}

 

 

The IOleCache interface provides control of the presentation data that gets cached inside of an object. Cached presentation data is available to the container of the object even when the server application is not running or is unavailable.

 

The IOleCache interface can be implemented by an object handler and an in-process server. In general, however, the methods of IOleCache are implemented as part of the IOleCache2 interface, which inherits the IOleCache definition, and adds methods for selectively updating the cache. Rather than implementing, however, it is typical to use or aggregate the OLE implementation, a pointer to which is available through a call to CreateDataCache.

 

A client calls the methods of IOleCache to control what the data cache holds. A typical client would be an OLE Documents container that would cache an object's presentation so it is available without the object actually being active.

 

 

Methods in VTable order

IUnknown Methods

Description

QueryInterface

Returns pointers to supported interfaces.

AddRef

Increments reference count.

Release

Decrements reference count.

IOleCache Methods

Description

Cache

Adds a presentation to the data or view cache.

Uncache

Removes a presentation previously added with IOleCache::Cache.

EnumCache

Returns an object to enumerate the current cache connections.

InitCache

Fills the cache with all the presentation data from the data object.

SetData

Fills the cache with specified format of presentation data.

 

Cache

 

FUNCTION IOleCache_Cache ( _

  BYVAL pthis AS DWORD PTR _

, BYREF pformatetc AS FORMATETC _

, BYVAL advf AS DWORD _

, BYREF pdwConnection AS DWORD _

  ) AS LONG
 

  LOCAL HRESULT AS LONG
  CALL DWORD @@pthis[3] USING IOleCache_Cache (pthis, pformatetc, advf, pdwConnection) TO HRESULT
  FUNCTION = HRESULT


END FUNCTION

 

 

Uncache

 

FUNCTION IOleCache_Uncache ( _

  BYVAL pthis AS DWORD PTR _

, BYVAL dwConnection AS DWORD _

  ) AS LONG
 

  LOCAL HRESULT AS LONG
  CALL DWORD @@pthis[4] USING IOleCache_Uncache (pthis, dwConnection) TO HRESULT
  FUNCTION = HRESULT


END FUNCTION

 

 

EnumCache

 

FUNCTION IOleCache_EnumCache ( _

  BYVAL pthis AS DWORD PTR _

, BYREF ppenumSTATDATA AS DWORD _

  ) AS LONG
 

  LOCAL HRESULT AS LONG
  CALL DWORD @@pthis[5] USING IOleCache_EnumCache (pthis, ppenumSTATDATA) TO HRESULT
  FUNCTION = HRESULT


END FUNCTION

 

 

InitCache

 

FUNCTION IOleCache_InitCache ( _

  BYVAL pthis AS DWORD PTR _

, BYVAL pDataObject AS DWORD _

  ) AS LONG
 

  LOCAL HRESULT AS LONG
  CALL DWORD @@pthis[6] USING IOleCache_InitCache (pthis, pDataObject) TO HRESULT
  FUNCTION = HRESULT


END FUNCTION

 

 

SetData

 

FUNCTION IOleCache_SetData ( _

  BYVAL pthis AS DWORD PTR _

, BYREF pformatetc AS FORMATETC _

, BYREF pmedium AS STGMEDIUM _

, BYVAL fRelease AS LONG _

  ) AS LONG
 

  LOCAL HRESULT AS LONG
  CALL DWORD @@pthis[7] USING IOleCache_SetData (pthis, pformatetc, pmedium, fRelease) TO HRESULT
  FUNCTION = HRESULT


END FUNCTION

 

 

Page last updated on Monday, 03 April 2006 20:30:23 +0200