The Artima Developer Community
Sponsored Link

Python Answers Forum
Problem calling a COM dll

1 reply on 1 page. Most recent reply: Sep 30, 2004 11:12 AM by Andrew Bovett

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 1 reply on 1 page
Andrew Bovett

Posts: 2
Nickname: abovett
Registered: Jun, 2004

Problem calling a COM dll Posted: Jun 22, 2004 3:40 AM
Reply to this message Reply
Advertisement
Hi

I don't know much about COM but I have been using the win32com package to use a COM dll written by a collegue without any problems - just register it with regsvr32, then:


>>> import win32com.client
>>> bcltrans=win32com.client.Dispatch('Xtranslate.Xtrans.1')
>>> bcltrans.XTOpen()


However, there's now a new version of the DLL, and it doesn't work. I've tried the above method, and I've also tried using makepy to make a python interface to it.

Using the first method gives:


>>> import win32com.client
>>> bcltrans=win32com.client.Dispatch('Xtranslate.Xtrans.1')
>>> bcltrans.XTOpen()
Traceback (most recent call last):
File "<stdin>", line 1, in ?
File "C:\Python23\lib\site-packages\win32com\client\dynamic.py", line 477, in __getattr__
raise AttributeError, "%s.%s" % (self._username_, attr)
AttributeError: Xtranslate.Xtrans.1.XTOpen


Using the interface created by makepy gives this:


>>> import bcl6x
>>> bcltrans=bcl6x.Xtrans()
>>> bcltrans.XTOpen()
Traceback (most recent call last):
File "<stdin>", line 1, in ?
File "bcl6x.py", line 39, in XTOpen
return self._oleobj_.InvokeTypes(2, LCID, 1, (24, 0), ((8, 0), (8, 0)),translatorname, suname)
pywintypes.com_error: (-2147319779, 'Library not registered.', None, None)


Can someone give me some ideas where to start looking for this problem? The DLL _is_ registered (the Xtrans() call fails if it isn't) so what does it mean by 'Library not registered.'?

Any tips, hints, help appreciated - I'm not sure where to start on this one.

Thanks

Andy


Andrew Bovett

Posts: 2
Nickname: abovett
Registered: Jun, 2004

Re: Problem calling a COM dll Posted: Sep 30, 2004 11:12 AM
Reply to this message Reply
No-one got any ideas at all? :(
*bump*

Flat View: This topic has 1 reply on 1 page
Topic: want to catch new thread event Previous Topic   Next Topic Topic: just a simple loop question

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use