frozen win32com problem
Robin Becker
robin at jessikat.fsnet.co.uk
Thu Jan 3 12:21:48 EST 2002
I am attempting to implement a frozen python win32com object.
We are using a variant of Gordon McMillan's 4.x installer framework
to create a python.exe which works fine. Most .pycs are in a .pyz file,
but the win32/lib files and win32com/server+client files are in
the real file system.
I have only got pythoncom21.dll, pywintypes21.dll, win32api.pyd and win32trace.pyd
on the target system.
I find that I can use my objects if I manually register them to use my
localserver only. So I have a working setup except for registration on
the target machine.
When I try to use the standard command line registration/unregistration
mechanism I'm getting an error from win32com.server.register._cat_registrar
eg with the cut down file \tmp\dingo.py
import pythoncom
def _cat_registrar():
return pythoncom.CoCreateInstance(
pythoncom.CLSID_StdComponentCategoriesMgr,
None,
pythoncom.CLSCTX_INPROC_SERVER,
pythoncom.IID_ICatRegister
)
print 'CLSID_StdComponentCategoriesMgr', pythoncom.CLSID_StdComponentCategoriesMgr
print 'CLSCTX_INPROC_SERVER', pythoncom.CLSCTX_INPROC_SERVER
print 'IID_ICatRegister', pythoncom.IID_ICatRegister
print _cat_registrar()
C:\ReportLab>\tmp\dingo.py
CLSID_StdComponentCategoriesMgr <iid:{0002E005-0000-0000-C000-000000000046}>
CLSCTX_INPROC_SERVER 1
IID_ICatRegister <iid:{0002E012-0000-0000-C000-000000000046}>
Traceback (most recent call last):
File "C:\tmp\dingo.py", line 13, in ?
print _cat_registrar()
File "C:\tmp\dingo.py", line 7, in _cat_registrar
pythoncom.IID_ICatRegister
pywintypes.com_error: (-2147221164, 'Class not registered', None, None)
this is on an NT4 system that has no python/pythonwin etc. Any ideas what
I'm missing/haven't registered?
--
Robin Becker
More information about the Python-list
mailing list