SAFEARRAY(ISpecific*)* type in COM Automation from Python
Alex Martelli
aleaxit at yahoo.com
Fri Apr 6 08:14:46 EDT 2001
A problem I hadn't seen yet -- wonder if anybody has already
solved it and can offer advice...
I have to call a method on an Automation object that needs
a parameter of type SAFEARRAY(IFoo*), where IFoo is a (dual)
interface defined in that same type library. I can make
suitable objects that implement IFoo through suitable factory
methods in that object-model, but when I then try to pass a
list of those 'suitable objects' where the SAFEARRAY(IFoo*)
is required, I get a "type mismatch" COM error:
Traceback (most recent call last):
File "<stdin>", line 1, in ?
File
"d:\python20\win32com\gen_py\F4503A16-F637-11D2-BD55-00500400405Bx0x1x0\I
ProfileCreator.py", line 31, in AddProfile
ret = self._oleobj_.InvokeTypes(0x1, LCID, 1, (9, 0), ((24585, 1), (11,
1)),
pCvs, autoConstraint)
pywintypes.com_error: (-2147352571, 'Type mismatch.', None, 1)
Is there some known way to solve this peculiar problem...?
Alex
More information about the Python-list
mailing list