Im using C++ and im trying to create a program similar to handle.exe from sysinternals.
Basically, i am getting the filename from the user, and I need to be able to display which process is locking the file.
Does anyone know where I can get this information from? I've tried using some process functions in winapi, but I cant figure out how to get this information,
Here is an example of what im trying to create:
http://www.kartmann.org/freeware/WhoSLocking/ReadMe.htm
Thanks in advance
There is an undocumented option on NtQuerySystemInformation to get the file handles for a process. There is sample code here.
Second sample (in Delphi) is here.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With