COleDataObject::GetFileData
Call this function to create a CFile or CFile-derived object and to retrieve data in the specified format into a CFile pointer.
CFile* GetFileData(
CLIPFORMAT cfFormat,
LPFORMATETC lpFormatEtc = NULL
);
Parameters
cfFormat
The format in which data is to be returned. This parameter can be one of the predefined Clipboard formats or the value returned by the native Windows RegisterClipboardFormat function.lpFormatEtc
Points to a FORMATETC structure describing the format in which data is to be returned. Provide a value for this parameter if you want to specify additional format information beyond the Clipboard format specified by cfFormat. If it is NULL, the default values are used for the other fields in the FORMATETC structure.
Return Value
Pointer to the new CFile or CFile-derived object containing the data if successful; otherwise NULL.
Remarks
Depending on the medium the data is stored in, the actual type pointed to by the return value may be CFile, CSharedFile, or COleStreamFile.
Hinweis
The CFile object accessed by the return value of this function is owned by the caller. It is the responsibility of the caller to delete the CFile object, thereby closing the file.
For more information, see FORMATETC in the Windows SDK.
For more information, see RegisterClipboardFormat in the Windows SDK.
Requirements
Header: afxole.h