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:
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.