[pywin32-bugs] [ pywin32-Bugs-1896670 ] Universal gateway do not work with COM Records
OLD project page for the Python extensions for Windows
Brought to you by:
mhammond
From: SourceForge.net <no...@so...> - 2008-02-19 06:16:23
|
Bugs item #1896670, was opened at 2008-02-19 12:16 Message generated for change (Tracker Item Submitted) made by Item Submitter You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=551954&aid=1896670&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: None Group: None Status: Open Resolution: None Priority: 5 Private: No Submitted By: Alexandr Zamaraev (shura_zam) Assigned to: Nobody/Anonymous (nobody) Summary: Universal gateway do not work with COM Records Initial Comment: I try use win32com for realize interface: [code lang='IDL'] ... typedef [...] struct tagMatrix3d { Point3d RowX; Point3d RowY; Point3d RowZ; } Matrix3d; ... interface ILocateCommandEvents : IDispatch { ... HRESULT LocateFilter([in] _Element* Element, [in, out] Point3d* Point, [in, out] VARIANT_BOOL* Accepted); ... }; ... [/code] I'd made it in such way: [code lang='python'] class LocateCommandEvents(object): _com_interfaces_ = [IID_ILocateCommandEvents] _typelib_guid_ = '{CF9F97BF-39F2-4B8E-835C-8BE9E99DAF5B}' _typelib_version_ = 8, 0 _typelib_lcid_ = 0 _public_methods_ = [] _dispid_to_func_ = {..., 0x60020002: 'LocateFilter', ...} def LocateFilter(self, Element, Point, Accepted): print 'LocateFilter' print Element, Point, Accepted return S_OK, None, True ... [/code] Now errors occur in calls to LocateCommandEvents.LocateFilter function from MicroStation: [code] LocateFilter <win32com.gen_py.Bentley MicroStation DGN 8.0 Object Library._Element instance at 0x12737352> 2223916 True pythoncom error: Failed to call the universal dispatcher Traceback (most recent call last): File "C:\Lang\Python\25\lib\site-packages\win32com\universal.py", line 193, in dispatch WriteFromOutTuple(retVal, meth._gw_out_args, argPtr) <type 'exceptions.TypeError'>: The VARIANT type is unknown (0x24). pythoncom error: Unexpected gateway error Traceback (most recent call last): File "C:\Lang\Python\25\lib\site-packages\win32com\universal.py", line 193, in dispatch WriteFromOutTuple(retVal, meth._gw_out_args, argPtr) <type 'exceptions.TypeError'>: The VARIANT type is unknown (0x24). [/code] ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=551954&aid=1896670&group_id=78018 |