| Previous | Next |
| CLIPBRD_E_CANT_OPEN | CLIPBRD_E_CANT_SET |
CLIPBRD_E_CANT_EMPTY
CLIPBRD_E_CANT_EMPTY (0x800401D1) means that the operation failed while emptying the Windows clipboard. Treat it as a failure in the open/empty/publish clipboard transaction, not as evidence that the data you intended to copy is itself invalid.
What to check
- Verify that the calling path successfully opened the clipboard before attempting to empty it.
- Record the window passed to
OpenClipboard, the calling thread, and whether reentrant clipboard handling changed state between open and empty. - If the application plans to call
SetClipboardDataafter emptying, use a real owner window when appropriate; opening with a null window and then emptying leaves the clipboard owner null, which preventsSetClipboardDatafrom succeeding.
Recovery
Close any failed transaction, correct the clipboard ownership sequence, and repeat the complete open/empty/publish/close operation. Do not spin while keeping application locks held.
Technical references
Looking for a different code? Search another status or error code.