COM component implementing custom interfaces

Daniel Piñol Laserna dpinol at hotmail.com
Thu Jul 4 12:25:49 EDT 2002


Mark Hammond <mhammond at skippinet.com.au> wrote in message news:<3D2387EF.6020306 at skippinet.com.au>...
> You need to check out the win32com\servers\test_pycomtest.py - this 
> shows how to implement non IDispatch based interfaces.
> 
> Mark.

When I run the example, I get 
Traceback (most recent call last):
  File "d:\dani\AppDev\python\APython22\Lib\site-packages\Pythonwin\pywin\framework\scriptutils.py",
line 301, in RunScript
    exec codeObject in __main__.__dict__
  File "d:\dani\AppDev\python\APython22\Lib\site-packages\win32com\servers\test_pycomtest.py",
line 13, in ?
    universal.RegisterInterfaces('{6BCDCB60-5605-11D0-AE5F-CADD4C000000}',
0, 1, 1, ["IPyCOMTest"])
  File "d:\dani\AppDev\python\APython22\Lib\site-packages\win32com\universal.py",
line 29, in RegisterInterfaces
    tlb = pythoncom.LoadRegTypeLib(typelibGUID, major, minor, lcid)
com_error: (-2147319779, 'Library not registered.', None, None)
 
If I comments out the offending line
(universal.RegisterInterfaces...), it runs ok and the object appears
in OLE COM viewer. But if I try to instantiate from VB, I get this
error
 
    Unexpected Python Error: pywintypes.com_error: (-2147319779,
'Library not registered.', None, None)
    -2147467259 
 
I couldn't find any TLB or IDL to register



More information about the Python-list mailing list