[python-win32] List references to a COM server, locks on a file

Cory Dodt corydodt at yahoo.com
Fri May 23 09:18:01 EDT 2003


I have the following problem.  I wrote a COM server that is launched by a
.dot file, a Word template.  The sequence of events is:

Word >
  launches all .dot files in C:\PF\MSO\startup >
    launches lexshell.dot >
      invokes methods on my COM server, "Lexicon.Python" >
        launches process lxaddin.exe

When installing an upgrade version, I want to list for the user all the
applications that need to be shut down to continue, rather than punch the
user in the face with a forced reboot.

In short, I need to list all the processes that are keeping either
lexshell.dot open or lxaddin.exe running.  I know that both Word and
Outlook can make this happen; there may be others.

For lxaddin, my thought was to invoking a COM method that lists all the
processes with references to lxaddin.  So I need to know the magic to make
a COM server list all of its own open references.

For lexshell.dot, I just want to know who has the file locked open.

When I'm done, I will display a list of the processes.

Any suggestions for either of these 2 problems?


__________________________________
Do you Yahoo!?
The New Yahoo! Search - Faster. Easier. Bingo.
http://search.yahoo.com



More information about the Python-win32 mailing list