| Previous | Next |
| TAPI_E_SERVICE_NOT_RUNNING | DV_E_DVTARGETDEVICE |
DV_E_FORMATETC
Invalid FORMATETC structure
DV_E_FORMATETC is HRESULT 0x80040064. It means an OLE/COM data-transfer operation rejected the supplied FORMATETC description. FORMATETC describes the requested clipboard format, target device, display aspect, index, and acceptable storage media.
What to check
- Verify
cfFormatis the intended registered clipboard format. - Initialize
dwAspectand normally useDVASPECT_CONTENTunless another aspect is explicitly supported. - Check
lindex; many formats require-1. - Make sure the
tymedmask intersects the media types advertised by the data object. - If
ptdis non-null, validate the completeDVTARGETDEVICEbuffer and its offsets.
Keep the exact IDataObject method together with the rejected FORMATETC. For QueryGetData or GetData, compare it with the formats returned by EnumFormatEtc; do not silently “repair” the descriptor before recording the failing values.
Related results
DV_E_TYMED specifically points to an unsupported storage-medium choice. DV_E_DVTARGETDEVICE points to the target-device descriptor. DV_E_FORMATETC is the broader rejection of the requested format contract.
Example
A drag source leaves dwAspect uninitialized and asks for TYMED_HGLOBAL. Initializing the structure with DVASPECT_CONTENT, lindex = -1, and a medium supported by the destination resolves the mismatch.
References
Looking for a different code? Search another status or error code.
