CDataPathProperty::Open
Call this member function to initiate loading of the asynchronous property for the associated control.
virtual BOOL Open(
COleControl* pControl,
CFileException* pError = NULL
);
virtual BOOL Open(
LPCTSTR lpszPath,
COleControl* pControl,
CFileException* pError = NULL
);
virtual BOOL Open(
LPCTSTR lpszPath,
CFileException* pError = NULL
);
virtual BOOL Open(
CFileException* pError = NULL
);
Parameters
pControl
A pointer to the OLE control object to be associated with this CDataPathProperty object.pError
A pointer to a file exception. In the event of an error, will be set to the cause.lpszPath
The path, which may be absolute or relative, used to create an asynchronous moniker that references the actual absolute location of the property. CDataPathProperty uses URLs, not filenames. If you want a CDataPathProperty object for a file, prepend file:// to the path.
Return Value
Nonzero if successful; otherwise 0.
Remarks
The function attempts to obtain the IBindHost interface from the control.
Before calling Open without a path, the value for the property's path must be set. This can be done when the object is constructed, or by calling the SetPath member function.
Before calling Open without a control, an ActiveX control (formerly known as an OLE control) can be associated with the object. This can be done when the object is constructed, or by calling SetControl.
All overloads of CAsyncMonikerFile::Open are also available from CDataPathProperty.
Requirements
Header: afxctl.h
See Also
Reference
CDataPathProperty::CDataPathProperty