[python-win32] win32com. Python long to VARIANT conversion patch.

Ilya Bobir ilya at afortio.kiev.ua
Fri May 5 18:12:24 CEST 2006


I'm new to this thread, so please excuse me if this already been 
discussed or have already been patched.

While working with COM I've noticed that sometimes Python long values 
does not convert correctly to COM VARIANT (I assumed that 
VT_{I4,UI4,I8,UI8,BSTR} should be used).  I was able to workaround this 
problem in my case, but later, after reading conversion source, I've 
came to conclusion that it is possible to write a better conversion for 
this case (long -> VARIANT).  Here is goes.

This source was not tested, not even been compiled, because I don't have 
set environment to build and test.  This is a draft that, I believe, 
could be of some use to someone else.
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: oleargs.cpp.patch
Url: http://mail.python.org/pipermail/python-win32/attachments/20060505/1a01ae7b/attachment.pot 

More information about the Python-win32 mailing list