Provides a potentially different but logically equivalent FORMATETC
structure. You use this method when you have different FORMATETC
structures that may return the same data.
| FORMATETC * pFormatetcIn,
||//Points to the FORMATETC structure that the caller would like to use
| FORMATETC * pFormatetcOut
||//Points to the canonical equivalent FORMATETC structure
[in]Points to the format, media, and target device that the caller would like
to use in a subsequent call to retrieve data, for example, IDataObject::GetData
. The TYMED
member is not significant and should be ignored.
[out]Points to a FORMATETC
structure that is canonically equivalent to pFormatetcIn
. The caller allocates this structure and this method fills in the data. In a
subsequent call to retrieve data, for example, IDataObject::GetData
, the caller uses the pFormatetcOut
value. This value is NULL if the method returns DATA_S_SAMEFORMATETC. The
TYMED member is not significant and should be ignored.
The returned FORMATETC
structure is different from the one that was passed.
One or more arguments are invalid.
An unexpected error occurred.
Structure was not created because the system ran out of memory.
structures are the same and NULL is returned in pFormatetcOut
Invalid value for lindex
; currently, only -1 is supported.
Invalid value for pFormatetc
Object application is not running.
A data object can return exactly the same data even though you have specified
structures in subsequent requests to retrieve data. For example, the same
data can be returned for different target devices if the data is not sensitive to
the target devices.
method provides the canonical equivalent of a specified FORMATETC
structure. By calling this function prior to retrieving the data object, you
can use the canonical equivalent FORMATETC
in your subsequent call to IDataObject::GetData
. You can then eliminate unnecessary calls to retrieve data if two different FORMATETC
structures have the same canonical equivalent.
If the data object never provides device-specific renderings, the
implementation of IDataObject::GetCanonicalFormatEtc
simply copies the input FORMATETC
to the output FORMATETC
, stores a NULL in the ptd
field of the output FORMATETC
, and returns DATA_S_SAMEFORMATETC.
- Software for developers
Software for Android Developers
- More information resources
Unix Manual Pages