通过单击相关可执行文件的窗口来确定进程 ID
有人可以告诉我如何完成以下任务:
通过单击应用程序的窗口,我想确定相关可执行文件的进程 ID。
can someone give me a clue as to how to accomplish the following:
By clicking on an application's window, I'd like to determine the process id of executable concerned.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
要使其在 .NET 中工作,需要进行大量的 Win32 API 调用。我建议您查看 .NET 开源项目 Process Hacker,因为它已经完成了您想要的操作。
它已获得 LGPL 许可,并提供可包含在您的项目中以获得其功能的库。来自常见问题解答
There is a fair amount of Win32 API calls required to get this to work in .NET. I would suggest you look at the .NET open source project Process Hacker as it does what you want already.
It is LGPL licensed and provides libraries to include in your project to get it's functionality. From the FAQ