[python-win32] win32com and DCOM (the reply)

Jean-Luc Bonduel JLBD at CIGER.BE
Mon Sep 20 10:25:30 CEST 2004


Hello,

I have post this question some days (see below)

After some search (a lot of...), i found this article at
http://www.codeproject.com/com/dcomcnfg.asp
It open the door for the communication between my server and my
client...

HTH.

Jean-Luc

>>Hello,
>>
>>I have a Zope serveur (with the code infra) and i try to start Excel
on
>>the client PC.
>>What i'm doing wrong ?
>>
>>TIA.
>>
>>Jean-Luc
>>
>>----------------------------------------------------------------------
--
>>-------------------------
>>from win32com.client import DispatchEx
>>import pythoncom
>>import sys
>>import time
>>
>>def demarreexcel():
>>    COINIT = 0
>>    pythoncom.CoInitializeEx(0) 
>>    sys.coinit_flags = COINIT
>>    o = DispatchEx("Excel.Application","pcxyz")
>>    o.Visible = 1
>>    o.Workbooks.Add()
>>    pythoncom.CoUninitializeEx()
>>
>>----------------------------------------------------------------------
--
>>---------------------
>>Traceback (innermost last):
>>  Module ZPublisher.Publish, line 100, in publish
>>  Module ZPublisher.mapply, line 88, in mapply
>>  Module ZPublisher.Publish, line 40, in call_object
>>  Module Products.ExternalMethod.ExternalMethod, line 224, in __call__
>>   - __traceback_info__: ((), {}, None)
>>  Module c:\testp\Extensions\excelfct.py, line 11, in demarreexcel
>>  Module win32com.client, line 112, in DispatchEx
>>com_error: (-2146959355, "\xc9chec de l'ex\xe9cution du serveur",
None,
>>None)

>>"\xc9chec de l'ex\xe9cution du serveur"
>>it's in french. It says a thing like: Error starting server


More information about the Python-win32 mailing list