[IronPython] Newbie InterOp-related question
m.schaber at 3s-software.com
Tue Mar 29 23:41:44 PDT 2011
it's documented at http://ironpython.net/documentation/dotnet/dotnet.html#ref-and-out-parameters.
The out parameter will be mapped as an additional return value.
So if myComObj.foo returns void, a simple call like
blah = myComObj.Foo()
should do the trick.
Von: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] Im Auftrag von Tilley, Paul
Gesendet: Mittwoch, 30. März 2011 01:10
An: users at lists.ironpython.com
Betreff: [IronPython] Newbie InterOp-related question
I've just started using IronPython but have hit a bit of a roadblock. This may also be caused by inadequate .Net knowledge.
In C# I can call a COM object (where the COM method is going to fill in the parameter) like so:
If for example the COM method returns an array of strings ( with the parameter VARIANT* in COM method signature) then in C# I get an object back which with appropriate massaging I can process.
How would I declare the variable in Python if I want access the returned contents correctly? Knowing I was to get an array back I naively tried:
blah = 
The call is made correctly - I can see the COM object is filling out the return parameter OK but blah remains an empty list.
Any insights on what I should be doing more than welcome,
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Users