win32com problem: No Such Interface Supported

Lindsey Smith lsmith at aracnet.com
Thu Jun 6 15:51:09 EDT 2002


I'm having trouble using a COM object from Python 2.2.1 using the
win32all-143 extensions. I want to access ISubscriptionMgr, which is
implemented by webcheck.dll, a part of Internet Explorer 5+.
ISubscriptionMgr is defined by subsmgr.idl and subsmgr.h in the MS Visual C
vc98\include directory.

What I did was:
] midl subsmgr.idl

which yields subsmgr.tlb, then
] python makepy.py -i path\subsmgr.tlb

which yields:
{C54FD88A-FFA1-11D0-BC5E-00C04FD929DB}, lcid=0, major=1, minor=0
>>> # Use these commands in Python code to auto generate .py support
>>> from win32com.client import gencache
>>> gencache.EnsureModule('{C54FD88A-FFA1-11D0-BC5E-00C04FD929DB}', 0, 1, 0)


then making test.py:

from win32com.client import gencache
mod = gencache.EnsureModule('{C54FD88A-FFA1-11D0-BC5E-00C04FD929DB}', 0, 1,
0)

o = mod.SubscriptionMgr()
print o


but test.py bombs out in this way:

Traceback (most recent call last):
  File "test.py", line 5, in ?
    o = mod.SubscriptionMgr()
  File
"D:\DEV\PYTHON22\lib\site-packages\win32com\gen_py\C54FD88A-FFA1-11D0-BC5E-0
0C04FD929DBx0x1x0.py", line 37, in __init__
    if oobj is None: oobj = pythoncom.new(self.CLSID)
pywintypes.com_error: (-2147467262, 'No such interface supported', None,
None)

Any ideas on what I'm doing wrong?

thanks,
Lindsey






More information about the Python-list mailing list