[issue5119] wide character parameter handling in ctypes

2009-02-03 Thread Amaury Forgeot d'Arc
Changes by Amaury Forgeot d'Arc amaur...@gmail.com: -- status: pending - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5119 ___ ___

[issue5119] wide character parameter handling in ctypes

2009-02-03 Thread Jason R. Coombs
Jason R. Coombs jar...@jaraco.com added the comment: Thanks for the excellent suggestion. Please close this issue. ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5119 ___

[issue5119] wide character parameter handling in ctypes

2009-02-02 Thread Jason R. Coombs
Jason R. Coombs jar...@jaraco.com added the comment: I see this in the documentation, which basically answers the question: windll does not try to select [wide or narrow functions] by magic, you must access the version you need by specifying GetModuleHandleA or GetModuleHandleW explicitely, and

[issue5119] wide character parameter handling in ctypes

2009-02-02 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: ctypes cannot guess the function signature, and does not know if the function expects strings or unicodes. In your examples, ctypes.windll.user32.MessageBoxW(handle, text, caption, type) will accept everything you pass, and create

[issue5119] wide character parameter handling in ctypes

2009-01-31 Thread Jason R. Coombs
Jason R. Coombs jar...@jaraco.com added the comment: I've confirmed that my original assumption was quite false, and that even if the parameters are the correct width, WNetAddConnection2W behaves differently in 64-bit windows versus 32-bit windows, so it made a bad test case. So I've changed