我有一个应用程序,它调用了用 delphi 编写的其他几个 .exe 组件。我问的问题是,是否可以关闭delphi应用程序及其打开的所有应用程序(单击“[x]”按钮时)?
此外,显然,我已经学会了如何打开和关闭外部应用程序,但在某些情况下(例如 Windows Media Player)它似乎不起作用......任何人都可以给我一些解决方案吗?
提前致谢
最佳答案
您可以使用Job Objects
,阅读这些函数的文档 CreateJobObject
和 AssignProcessToJobObject
.
A job object allows groups of processes to be managed as a unit.... Examples include enforcing limits such as working set size and process priority or terminating all processes associated with a job.
关于windows - 关闭delphi应用程序及其打开的另一个应用程序,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9971206/