COM Servers in python 2.3 [win32all build 157]?

B

Brent Turner

Under python 2.2 [win32all build 156] I was able to create a COM
object in an exe much of the same way that I could from py source...
meaning that I was able to register the com server and create an
instance using the current process (exe/source) as the com server.
Now, in python 2.3 [win32all build 157] when I try to create the COM
instance from the exe, it starts up a new process and fails (b/c my
exe does not support the command line parameters)

The Source below is what is run from inside the exe. This may not be
the way I was supposed to do it, but at the time I found that this
worked. Does anybody know what I am doing wrong?? or why it worked in
the first place (if it is wrong).

Source:
######################################################################
# place all com classes here to be registered at import
comservers = [ PythonCollection ]


import win32com.server.register
import pythoncom
import sys
if hasattr(sys, 'importers'):
# we are running as py2exe-packed executable
sys.frozen = 1
pythoncom.frozen = 1

# Register all the comservers
for com in comservers:
print 'Registering COM Server %s ...' % com
win32com.server.register.UseCommandLine(com)
######################################################################


Thanks,
Brent
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,770
Messages
2,569,584
Members
45,075
Latest member
MakersCBDBloodSupport

Latest Threads

Top