Hi Tim, Your answer implies that they are not declared correctly, because the parameter is really required. It throws an exception with "invalid number of parameters" if you leave it out.
If the type is somehow not declared correctly, is there a workaround? Marco On Thu, Jul 17, 2014 at 7:36 PM, Tim Roberts <t...@probo.com> wrote: > Marco Nawijn wrote: > > > > I am facing a problem passing an array by reference. It is exactly the > > same problem as described in this thread: > > > > https://mail.python.org/pipermail/python-win32/2002-November/000562.html > > > > In short, I have a valid reference to a Position object. This object > > has two methods, > > GetComponents and SetComponents that each take a CATSafeArrayVariant as > > an argument. This CATSafeArrayVariant should in this case be a > > one-dimensional > > array of real values. > > If these are declared correctly in their type library, then the array > should be an output value, and Python's machinery knows how to handle > that. So: > > hr, bfr = obj.GetComponents() > hr = obj.SetComponents(bfr) > > -- > Tim Roberts, t...@probo.com > Providenza & Boekelheide, Inc. > > _______________________________________________ > python-win32 mailing list > python-win32@python.org > https://mail.python.org/mailman/listinfo/python-win32 >
_______________________________________________ python-win32 mailing list python-win32@python.org https://mail.python.org/mailman/listinfo/python-win32