Bugs item #3033529, was opened at 2010-07-23 22:38
Message generated for change (Comment added) made by mhammond
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=551954&aid=3033529&group_id=78018
Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: win32
Group: None
>Status: Closed
>Resolution: Fixed
Priority: 5
Private: No
Submitted By: Jason R. Coombs (jaraco)
Assigned to: Nobody/Anonymous (nobody)
Summary: error in GetClipboardData - handle invalid on GlobalLock
Initial Comment:
A long time ago, a user reported problems getting a bitmap from the Windows clipboard: http://mail.python.org/pipermail/python-win32/2001-May/000056.html
The tail end of that thread indicates that the patch was applied, but I see in the current code base, the NotImplementedError is not raised for CF_BITMAP. Instead, if I get the original error if I attempt to get a bitmap from the clipboard:
# after hitting PrtScn to put a bitmap on the clipboard
>>> import win32clipboard as wclip
>>> wclip.OpenClipboard()
>>> result = wclip.GetClipboardData(wclip.CF_BITMAP)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
pywintypes.error: (6, 'GetClipboardData:GlobalLock', 'The handle is invalid.')
If win32clipboard doesn't support the CF_BITMAP for GetClipboardData, it should provide a useful message indicating such, rather than a surprising message about an invalid handle.
----------------------------------------------------------------------
>Comment By: Mark Hammond (mhammond)
Date: 2010-08-30 12:35
Message:
Added support for CF_BITMAP and a simple test clipboard viewer.
Checking in src/win32clipboardmodule.cpp;
new revision: 1.27; previous revision: 1.26
Checking in Demos/win32clipboard_bitmapdemo.py;
initial revision: 1.1
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=551954&aid=3033529&group_id=78018
|