shutdown external application
-
Hi, I have a problem where I want to shutdown an external win32 software client from my C#/ASP.net application by pressing a button. I understand that I have to use WM_CLOSE somehow but I dont know how to use it in my C# solution. I use shelling (VBscript) to lanuch external software on my computer: Example: function() ... objShell.run ("""C:\Program Files\Overview\Overview.exe""- u testuser - p testuser endfunction() This works great but if the application( in this case overview.exe) is already running I want to be able to shut it down by pressing a button before I lanuch it . Please help! /Ibana
-
Hi, I have a problem where I want to shutdown an external win32 software client from my C#/ASP.net application by pressing a button. I understand that I have to use WM_CLOSE somehow but I dont know how to use it in my C# solution. I use shelling (VBscript) to lanuch external software on my computer: Example: function() ... objShell.run ("""C:\Program Files\Overview\Overview.exe""- u testuser - p testuser endfunction() This works great but if the application( in this case overview.exe) is already running I want to be able to shut it down by pressing a button before I lanuch it . Please help! /Ibana
Youw ill send to call sendMessage on the process. First you must get a handle to the process and save that inside IntPrt. Then call the SendMessage function. You will have to use PInvoke to register the SendMessage function Its located in the windows API http://www.experts-exchange.com/Programming/Programming_Languages/C_Sharp/Q_21666702.html[^] 1 line of code equals many bugs. So don't write any!!