Pythonwin com question
Mark Hammond
mhammond at skippinet.com.au
Fri Apr 21 23:38:09 EDT 2000
You could try passing different clsctx values to
win32com.client.Dispatch - my guess is that Python's default isnt quite
the same as VBs...
Let me know if changing this works...
Mark.
"Sam Schulenburg" <samschul at pacbell.net> wrote in message
news:8dqver$l4v$1 at nnrp1.deja.com...
> 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