How do I have a client shutdown a win32 COM server?

Discussion in 'Python' started by Noah, Jul 12, 2003.

  1. Noah

    Noah Guest

    Hi,

    How do I shutdown a win32 COM server?

    I am scripting Adobe Illustrator through its COM interface.
    The problem is that Illustrator has memory leaks.
    And after a few hours of running, Illustrator will start to behave
    oddly
    until eventually it refuses the create new COM objects.
    The solution is to close Illustrator and then restart it.
    This is easy if I'm sitting at my desk and can see that it has
    crashed.
    What I'd like to do is have the client restart the server every 10
    minutes
    (or when it sees a specific exception).

    A COM client will automatically start the COM server if it is
    not already running, but I don't know how to shutdown a COM server
    that is already running.

    So, how do you bounce a COM server?
    If anyone has any hints I would appreciate it.

    P.S. Note, that I'm pretty sure it's not the client leaking memory
    because
    if I shutdown the client and restart it with the same Illustrator COM
    server
    running it will immediately have the same problem. The COM error I get
    is an "internal error" exception:
    com_error: (-2147352567, 'Exception occurred.', (0, None, 'an
    internal error occurred: PARM', None, 0, -2147352577), None)

    Yours,
    Noah
    Noah, Jul 12, 2003
    #1
    1. Advertising

  2. Noah

    Bob Gailer Guest


    >"Noah" <> wrote in message
    >
    > > Hi,
    > >
    > > How do I shutdown a win32 COM server?
    > >


    If that does not do it try:
    comobject.Quit()

    Bob Gailer

    303 442 2625


    ---
    Outgoing mail is certified Virus Free.
    Checked by AVG anti-virus system (http://www.grisoft.com).
    Version: 6.0.500 / Virus Database: 298 - Release Date: 7/10/2003
    Bob Gailer, Jul 12, 2003
    #2
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. RZavulunov
    Replies:
    2
    Views:
    459
    Danny Tuppeny
    Jan 6, 2006
  2. julia
    Replies:
    6
    Views:
    456
    Sudsy
    Oct 19, 2004
  3. The Jetman
    Replies:
    4
    Views:
    569
    The Jetman
    Sep 29, 2003
  4. Paul Pittlerson

    How to check client shutdown?

    Paul Pittlerson, Aug 26, 2013, in forum: Python
    Replies:
    8
    Views:
    98
    Irmen de Jong
    Aug 27, 2013
  5. Replies:
    1
    Views:
    94
    dieter
    May 7, 2014
Loading...

Share This Page