[python-win32] Problem on com server ony in a specifie application
Tim Roberts
timr at probo.com
Thu Jan 6 21:05:30 CET 2011
Matteo Boscolo wrote:
>
> how can I understand how to fix this problem ?
>
> It's quite a strange behaviour,
> this is the method that fails, and it fails only if the argument is != None
>
> def comInit(self,obj=None):
> if obj==None:
> return "ss" + str(test1)
> else:
> self._obj=test1(obj)
> return self._obj
What do you expect this to do? You are returning a Python object as the
return value of a COM method. What do you expect a C program to do with
this object? The Python COM support isn't going to know how to create a
wrapper for this. If you need to return a new object, then that object
should be a Python COM object as well.
--
Tim Roberts, timr at probo.com
Providenza & Boekelheide, Inc.
More information about the python-win32
mailing list