|
OleQueryCreateFromData
Checks whether a data object has one of the formats that would allow it to
become an embedded object through a call to either the OleCreateFromData or OleCreateStaticFromData function.
STDAPI OleQueryCreateFromData(
IDataObject * pSrcDataObject
| //Points to the data transfer object to be queried
| );
|
|
Parameter
pSrcDataObject
Points to the data transfer object to be queried.
Return Values
S_OK
Indicates formats that support embedded-object creation are present.
S_FALSE
Indicates no formats are present that support either embedded- or
static-object creation.
OLE_S_STATIC
Indicates formats that support static-object creation are present.
Comments
When an application retrieves a data transfer object through a call to the OleGetClipboard function, the application should call OleQueryCreateFromData as part of the process of deciding to enable or disable the Edit/Paste or Edit/Paste Special... commands. It tests for the presence of the following formats in the data
object:
CF_EMBEDDEDOBJECT
CF_EMBEDSOURCE
cfFileName
CF_METAFILEPICT
CF_DIB
CF_BITMAP
Determining that the data object has one of these formats does not absolutely
guarantee that the object creation will succeed, but is intended to help the
process.
If OleQueryCreateFromData finds one of the CF_METAFILEPICT, CF_BITMAP, or CF_DIB formats and none of
the other formats, it returns OLE_S_STATIC, indicating that you should call the OleCreateStaticFromData function to create the embedded object.
If OleQueryCreateFromData finds one of the other formats (CF_EMBEDDEDOBJECT, CF_EMBEDSOURCE, or
cfFileName), even in combination with the static formats, it returns S_OK, indicating
that you should call the OleCreateFromData function to create the embedded object.
See Also
OleCreateFromData, OleCreateStaticFromData, OleQueryLinkFromData
Related LinksSoftware for Delphi and C++ Builder developers Software for Visual Studio .NET developers Software for Visual Basic 6 developers Delphi Tips&Tricks MegaDetailed.NET More Online Helps Win32 Programmer's Reference (win32.hlp) Win32 Multimedia Programmer's Reference (mmedia.hlp) Microsoft Windows Pen API Programmer's Reference (penapi.hlp) Microsoft Windows Sockets 2 Reference (sock2.hlp) Microsoft Windows Telephony API (TAPI) Programmer's Reference (sock2.hlp) Unix Manual Pages
|