Cannot register dll created using "py2exe --com-dll"

Mark Hammond mhammond at skippinet.com.au
Tue Jul 29 04:59:46 EDT 2003


Giles Brown wrote:
> I'm feeling quite dumb this morning.
> 
> I'm trying to build a COM server DLL using py2exe and it ain't working.

Not too surprising seeing as it was checked in just days ago :)

> 
> Command line for registering dll:
> regsvr32 c:\pvcs\madeupname\model\dist\application.dll
> 
> Result when I try to register dll:
> """DllRegisterServer in c:\pvcs\madeupname\model\dist\application.dll failed.
> Return code was: 0x80040201
> """

This generally just means that there was a Python exception.  As regsvr 
is a GUI app, the exception is lost.  You may like to add "import 
win32traceutil" at the top of your script (see win32traceutil.py for 
details) - or if that fails, at the top of boot_com_servers.py.

> I have tried an exe server, but this does not register either.

Try an EXE server build with the console flag set.  This should allow 
you to see the exception without redirecting error output.

> Also does anyone know what argument to use to get py2exe to build something
> other than "application.[dll/exe]".  I thought 'output_base' as an argument
> to setup() would do it, but no joy.

Can't recall - sorry.

Mark.





More information about the Python-list mailing list