[python-win32] Problem passing array by reference

2019-10-27 Thread luckyn...@163.com
Dear All,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.htmlhttps://mail.python.org/pipermail/python-win32/2014-July/013234.html I am calling a method on a COM

Re: [python-win32] Problem passing array by reference

2014-07-18 Thread Marco Nawijn
An update on where I am at the moment. I managed to find the library that holds the definition for the GetComponents call. When I run makepy on this library I get: def GetComponents(self, oAxisComponentsArray=defaultNamedNotOptArg): return self._ApplyTypes_(1611005953, 1, (24, 0), ((8204, 3),),

Re: [python-win32] Problem passing array by reference

2014-07-18 Thread Tim Roberts
Marco Nawijn wrote: An update on where I am at the moment. I managed to find the library that holds the definition for the GetComponents call. When I run makepy on this library I get: def GetComponents(self, oAxisComponentsArray=defaultNamedNotOptArg): return self._ApplyTypes_(1611005953, 1,

Re: [python-win32] Problem passing array by reference

2014-07-18 Thread Marco Nawijn
On Fri, 18 Jul 2014 09:26:34 -0700 Tim Roberts t...@probo.com wrote: Marco Nawijn wrote: An update on where I am at the moment. I managed to find the library that holds the definition for the GetComponents call. When I run makepy on this library I get: def GetComponents(self,

Re: [python-win32] Problem passing array by reference

2014-07-18 Thread Marco Nawijn
Dear all, Sorry for the noise on the list. Epic fail of my freshly configured mail client. Marco On Fri, Jul 18, 2014 at 7:28 PM, Marco Nawijn naw...@gmail.com wrote: On Fri, 18 Jul 2014 09:26:34 -0700 Tim Roberts t...@probo.com wrote: Marco Nawijn wrote: An update on where I am at

[python-win32] Problem passing array by reference

2014-07-17 Thread Marco Nawijn
Dear All, 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

Re: [python-win32] Problem passing array by reference

2014-07-17 Thread Tim Roberts
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

Re: [python-win32] Problem passing array by reference

2014-07-17 Thread Marco Nawijn
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

Re: [python-win32] Problem passing array by reference

2014-07-17 Thread Tim Roberts
Marco Nawijn wrote: 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. Many people write their COM objects so that they work from C++ without giving a rip about the

Re: [python-win32] Problem passing array by reference

2014-07-17 Thread Marco Nawijn
Ok. Another clue (slightly blushing that I didn't notice this before..). I focus on the Position.GetComponents(...) for the moment. Recall that this should set the orientation (9 values) and the position (3 values) by means of an array passed in by reference. To my surprise, it returns the same

Re: [python-win32] Problem passing array by reference

2014-07-17 Thread Tim Roberts
Marco Nawijn wrote: Ok. Another clue (slightly blushing that I didn't notice this before..). I focus on the Position.GetComponents(...) for the moment. Recall that this should set the orientation (9 values) and the position (3 values) by means of an array passed in by reference. To my

Re: [python-win32] Problem passing array by reference

2014-07-17 Thread Marco Nawijn
Hi Tim, Ok. I will give it a try and report back. I did a quick search and found the TLB files. Never worked with them though, but I will take a look. Marco On Thu, Jul 17, 2014 at 10:22 PM, Tim Roberts t...@probo.com wrote: Marco Nawijn wrote: Ok. Another clue (slightly blushing that I