Menu

#759 Win32clipboard: Delayed Rendering using setClipboardData(..., None) results in pywintypes.error

v1.0 (example)
open
nobody
None
5
2017-08-30
2017-08-30
No

Hello,

According to the documentation at http://docs.activestate.com/activepython/3.2/pywin32/win32clipboard__SetClipboardData_meth.html,
it should be possible to achieve delayed rendering of clipboard data when setting the second parameter of "win32clipboard.setClipboardData()" to 0. This doesn't work for me and results in the error "pywintypes.error: (0, 'SetClipboardData', 'No error message is available')".
Setting it to "None" doesn't work either and results in the same error.

Here's a short example code:

import win32clipboard

win32clipboard.OpenClipboard()
win32clipboard.EmptyClipboard()
try:
    win32clipboard.SetClipboardData(win32clipboard.CF_TEXT, 0)
finally:
    win32clipboard.CloseClipboard()

Best regards,
David

Discussion