[comtypes-users] Unsupported Variant - NotImplementedError: typecode 20 = 0x14
I have a c++ method that returns a LONGLONG data type. How can I get this value from comtypes and avoid this NotImplementedError exception? Thanks in advance! -Sandy begin:vcard fn:Alexander Sandy Walsh n:Walsh;Alexander Sandy org:Impath Networks adr:Suite 100;;42 Payzant Ave;Halifax;NS;B3B 1Z6;Canada email;internet:swa...@impathnetworks.com title:Software Developer tel;work:902-468-1010 x 246 x-mozilla-html:FALSE url:http://www.impathnetworks.com http://www.pstdvr.com version:2.1 end:vcard -- SF.Net email is Sponsored by MIX09, March 18-20, 2009 in Las Vegas, Nevada. The future of the web can't happen without you. Join us at MIX09 to help pave the way to the Next Web now. Learn more and register at http://ad.doubleclick.net/clk;208669438;13503038;i?http://2009.visitmix.com/___ comtypes-users mailing list comtypes-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/comtypes-users
Re: [comtypes-users] Unsupported Variant - NotImplementedError: typecode 20 = 0x14
Little update on this I added to automation.py ... _get_value(self): ... elif vt == VT_I8: return self._.VT_I8 tagVARIANT _fields_ = [ ... (VT_I8, c_longlong), And it works fine. Perhaps this should get patched? -S Sandy Walsh wrote: I have a c++ method that returns a LONGLONG data type. How can I get this value from comtypes and avoid this NotImplementedError exception? Thanks in advance! -Sandy -- SF.Net email is Sponsored by MIX09, March 18-20, 2009 in Las Vegas, Nevada. The future of the web can't happen without you. Join us at MIX09 to help pave the way to the Next Web now. Learn more and register at http://ad.doubleclick.net/clk;208669438;13503038;i?http://2009.visitmix.com/ ___ comtypes-users mailing list comtypes-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/comtypes-users begin:vcard fn:Alexander Sandy Walsh n:Walsh;Alexander Sandy org:Impath Networks adr:Suite 100;;42 Payzant Ave;Halifax;NS;B3B 1Z6;Canada email;internet:swa...@impathnetworks.com title:Software Developer tel;work:902-468-1010 x 246 x-mozilla-html:FALSE url:http://www.impathnetworks.com http://www.pstdvr.com version:2.1 end:vcard -- SF.Net email is Sponsored by MIX09, March 18-20, 2009 in Las Vegas, Nevada. The future of the web can't happen without you. Join us at MIX09 to help pave the way to the Next Web now. Learn more and register at http://ad.doubleclick.net/clk;208669438;13503038;i?http://2009.visitmix.com/___ comtypes-users mailing list comtypes-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/comtypes-users
Re: [comtypes-users] Unsupported Variant - NotImplementedError: typecode 20 = 0x14
Sandy Walsh schrieb: Little update on this I added to automation.py ... _get_value(self): ... elif vt == VT_I8: return self._.VT_I8 tagVARIANT _fields_ = [ ... (VT_I8, c_longlong), And it works fine. Thanks for the heads up. I have extended your patch so that also VT_UI8 is fully supported in VARIANT, and extended the VARIANT._set_value(). Just in time for the 0.5.3 release... Thanks, Thomas -- SF.Net email is Sponsored by MIX09, March 18-20, 2009 in Las Vegas, Nevada. The future of the web can't happen without you. Join us at MIX09 to help pave the way to the Next Web now. Learn more and register at http://ad.doubleclick.net/clk;208669438;13503038;i?http://2009.visitmix.com/ ___ comtypes-users mailing list comtypes-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/comtypes-users
[comtypes-users] comtypes 0.5.3 released
I just released comtypes-0.5.3. comtypes is a lightweight Python COM package, based on the ctypes FFI library, in less than 1 lines of code (not counting the tests). comtypes allows to define, call, and implement custom and dispatch-based COM interfaces in pure Python. It works on Windows, 64-bit Windows, and Windows CE. Download location: http://sourceforge.net/project/showfiles.php?group_id=115265 Homepage: http://starship.python.net/crew/theller/comtypes/ This is a maintainance release of the current repository state, before I merged the dynamic-dispatch branch (which will be released as comtypes-0.6.0 within the next few days). Summary of important changes: - Compatible with Python 3.0 - Added comtypes.shelllink module; this allows to manage shortcuts - Various smaller improvements Detailed changes since version 0.5.2: 2008-12-12 Thomas Heller thel...@python.net * Bumped version number to 0.5.3. * Added VARIANT support for VT_I8 and VT_UI8 typecodes. 2008-12-11 Thomas Heller thel...@python.net * Workaround for Python bug: Python 3 cannot handle a distutils installscript in the setup script * Merged the py3-branch: Various changes for py3 compatibility. The setup script now uses distutils.command.build_py.build_py_2to3 when run with Python 3.x, and converts the sources into py3 syntax on the fly (in the build directory). 2008-11-26 Thomas Heller thel...@python.net * Added untested code to comtypes.server: RegisterActiveObject() and RevokeActiveObject(), plus some flags. * Applied a patch from Torbjørn Tyridal. This allows to high-level implement methods in COM servers, and event handler methods that have [in] and [out] arguments in mixed order. 2008-11-05 Thomas Heller thel...@python.net * Add the IPersistFile interface to the comtypes.persist module. Add comtypes.shelllink module which contains IShellLinkA and IShellLinkW interfaces, plus the ShellLink coclass. 2008-10-29 Thomas Heller thel...@python.net * Handle coclass pointers as arguments in com interface methods correctly. Method calls will now accept pointers to the default interface of this coclass. * The Fire_Event() method in comtypes.server.connectionpoints now returns a list of results. 2008-10-10 Thomas Heller thel...@python.net * Import cStringIO, which should always be available on Windows, instead of first trying cStringIO and then StringIO. * Python 2.6 compatibility: use 'types.MethodType' instead of 'new.instancemethod' to fix a -3 warning. Use 'raise Exception(details)' instead of 'raise Exception, details'. Don't use tuple unpacking in exception handlers: 'except COMError, err: (hresult, text, details) = err' instead of 'except COMError, (hresult, text, details)' * Python 2.4 compatibility: os.stat() raises OSError instead of WindowsError when a file is not found. -- Thanks, Thomas -- SF.Net email is Sponsored by MIX09, March 18-20, 2009 in Las Vegas, Nevada. The future of the web can't happen without you. Join us at MIX09 to help pave the way to the Next Web now. Learn more and register at http://ad.doubleclick.net/clk;208669438;13503038;i?http://2009.visitmix.com/ ___ comtypes-users mailing list comtypes-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/comtypes-users
Re: [comtypes-users] dyndispatch branch
Michael Curran schrieb: Hi Thomas, Support for getEvents/showEvents would be great with dynDispatch. However I must admit, that I didn't realize that it was possible to support events purely with IDispatch. My project doesn't technically rely on support for COM events in the places where we use IDispatch, though that is not to say it won't in the future. But, I think that releasing a comtypes with dynDispatch so far is a great step forward, even with out events. Of course, then at a later stage if events were added that would also be great. Michael, I have now (after the 0.5.3 release) merged the dyndispatch branch into the trunk, so the next release will be 0.6.0 with the 'dynamic=True' support you have been waiting for so long. I have to look into the remaining unittest failures, but I promise to make the 0.6.0 release next week. Thomas -- SF.Net email is Sponsored by MIX09, March 18-20, 2009 in Las Vegas, Nevada. The future of the web can't happen without you. Join us at MIX09 to help pave the way to the Next Web now. Learn more and register at http://ad.doubleclick.net/clk;208669438;13503038;i?http://2009.visitmix.com/ ___ comtypes-users mailing list comtypes-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/comtypes-users