Why does the Win32 OleGetClipboard () function return CLIPBRD_E_CANT_OPEN?

Under what circumstances will the Win32 OleGetClipboard () API function fail and return CLIPBRD_E_CANT_OPEN?

Additional Information: I am helping to fix bugs in Firefox. Details here:

error 444800 - cannot get image data from the clipboard in lossless format

In the automatic test that I helped write, we see that OleGetClipboard () sometimes fails and returns CLIPBRD_E_CANT_OPEN. This is unexpected, and the Firefox code to pull the image data from the Windows clipboard depends on the successful call.

+3
source share
3 answers

, OleGetClipboard , OpenClipboard . , , :

" OpenClipboard , ."

: . , , .

+5
0

From what I see on MSDN, it seems to imply that the problem is due to the one who tried to actually put the data on the clipboard, i, .e. data source. If their call to OleSetClipboard () failed, for any reason, you will not be able to retrieve the material. I would like to see how the data is placed on the clipboard, and see if there is a test case (copying data to the clipboard), and then it causes the problem you are talking about.

0
source

Source: https://habr.com/ru/post/1697573/


All Articles