开发者

Determine process id by clicking on the window of the executable in question

开发者 https://www.devze.com 2022-12-08 21:02 出处:网络
can someone give me a clue a开发者_高级运维s to how to accomplish the following: By clicking on an application\'s window, I\'d like to determine the process id of executable concerned.There is a fai

can someone give me a clue a开发者_高级运维s to how to accomplish the following:

By clicking on an application's window, I'd like to determine the process id of executable concerned.


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

I'm a developer. Can I use the various functions provided by Process Hacker in my own program?
If you're using a .NET-based language (C#, VB.NET), absolutely! Simply download the source code (or checkout the latest SVN revision), build the solution, and reference ProcessHacker.Common and ProcessHacker.Native in your project.

0

精彩评论

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