Export (0) Print
Expand All
This topic has not yet been rated - Rate this topic

CreateDataCache function

Retrieves a pointer to a new instance of an OLE-provided implementation of a data cache.

Syntax


HRESULT CreateDataCache(
  _In_   LPUNKNOWN pUnkOuter,
  _In_   REFCLSID rclsid,
  _In_   REFIID iid,
  _Out_  LPVOID *ppv
);

Parameters

pUnkOuter [in]

If the cache is to be created as part of an aggregate, pointer to the controlling IUnknown of the aggregate. If not, the parameter should be NULL.

rclsid [in]

CLSID used to generate icon labels. This value is typically CLSID_NULL.

iid [in]

Reference to the identifier of the interface the caller wants to use to communicate with the cache. This value is typically IID_IOleCache (defined in the OLE headers to equal the interface identifier for IOleCache).

ppv [out]

Address of pointer variable that receives the interface pointer requested in riid. Upon successful return, *ppvObj contains the requested interface pointer to the supplied cache object.

Return value

This function returns S_OK on success. Other possible values include the following.

Return codeDescription
E_NOINTERFACE

The interface represented by riid is not supported by the object. The parameter ppvObj is set to NULL.

E_OUTOFMEMORY

Insufficient memory for the operation.

E_INVALIDARG

One or more parameters are invalid.

 

Remarks

The cache object created by CreateDataCache supports the IOleCache, IOleCache2, and IOleCacheControl interfaces for controlling the cache. It also supports the IPersistStorage, IDataObject (without advise sinks), IViewObject, and IViewObject2 interfaces.

Requirements

Minimum supported client

Windows 2000 Professional [desktop apps only]

Minimum supported server

Windows 2000 Server [desktop apps only]

Header

ObjBase.h

Library

Ole32.lib

DLL

Ole32.dll

See also

IOleCache
IOleCache2
IOleCacheControl

 

 

Community Additions

ADD
Show:
© 2014 Microsoft. All rights reserved.