| Previous | Next |
| CLIPBRD_E_BAD_DATA | MK_E_CONNECTMANUALLY |
CLIPBRD_E_CANT_CLOSE
CLIPBRD_E_CANT_CLOSE (0x800401D4) means that CloseClipboard failed. Microsoft documents this result for OLE clipboard paths such as OleFlushClipboard, where OLE opens the clipboard, renders the offered data, and then closes the clipboard.
What to record
- The OLE clipboard operation that returned the HRESULT and whether data rendering had already occurred.
- The source
IDataObject, offered formats, and any failure or reentrancy that occurred during delayed rendering. - The calling thread/window and clipboard sequence number before and after the operation.
Why completion state matters
A close failure occurs at the end of the clipboard transaction, so do not assume the clipboard is unchanged. If OleFlushClipboard had already rendered formats before the close failed, inspect the resulting clipboard state before replaying publication.
Recovery
Fix the lifecycle or reentrancy issue that prevented a clean close, ensure every direct successful OpenClipboard has a matching CloseClipboard, and repeat the OLE operation only after establishing the current clipboard state.
Technical references
Looking for a different code? Search another status or error code.