List Info

Thread: How to figure out the COM object name?




How to figure out the COM object name?
user name
2007-04-03 16:37:57
Newbie question..

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?

thanks!


-- 
<admiral>

Michael F. March ----- mmarch at gmail dot com
_______________________________________________
Python-win32 mailing list
Python-win32python.org

http://mail.python.org/mailman/listinfo/python-win32

Re: How to figure out the COM object name?
country flaguser name
United States
2007-04-03 17:16:07
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/qcb
in" )

That is, assuming they support late binding.

-- 
Tim Roberts, timrprobo.com
Providenza & Boekelheide, Inc.


_______________________________________________
Python-win32 mailing list
Python-win32python.org

http://mail.python.org/mailman/listinfo/python-win32

Re: How to figure out the COM object name?
user name
2007-04-03 17:19:28
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:Python24libsite-packageswin32comclient__init__
.py",
line 95, in Dispatch
    dispatch, userName =
dynamic._GetGoodDispatchAndUserName(dispatch,userName,clsctx
)
  File
"C:Python24libsite-packageswin32comclientdynamic.
py",
line 98, in _GetGoodDispatchAndUserName
    return (_GetGoodDispatch(IDispatch, clsctx), userName)
  File
"C:Python24libsite-packageswin32comclientdynamic.
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 <timrprobo.com> 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/qcb
in" )
>
> That is, assuming they support late binding.
>
> --
> Tim Roberts, timrprobo.com
> Providenza & Boekelheide, Inc.
>
>
> ______________________________________________
_______________________________________________
Python-win32 mailing list
Python-win32python.org

http://mail.python.org/mailman/listinfo/python-win32

Re: How to figure out the COM object name?
country flaguser name
Australia
2007-04-03 19:00:38
> Newbie question..
>
> I am trying to connect to a COM object.. and I can't
figure
> how to code it..

You really need to consult the documentation for the object
itself.

>
> In Makepy the name of the COM object is:
>
>    OTA COM 9.0 Type LIbrary (1.0)

Try opening the file generated by makepy - if you are lucky,
you will find a
comment along the lines of:

  This CoClass is known by the name 'Some.Name.Here'

Mark

_______________________________________________
Python-win32 mailing list
Python-win32python.org

http://mail.python.org/mailman/listinfo/python-win32

Re: How to figure out the COM object name?
user name
2007-04-03 19:02:25
# This CoClass is known by the name
'TDClient80.AmarillusHash.1'

Is that my golden ticket?

On 4/3/07, Mark Hammond <mhammondskippinet.com.au>
wrote:
> > Newbie question..
> >
> > I am trying to connect to a COM object.. and I
can't figure
> > how to code it..
>
> You really need to consult the documentation for the
object itself.
>
> >
> > In Makepy the name of the COM object is:
> >
> >    OTA COM 9.0 Type LIbrary (1.0)
>
> Try opening the file generated by makepy - if you are
lucky, you will find a
> comment along the lines of:
>
>   This CoClass is known by the name 'Some.Name.Here'
>
> Mark
>
>


-- 
<admiral>

Michael F. March ----- mmarchgmail.com
Ph: (415)462-1910 ---- Fax: (602)296-0400
P.O. Box 2254 ---- Phoenix, AZ 85002-2254
          "Seriously" - HSR
_______________________________________________
Python-win32 mailing list
Python-win32python.org

http://mail.python.org/mailman/listinfo/python-win32

[1-5]

about | contact  Other archives ( Real Estate discussion Medical topics )