| Previous | Next |
| DV_E_CLIPFORMAT | DV_E_DVTARGETDEVICE_SIZE |
DV_E_DVASPECT
Invalid aspect(s)
When Windows returns DV_E_DVASPECT—HRESULT 2147745899, 0x8004006B, signed -2147221397—The documented description is “Invalid aspect(s)”. The actionable meaning is the requested DVASPECT value is not valid for the object or operation. The surrounding operation is selecting content, thumbnail, icon, or print presentation in FORMATETC and IViewObject calls.
Precise failure point
COM data-transfer structures are compound contracts: a field can be numerically well formed yet invalid for the provider, object instance, requested aspect, or ownership rules. Diagnosis therefore has to preserve the complete descriptor and the exact method that consumed it.
- Associate this result with one exact operation in IDataObject, FORMATETC/STGMEDIUM negotiation, data advisory enumeration, or OLE rendering.
- Confirm that this result came from selecting content, thumbnail, icon, or print presentation in FORMATETC and IViewObject calls, rather than from cleanup or a wrapper that ran afterward.
Diagnostic evidence
A useful incident records the IDataObject identity, method, clipboard format, aspect, lindex, tymed mask, target-device size, advisory cookie, and ownership of every returned interface or medium.
- Record the exact dwAspect bits and the rendering or transfer API.
- enumerate or query supported presentations before choosing a fallback.
- Check whether persistence contains a cached icon or thumbnail even when live content is available.
Resolution path
- Identify the exact object, method, and lifecycle phase involved in selecting content, thumbnail, icon, or print presentation in FORMATETC and IViewObject calls.
Distinct causes
- It can result when the object exposes DVASPECT_CONTENT but not DVASPECT_THUMBNAIL or DVASPECT_ICON.
- It can result when the caller combines aspect flags where the API expects one aspect.
- It can result when an object has no cached or live presentation for the requested aspect and index.
Retry policy
Correction. request an aspect the object advertises, or deliberately generate a fallback presentation in the container. Retry condition. Retry is appropriate after selecting another aspect or updating the cache; unchanged calls will remain invalid. Before repeating the operation, release every returned STGMEDIUM according to pUnkForRelease, retain advisory cookies only after successful DAdvise, and discard enumerated formats after the data object is replaced.
Practical scenario
A shell-style view asks an embedded document for DVASPECT_THUMBNAIL although it supplies only DVASPECT_CONTENT; rendering content into the application thumbnail pipeline is the correct fallback.
Difference from related HRESULTs
VIEW_E_DRAW means drawing an accepted view failed; it means the requested view category was not accepted.
Developer and administrator guidance
Copy complete FORMATETC and DVTARGETDEVICE structures, preserve signed lindex values, intersect tymed masks before requesting data, and encode STGMEDIUM ownership explicitly. Regression coverage should include provider-advertised versus caller-invented formats, supported and unsupported DVASPECT/tymed combinations, sentinel lindex values, malformed target-device sizes, and replacement during advisory callbacks.
Compare the data provider, consumer, and registered handler versions; repair a handler only when traces identify that provider as missing or incompatible.
References
Looking for a different code? Search another status or error code.
