Win32/COM - returning multiple values

Richard Brodie R.Brodie at rl.ac.uk
Tue May 9 17:45:47 CEST 2000


I'm struggling slightly with some COM concepts. Working from
a position of almost complete ignorance, I have been able to get
a Python COM server going.  Now the only immovable thing is the
specification of the 'C' API on the client, which thus needs to do
some housekeeping and invoke the COM object appropriately. The
COM interfaces themselves are considered internal, so are not
fixed at this stage.

One of the methods naturally returns an int and two strings. Now, I
had naively thought that these would be returned as an array.
However, it seems that what I have to do is to use NewEnum to
coerce it to an IEnumVARIANT interface, and then use
QueryInterface and Next on the client to recover the array.

Lucky I was able to protoype this all in Python ;)  Have I really
got to jump through all these hoops though?





More information about the Python-list mailing list