I have a plugin that I'm trying to create as a sample for an application from the company I work for. I'm trying to write this plugin in Python.
The way the plugin architecture works is that the plugin needs to implement an interface defined in a provided COM type library. So it is a COM client to that type library and in the end gets registered as a COM Server to the registry and the application by giving it the ClassID for late-bound COM by the application.
I'm using pythoncom and win32com and have used makepy.py to generate the needed python code from the type libarary but I can't seem to find a way to create a class that implements the interface from this type library.
Any pointers on this would be greatly appreciated.
Thanks
When I try to run Dispatch to get the COM object I get the following exeption:
>>> interface = win32com.client.Dispatch('{68AC7909-804F-4D6D-861C-8382DAA7B029}')
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "C:\Python26\lib\site-packages\win32com\client\__init__.py", line 95, in Dispatch
dispatch, userName = dynamic._GetGoodDispatchAndUserName(dispatch,userName,clsctx)
File "C:\Python26\Lib\site-packages\win32com\client\dynamic.py", line 108, in _GetGoodDispatchAndUserName
return (_GetGoodDispatch(IDispatch, clsctx), userName)
File "C:\Python26\Lib\site-packages\win32com\client\dynamic.py", line 85, in _GetGoodDispatch
IDispatch = pythoncom.CoCreateInstance(IDispatch, None, clsctx, pythoncom.IID_IDispatch)
pywintypes.com_error: (-2147221164, 'Class not registered', None, None)