problems with pythoncom and VB-generated OLE/ActiveX DLL
Mark Hammond
mhammond at skippinet.com.au
Sat Feb 23 20:27:21 EST 2002
Domenico wrote:
>>>>import display
>>>>d = display.Class1()
>>>>
> Traceback (most recent call last):
> File "<stdin>", line 1, in ?
> File "C:\compilers\python\display.py", line 40, in __init__
> if oobj is None: oobj = pythoncom.new(self.CLSID)
> pywintypes.com_error: (-2147221164, 'Interfaccia non registrata.',
> None, None)
>
> 'Interfaccia non registrata' (in Italian) means something like
> 'Unregistered interface'. So I did:
Assuming self.CLSID is the CLSID of the *object*, not the *DLL*, this
should work.
Have you run regsvr32.exe on the DLL? Can you create the object from
another VB program, or using WSH?
>
>
>>>>import pythoncom
>>>>d = pythoncom.new("{***CLSID of the DLL***}")
>>>>
The CLSID of the DLL will never work - it must be the object's CLSID.
I assume you have a good reason for using pythoncom.new() over
win32com.client.Dispatch()?
Mark.
More information about the Python-list
mailing list