win32com.client.dynamic.Dispatch('{70107C62-8ABB-11D5-961B-0010A4F73DE4}')
and if I actually DO register the COM control, rather than just assuming that it's registered because the DLL exists ("Of course it is registered - the file is right there! No one would place the file on the disk without actually registering the objects...") everything then seems to work as advertised (imagine that :)).
Well, I guess sometimes it just helps to talk it out in email.....
-John
On Mar 23, 2005, at 10:21 PM, John Clark wrote:
My apologies if this is something that should be obvious to me, but I cannot figure out how to use a typelib if that typelib does not establish ProgID values for the CoClasses.
The class that was created by EnsureModule() is as follows:
class CaWHarvest(CoClassBaseClass): # A CoClass
# CaWHarvest Class
CLSID = IID('{70107C62-8ABB-11D5-961B-0010A4F73DE4}')
coclass_sources = [
_ICaWHarvestEvents,
]
default_source = _ICaWHarvestEvents
coclass_interfaces = [
ICaWHarvest,
]
default_interface = ICaWHarvest
I have tried callingΩ win32com.client.Dispatch(None, resultCLSID = IID('{70107C62-8ABB-11D5-961B-0010A4F73DE4}')) but this returned a 'Class Not registered' error. I have searched the registry for the above CLSID and have found entries, so to the best of my knowledge this COM component is registered. Beyond that I am afraid I have exceeded my knowledge of COM & Python.
My only experience with calling COM components from Python has been in situations where the class has a ProgID that I would pass into Dispatch() as the parameter... I suppose I could force a programmatic ID by creating something in the registry, but it seems there should be an answer without doing that.
Could someone point me in the right direction? I am sure I am just missing something obvious.
Thanks,
-John_______________________________________________
Python-win32 mailing list
Python-win32@python.org
http://mail.python.org/mailman/listinfo/python-win32
_______________________________________________ Python-win32 mailing list Python-win32@python.org http://mail.python.org/mailman/listinfo/python-win32