Hello, I am automating a CAD System which expects a so called CATSafeArrayVariant. This is defined as one-dimensional arrays of CATVariants. When I am right, this should work now with comtypes. But how do I use it when a method expects it by reference ?
In pure Python (where no "by reference" exists) I would simply use this to get a list of file names: myrefs = Send.GetListOfDependantFiles() In VB (which works) it looks like: Dim arrayOfVariantOfBSTR() ReDim arrayOfVariantOfBSTR(500) Call Send.GetListOfDependantFiles(arrayOfVariantOfBSTR) After this I can find the results in the arrayOfVariantOfBSTR, which can be used in a for each loop. I found the test_safearray.py in the comtypes package and tried this: myrefs = _midlSAFEARRAY(POINTER(IUnknown)) newrefs = Send.GetListOfDependantFiles(t) But this gives me an AttributeError ?! Can someone help ? Thanks Mustafa -- Mit freundlichen Grüßen Dipl.-Ing. Mustafa Görmezer Letterhausstr. 64 D-27755 Delmenhorst Tel.: 032/224123414 Mobil: 0173/6384708 E-Mail: mailto: [EMAIL PROTECTED] Web: http://www.goermezer.de ------------------------------------------------------------------------- This SF.net email is sponsored by the 2008 JavaOne(SM) Conference Don't miss this year's exciting event. There's still time to save $100. Use priority code J8TL2D2. http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone _______________________________________________ comtypes-users mailing list comtypes-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/comtypes-users