Here is what I get when I try that...

>>> td = win32com.client.Dispatch("TDConnection")
Traceback (most recent call last):
  File "<interactive input>", line 1, in ?
  File "C:\Python24\lib\site-packages\win32com\client\__init__.py",
line 95, in Dispatch
    dispatch, userName =
dynamic._GetGoodDispatchAndUserName(dispatch,userName,clsctx)
  File "C:\Python24\lib\site-packages\win32com\client\dynamic.py",
line 98, in _GetGoodDispatchAndUserName
    return (_GetGoodDispatch(IDispatch, clsctx), userName)
  File "C:\Python24\lib\site-packages\win32com\client\dynamic.py",
line 78, in _GetGoodDispatch
    IDispatch = pythoncom.CoCreateInstance(IDispatch, None, clsctx,
pythoncom.IID_IDispatch)
com_error: (-2147221005, 'Invalid class string', None, None)

On 4/3/07, Tim Roberts <[EMAIL PROTECTED]> wrote:
> Michael March wrote:
> > I am trying to connect to a COM object.. and I can't figure how to code it..
> >
> > In Makepy the name of the COM object is:
> >    OTA COM 9.0 Type LIbrary (1.0)
> >
> > The DDL is:
> >    OTAClient.dll
> >
> > The VB samples have stuff like this..
> >    Dim td as New TDConnection
> >    td.InitConnectionEx "http://<servername>:port/qcbin"
> >    etc...
> >
> > What should my.....
> >    obj=win32com.client.Dispatch("...........
> > ...look like?
> >
>
> It should be as simple as
>     td = win32com.client.Dispatch( "TDConnection" )
>     td.InitConnectionEx( "http://server:port/qcbin"; )
>
> That is, assuming they support late binding.
>
> --
> Tim Roberts, [EMAIL PROTECTED]
> Providenza & Boekelheide, Inc.
>
>
> ______________________________________________
_______________________________________________
Python-win32 mailing list
Python-win32@python.org
http://mail.python.org/mailman/listinfo/python-win32

Reply via email to