Terminating a local process COM server

Bill Bell bill-bell at bill-bell.hamilton.on.ca
Fri Jun 29 10:59:23 EDT 2001


"Steve Holden" <sholden at holdenweb.com> wrote, in part, in a different order:
> Anyone help? Or at least explain where I'm mistaken if this isn't a
> sensible goal...

I dunno whether the following can be considered "help" in itself. 
(But maybe a little inane discussion will help.)

First, makes sense to me.

> For debugging purposes I would like to be able to terminate the
> current instantiation (i.e. process), so I can start another one with
> revised Python code. It would also be nice, in production, to have
> some way to terminate the LocalServer process so that the next
> instantiation of the COM object restarts the server in a new process.

Server side:

1. Use a factory to create the objects needed by the COM client. 
(As a newbie I've found Chapter 12 of the O'Reilly "Python Win32" 
book to be very useful.)

2. Add a method to the COM interface that terminates the local 
server.

Client side:

1. Wrap an attempt to execute the server termination method in a 
'try...except' and ignore what happens. Execute this only in a 
special 'test' mode?

2. Instantiate the COM object.

Cross your fingers.

Bill




More information about the Python-list mailing list