Reinhammar Maria schrieb: > Great! > Now the app starts. > The interface to the app appears somewhat different from when we use win32all > though. > We have to investigate that to see what it means so no complaints so far! > Thanks!//Maria
This change is now in the repository, so the next release will contain it. > > -----Ursprungligt meddelande----- > Från: Thomas Heller [mailto:thel...@ctypes.org] > Skickat: den 3 april 2009 14:37 > Till: comtypes-users@lists.sourceforge.net > Ämne: Re: [comtypes-users] comtypes CreateObject problem > > Reinhammar Maria schrieb: >> We get the following, less favourable response :o( Any advice is greatly >> appreciated!! >> >> Setting is python 2.5.2, windows xp professional SP3, SolidEdge V20 >> SP10, comtypes 0.6 >> >> We have great success with comtypes interfacing other software like >> SmarTeam (PDM/PLM software) and of course Excel and alike. :o) >> >> Thnx >> >> IDLE 1.2.2 >>>>> import comtypes.client >>>>> foo = comtypes.client.CreateObject("SolidEdge.Application") >> # Generating comtypes.gen._8A7EFA3A_F000_11D1_BDFC_080036B4D502_0_1_0 >> # Generating comtypes.gen._00020430_0000_0000_C000_000000000046_0_2_0 >> # Generating comtypes.gen.stdole >> [...] >> sa_type = _make_safearray_type(itemtype) >> File "C:\Python25\lib\site-packages\comtypes\safearray.py", line 52, in >> _make_safearray_type >> raise TypeError(itemtype) >> TypeError: <class 'ctypes.c_char'> >>>>> >> > > Please try this patch: > > Index: comtypes/automation.py > =================================================================== > --- comtypes/automation.py (revision 493) > +++ comtypes/automation.py (working copy) > @@ -747,6 +747,7 @@ > _vartype_to_ctype[v] = c > _vartype_to_ctype[VT_INT] = _vartype_to_ctype[VT_I4] > _vartype_to_ctype[VT_UINT] = _vartype_to_ctype[VT_UI4] > +_ctype_to_vartype[c_char] = VT_UI1 > > > try: > > >> >> >> Maria Reinhammar > > -- > Thanks, > Thomas > > > > > ------------------------------------------------------------------------------ -- Thanks, Thomas ------------------------------------------------------------------------------ Stay on top of everything new and different, both inside and around Java (TM) technology - register by April 22, and save $200 on the JavaOne (SM) conference, June 2-5, 2009, San Francisco. 300 plus technical and hands-on sessions. Register today. Use priority code J9JMT32. http://p.sf.net/sfu/p _______________________________________________ comtypes-users mailing list comtypes-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/comtypes-users