Copyright © 2007 Linchpin Labs
Introduction
Handle Viewer is a tool with both a GUI and command line interface for listing, searching and manipulating open handles on 32 bit (x86) and 64 bit (x64) editions of Windows XP, 2003 and Vista. Handle Viewer is designed to help developers as a debugging and performance analysis tool to account for the object resource usage of their applications. It can also help Administrators track object usage on their systems. For example, it can be used to hunt down applications that have open handles on directories that are preventing deletion. Handle Viewer can help resolve the following fustrating dialog box.
GUI Interface
The Handle Viewer GUI application will load the Handle Viewer driver upon startup, and enumerate the all handles on the system. One can then optionally filter handles by using the View»Search menu, which will perform a string search of Handle Names and Process Names, and display the filtered results.
Figure 1: Handle Viewer after startup with a full handle list.
Figure 2: Handle Viewer with results filtered using a filter of ".sys"
Handle Viewer provides the ability to decrement the handle count of the object that a given handle references. This is accomplished by highlighting the target handle, right clicking to bring up the menu, and choosing the "Close Handle" option. This may cause the handle itself to close, but actual behavior is dependent on the object's actual handle count.
Handle Viewer can also be used to forcibly terminate a process. By highlighting any handle name owned by the target process, one can right click to bring up a menu and terminate the process by selecting "End Process".
Command Line Interface
The Handle Viewer command line application is similar to the GUI in functionality. For Windows Vista usage, the user must run it from a command prompt with Administrator privileges. To start a command prompt with administrator privileges, click on the Windows Start button, select All Programs and locate the Command Prompt in the Accessories menu. Next, right-click on Command Prompt menu item and click the "Run as Administrator" option:
- HandleViewerCmd -h "filter"
This command lists all handles whose handle name or process name matches the "filter".
- HandleViewerCmd -p ‹process id›
This command lists all handles owned by the process identified by the supplied ‹process id›.
- HandleViewerCmd -k ‹process id›
This command forcibly terminates the process identified by the supplied ‹process id›.
- HandleViewerCmd -c ‹process id› ‹handle id›
This command decrements the handle count of the object referenced by the handle associated with the supplied ‹handle id› and ‹process id›. Note that this may result in the target handle being closed.
Reporting Bugs & Feedback
If you encounter a problem while running Handle Viewer, please visit
www.linchpinlabs.com to obtain the latest version. If you still have problems please send any information you have on the problem to
info@linchpinlabs.com.
Terms of Use
Linchpin Labs and affiliates' source-code and software may not be used in any product or distributed in any form without written consent. All enquiries should be made to
info@linchpinlabs.com.
This software is provided "as is", without warranty or guarantee of any kind. The use of this software is at your own risk. We take no responsibly for any damage that may be caused through its use.
THE ENTIRE RISK FROM THE USE OF THIS SOFTWARE REMAINS WITH YOU.
Download Handle Viewer