What is 0x800401D0

 
Previous Next
CONVERT10_E_STG_DIB_TO_BITMAP CLIPBRD_E_CANT_EMPTY

CLIPBRD_E_CANT_OPEN

CLIPBRD_E_CANT_OPEN (0x800401D0) error is returned by the OpenClipboard function. There can be two reasons for the error. This is either an invalid window handle (HWND) passed as a parameter (not null and not a valid window handle). Or the clipboard is already open in another window. A typical bug which causes this error is a missing call to CloseClipboard.

The Windows clipboard is a storage area for items the have been cut or copied. Whenever you cut or copy something, it is automatically placed in the clipboard for you. You can then "paste" a copy of the item from the clipboard to anywhere you want.

Technically, the clipboard is just a bit of physical memory (i.e. RAM) that has been set aside to hold any stuff that you might happen to copy or cut. It can only hold one item at a time, so when you cut or copy something, it replaces anything that is already in the clipboard.

You can keep pasting the contents of the clipboard as often as you like. Anything you put in the clipboard will remain there until you overwrite the contents by cutting or copying something else into the clipboard. (Or until you empty the clipboard by rebooting Windows).

OpenClipboard function

Opens the clipboard for examination and prevents other applications from modifying the clipboard content.

BOOL OpenClipboard( [in, optional] HWND hWndNewOwner );
[in, optional] hWndNewOwner

Type: HWND: A handle to the window to be associated with the open clipboard. If this parameter is NULL, the open clipboard is associated with the current task.

If the function succeeds, the return value is nonzero. If the function fails, the return value is zero. To get extended error information, call GetLastError.

OpenClipboard fails if another window has the clipboard open.

An application should call the CloseClipboard function after every successful call to OpenClipboard.

The window identified by the hWndNewOwner parameter does not become the clipboard owner unless the EmptyClipboard function is called.

If an application calls OpenClipboard with hwnd set to NULL, EmptyClipboard sets the clipboard owner to NULL; this causes SetClipboardData to fail.