如何从另一个exe关闭一个exe? [英] How to close one exe from another exe ?

查看:118
本文介绍了如何从另一个exe关闭一个exe?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述





C ++中有一个正在运行的主要.exe,还有另外两个.exe,一个是C ++,另一个是Dot net。



我想在main.exe终止时终止其他.exe文件。



我尝试过的事情:



我不知道在这种情况下该做什么。

我正在谷歌搜索,发现如何从应用程序内部关闭一个应用程序。

Hi ,

There is one main .exe in C++ which is running and there are two other .exe one is in C++ and other is in Dot net.

I want to terminate both other .exe file when main.exe is terminated.

What I have tried:

I do not what to do in this scenario.
I was googling for that and found that how to close an application from inside the application.

推荐答案

甚至有一篇关于这个的MSDN文章非常主题:如何使用Visual C ++关闭其他应用程序 [ ^ ]。
There's even a MSDN article on this very topic: How to use Visual C++ to close another application[^].


防止此追加是一个安全功能,否则,每个恶意软件都会使用它。



- 解决方案1)其他程序有远程终止的规定,你的程序必须与他人通信并发送终止信号。



- 解决方案2)你的程序需要权限提升才能远程杀死他人,你还需要权限才能这样做。这不适合初学者,因为这种事情没有保障。
Preventing this to append is a security feature, otherwise, every malware would use it.

- Solution 1) the other programs have provisions for remote terminating, and your program have to communicate with others and send terminating signal.

- solution 2) your program need privileges elevation to remotely kill others, you also need privileges to do so. This is not for beginners, because there is no safeguard for this kind of things.


这篇关于如何从另一个exe关闭一个exe?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆