[python-win32] Using a COM interface where the objects don't have
ProgIDs
John Clark
clajo04 at mac.com
Thu Mar 24 04:21:21 CET 2005
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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: text/enriched
Size: 1399 bytes
Desc: not available
Url : http://mail.python.org/pipermail/python-win32/attachments/20050323/b2bd60a8/attachment.bin
More information about the Python-win32
mailing list