Il 06/01/2011 21:05, Tim Roberts ha scritto:
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.

the return is a mistake because I make a lot of test ..
the code crash before the return at

self._obj=test1(obj)
when I try to create a new instance of the class test1 it gives me the error

the some code in the vbs dose not give me any error ..

Regards,
Matteo




_______________________________________________
python-win32 mailing list
[email protected]
http://mail.python.org/mailman/listinfo/python-win32

Reply via email to