Monday, 15 February 2010

winapi - Verify excel or word is really running or not (has a open window) in the system -


When we look at the Windows Task Manager process, sometimes we are running excel.exe or winword.exe, but There is no Excel or open windows in the system. But this is going on in memory How can I find excel.exe or winword.exe which is an open window in the task manager process or not? This excel.exe or winword.exe is created by a separate application which is not shutting it correctly. I can not fix that application, but I have to stop this process.

Is there a way to find out if a window / application is actually open in the system?

I can check and hit the process with the following code, but Excel has no window title, where Excel file is opened from a website, but it fails.

  process [] procs; Try {Procs = Process.GetProcessesByName ("Excel"); FORECA (Process Process in Process) {If Croprosis Hassified & String.EasnalOrcti (CropropsManWindotil)} {Cropros. Kill (); }}} Hold (Exception Pre) {WriteLog (ex.ToString ()); }   

Any suggestions for doing this?

Try to create it, leaving it myself, I think the following methods should be available to you.

  curprocess.Application.Quit ();}   

Good luck, lc

No comments:

Post a Comment