开发者

Terminate a java application from Delphi program

How can I kill a process which is started by ShellExecute() in Delphi 7. When clicking a button a java app开发者_如何学JAVAlication is opened. It works perfectly. I need to close the process by clicking another button. How can I terminate the java application from delphi?


In this case you would be better to use ShellExecuteEx() to start the process. This allows you to obtain the newly created process handle which is not returned by ShellExecute. Once you have that you simply call TerminateProcess. As yet another alternative, you may consider creating the process with CreateProcess.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜