How to get PID of invoked COM object?

J

Joe Schmoe

Have an ASP.NET process that uses interop to Excel COM objects, which
results in a separate EXCEL.EXE instance for each one. Yes, this is
specifically not encouraged by Microsoft because it gets flaky at times, but
that's what my job said to do. I've come up with a pretty good way to keep
Excel under control in 99.9% of the cases. However, every once in a while I
lose control of the Excel object and cannot shut it down.

What I'm looking for is a way to get the PID of each newly invoked EXCEL.EXE
process that is spun off.

I've not been able to figure out how to do that. I'd like to write them all
to a database table and then have a scheduled process go through and kill
them if they are still alive. We have some other ASP.NET and ASP.old apps
that also invoke Excel objects, so I'm trying to keep the killing scoped to
only the Excel objects invoked by my app.

How do I access the PID of a newly invoked Excel object?

TIA
 

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,769
Messages
2,569,581
Members
45,056
Latest member
GlycogenSupporthealth

Latest Threads

Top