Sometimes during debugging I need to get handle value for known object (file or dll) opened by debugee. It can help to find who holds this handle.
How can I achieve that?
There is Sysinternals's utilities named Handle and Process Explorer.
Handle has command line interface and should be used like this:
handle [-p <pid>] <file path>
To get handle value in Process Explorer:
View -> Select Columns...
Handle
tabHandle Value