Pythonwin com question

Sam Schulenburg samschul at pacbell.net
Fri Apr 21 21:32:11 EDT 2000


I have a com object that I can excercise with Visual Basic as such:

Dim WApp as New Winx32Lib.Winx32App    ' Get an instance of Winx32App
WApp.ShowDemoBox("This is a demo box") ' Call the client ShowDemoBox()

>From Python I try the following which starts the client application and
then timesout with the following error msg:

>>> import win32com.client
>>> MyCLSID = '{1A762221-D8BA-11CF-AFC2-508201C10000}'
>>> WApp = win32com.client.Dispatch(MyCLSID)
Traceback (innermost last):
  File "<interactive input>", line 1, in ?
  File "D:\Python\win32com\client\__init__.py", line 94, in Dispatch
    dispatch, userName = dynamic._GetGoodDispatchAndUserName
(dispatch,userName,clsctx)
  File "D:\Python\win32com\client\dynamic.py", line 66, in
_GetGoodDispatchAndUserName
    return (_GetGoodDispatch(IDispatch, clsctx), userName)
  File "D:\Python\win32com\client\dynamic.py", line 57, in
_GetGoodDispatch
    IDispatch = pythoncom.CoCreateInstance(IDispatch, None, clsctx,
pythoncom.IID_IDispatch)
com_error: (-2146959355, 'Server execution failed', None, None)
>>>

Any help would be appreciated
Samuel W. Schulenburg


Sent via Deja.com http://www.deja.com/
Before you buy.



More information about the Python-list mailing list