[Zope] COMObject How-To

Arpad Kiss sekter@mail.matav.hu
Tue, 9 Nov 1999 10:46:37 +0100


The original COMObject doesn't work in Zope 2.0. You have to modify the
product as the error message say. Before the call of dispatch it needs a
call of Coinitialize(in a multithreaded environment you have to use
Coinitialize once before any Dispatches). I can send a modified version if
you need.
Best regards,
Arpad Kiss

----- Original Message -----
From: Chui Tey <teyc@start.com.au>
To: <zope@zope.org>
Sent: Tuesday, November 09, 1999 5:16 AM
Subject: [Zope] COMObject How-To


> Has anyone had any luck with using COMObject with Zope 2.0?
>
> I installed Zope, then win32all.
> Next I changed the start.bat to
>   "C:\Program Files\Python\python.exe" ...
> Trying connect to the COM object gives this:
>
> Error Type: com_error
> Error Value: (-2147221008, 'CoInitialize has not been called.', None,
> None)
>
> Last bits of the traceback reads:
>   File C:\Program
> Files\WebGalah\lib\python\Products\COMObject\COMObject.py, line 211,
> in getObject
>     (Object: FDFApp)
>   File C:\Program Files\Python\win32com\client\__init__.py, line 13,
> in Dispatch
>   File C:\Program Files\Python\win32com\client\dynamic.py, line 68, in
> _GetGoodDispatchAndUserName
>   File C:\Program Files\Python\win32com\client\dynamic.py, line 58, in
> _GetGoodDispatch
>
> From Python interpreter I was able to win32com.client.Dispatch com
> objects with no problems.
>
> Thanks
>
> Chui
>
>
>
>
>
> __________________________________________________________________
> Get your free Australian email account at http://www.start.com.au/
>
>
> _______________________________________________
> Zope maillist  -  Zope@zope.org
> http://lists.zope.org/mailman/listinfo/zope
>           No cross posts or HTML encoding!
> (Related lists -
>  http://lists.zope.org/mailman/listinfo/zope-announce
>  http://lists.zope.org/mailman/listinfo/zope-dev )
>
>