IOleCache::InitCache method
Fills the cache as needed using the data provided by the specified data object.
Syntax
HRESULT InitCache(
[in] IDataObject *pDataObject
);
Parameters
- pDataObject [in]
-
A pointer to the IDataObject interface on the data object from which the cache is to be initialized.
Return value
This method returns S_OK on success. Other possible return values include the following.
| Return code | Description |
|---|---|
|
The pointer to the IDataObject interface is invalid. |
|
Insufficient memory is available for the operation. |
|
The cache is not running. |
|
None of the caches were updated. |
|
Only some of the existing caches were updated. |
Remarks
InitCache is usually used when creating an object from a drag-and-drop operation or from a clipboard paste operation. It fills the cache as needed with presentation data from all the data formats provided by the data object provided on the clipboard or in the drag-and-drop operation. Helper functions like OleCreateFromData or OleCreateLinkFromData call this method when needed. If a container does not use these helper functions to create compound document objects, it can use IOleCache::Cache to set up the cache entries which are then filled by InitCache.
Requirements
|
Minimum supported client |
Windows 2000 Professional [desktop apps only] |
|---|---|
|
Minimum supported server |
Windows 2000 Server [desktop apps only] |
|
Header |
|
|
IDL |
|
|
IID |
IID_IOleCache is defined as 0000011e-0000-0000-C000-000000000046 |
See also