returning list of strings from Python COM to Visual basic 6

P

Philippe C. Martin

Hi,

Is it possible ?

ex: return ['1','2']

If so which type should I use in VB ?

dim res as ???????

Set testObj = CreateObject("xxxx")

res = testObj.AMethodThatReturnsAListOfStrings()


Thanks,

Philippe
 
P

Philippe C. Martin

I can now pass and return quite a few types except object instances: my
python code gets to the point where I do:


def Get_Obj(self):
......
return an_object

My VB code looks like

Dim obj as Variant

obj = acom.Get_Obj()


I get an "unexpected Python error ..... Objects of type 'instance' can not
be converted to a COM VARIANT"

Is there a way out ?

Thanks,

Philippe
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,011
Latest member
AjaUqq1950

Latest Threads

Top