I'm feeling quite dumb this morning.
I'm trying to build a COM server DLL using py2exe and it ain't working.
Here's what ain't working...
setup_dll.py based on py2exe sample:
"""from distutils.core import setup
import py2exe
setup(name="Mad eUpName Object Model",
scripts=['madeupname.app lication'],
output_base='ma deupname')
"""
Command line for building dll (N.B. python 2.3 as instructed):
"""c:\python23\ python madeupname/setup_dll.py py2exe --com-dll --excludes Tkinter"""
Command line for registering dll:
regsvr32 c:\pvcs\madeupn ame\model\dist\ application.dll
Result when I try to register dll:
"""DllRegisterS erver in c:\pvcs\madeupn ame\model\dist\ application.dll failed.
Return code was: 0x80040201
"""
The winerror.h entry for this says:
"""//
// MessageId: CO_E_FAILEDTOGE TSECCTX
//
// MessageText:
//
// Unable to obtain server's security context
//
#define CO_E_FAILEDTOGE TSECCTX _HRESULT_TYPEDE F_(0x80040201L)
"""
But I'm guessing that this is simply a way of saying the I haven't told
pythoncom (via py2exe) which classes to register. I'm looking at the
source and I am trying to work it out but failing :-(
I have tried an exe server, but this does not register either.
Any suggestions?
Also does anyone know what argument to use to get py2exe to build something
other than "applicatio n.[dll/exe]". I thought 'output_base' as an argument
to setup() would do it, but no joy.
If you folks can make me feel even more stupid by pointing out my
obvious mistake, that would make me happy. :-)
Thanks for reading,
Giles Brown
I'm trying to build a COM server DLL using py2exe and it ain't working.
Here's what ain't working...
setup_dll.py based on py2exe sample:
"""from distutils.core import setup
import py2exe
setup(name="Mad eUpName Object Model",
scripts=['madeupname.app lication'],
output_base='ma deupname')
"""
Command line for building dll (N.B. python 2.3 as instructed):
"""c:\python23\ python madeupname/setup_dll.py py2exe --com-dll --excludes Tkinter"""
Command line for registering dll:
regsvr32 c:\pvcs\madeupn ame\model\dist\ application.dll
Result when I try to register dll:
"""DllRegisterS erver in c:\pvcs\madeupn ame\model\dist\ application.dll failed.
Return code was: 0x80040201
"""
The winerror.h entry for this says:
"""//
// MessageId: CO_E_FAILEDTOGE TSECCTX
//
// MessageText:
//
// Unable to obtain server's security context
//
#define CO_E_FAILEDTOGE TSECCTX _HRESULT_TYPEDE F_(0x80040201L)
"""
But I'm guessing that this is simply a way of saying the I haven't told
pythoncom (via py2exe) which classes to register. I'm looking at the
source and I am trying to work it out but failing :-(
I have tried an exe server, but this does not register either.
Any suggestions?
Also does anyone know what argument to use to get py2exe to build something
other than "applicatio n.[dll/exe]". I thought 'output_base' as an argument
to setup() would do it, but no joy.
If you folks can make me feel even more stupid by pointing out my
obvious mistake, that would make me happy. :-)
Thanks for reading,
Giles Brown
Comment