CCachedDataPathProperty Class


The new home for Visual Studio documentation is Visual Studio 2017 Documentation on

The latest version of this topic can be found at CCachedDataPathProperty Class.

Implements an OLE control property transferred asynchronously and cached in a memory file.

class CCachedDataPathProperty : public CDataPathProperty  

Public Constructors

CCachedDataPathProperty::CCachedDataPathPropertyConstructs a CCachedDataPathProperty object.

Public Data Members

CCachedDataPathProperty::m_CacheCMemFile object in which to cache data.

A memory file is stored in RAM rather than on disk and is useful for fast temporary transfers.

Along with CAysncMonikerFile and CDataPathProperty, CCachedDataPathProperty provides functionality for the use of asynchronous monikers in OLE controls. With CCachedDataPathProperty objects, you are able to transfer data asynchronously from a URL or file source and store it in a memory file via the m_Cache public variable. All the data is stored in the memory file, and there is no need to override OnDataAvailable unless you want to watch for notifications and respond. For example, if you are transferring a large .GIF file and want to notify your control that more data has arrived and it should redraw itself, override OnDataAvailable to make the notification.

The class CCachedDataPathProperty is derived from CDataPathProperty.

For more information about how to use asynchronous monikers and ActiveX controls in Internet applications, see the following topics:








Header: afxctl.h

Constructs a CCachedDataPathProperty object.

CCachedDataPathProperty(COleControl* pControl = NULL);

    LPCTSTR lpszPath,  
    COleControl* pControl = NULL);


A pointer to the ActiveX control object to be associated with this CCachedDataPathProperty object.

The path, which may be absolute or relative, used to create an asynchronous moniker that references the actual absolute location of the property. CCachedDataPathProperty uses URLs, not filenames. If you want a CCachedDataPathProperty object for a file, prepend file:// to the path.


The COleControl object pointed to by pControl is used by Open and retrieved by derived classes. If pControl is NULL, the control used with Open should be set with SetControl. If lpszPath is NULL, you can pass in the path through Open or set it with SetPath.

Contains the class name of the memory file into which data is cached.

CMemFile m_Cache;  


A memory file is stored in RAM rather than on disk.

CDataPathProperty Class
Hierarchy Chart
CDataPathProperty Class