Page 1 of 1

Command line version for handles

Posted: 05 Apr 2017 22:40
by KingSD
First of all , process hacker is working perfectly and its a good software but i am not kind of c++ guy and i need only command line tool of "Find Handles or DLLs" to make simple search of file type and process type of handles for using on my vb.net project , is it possible?

Re: Command line version for handles

Posted: 05 Apr 2017 22:51
by dmex
KingSD wrote: 05 Apr 2017 22:40
command line tool of "Find Handles or DLLs" to make simple search
https://technet.microsoft.com/en-us/sys ... andle.aspx

Re: Command line version for handles

Posted: 05 Apr 2017 23:01
by KingSD
Handle v4.1 is not viewing process type of handles , already tried it, thanks anyway.

Re: Command line version for handles

Posted: 17 Oct 2018 12:47
by dino
It would be even better to extract the code (without the GUI) that is used in "Find handles" to a component / library / DLL that is usable by other programs. I would like to use it in a C# application.
During my research I have found tons of posts from people that are looking for a similar API in many different programming languages (e.g. Powershell).
BTW: handle.exe didn't show handles for serial ports (which I am particularly interested in), but process explorer and processhacker did!

Re: Command line version for handles

Posted: 19 Nov 2018 04:17
by AltF4
dino wrote: 17 Oct 2018 12:47
It would be even better to extract the code (without the GUI) that is used in "Find handles" to a component / library / DLL that is usable by other programs. I would like to use it in a C# application.
During my research I have found tons of posts from people that are looking for a similar API in many different programming languages (e.g. Powershell).
BTW: handle.exe didn't show handles for serial ports (which I am particularly interested in), but process explorer and processhacker did!
Hi, I have C# code to do this. Perhaps I could compile some app with it and host it on github? I won’t make any commitments but hit me up with some specs you want the CLI app (and/ GUI Winform?) to do...

Re: Command line version for handles

Posted: 17 Jul 2019 12:34
by Guest
Hi AltF4,
sorry for the late reply, I forgot to check back periodically.
There is already C# code for this on Github: https://github.com/donid/WinKernelObjectsDotNet
This code worked on an older Win10 version, but then suddenly stopped working - it blocks indefinitely when it tries to get some specific handles (or throws exceptions)...
I did extensive research some months ago and it seemed that this is impossible to do reliably in C# since you need some sort of c++ driver.
That was quite a while ago, so I forgot the details. And since processhacker has everything that is needed and it works brilliantly I thought it
would be the a good Idea to make that feature available for C# programmers (which would automatically help Powershell programmers).

Command line version for handles

Posted: 24 Feb 2020 00:16
by ninireufame
I an not sure if the below feature already exists or not... If it does, please let me know how to do it if Not, then it would be great to have it in next version..

I want to issue a command at start of each connection.

For example: stty erase ?

Thanks