Very simple fuser command.
LICENSE: free - enjoy!
- Changed to use NtQueryObject instead of NtQueryInformationFile, because
it was causing programs to crash. It must have been fiddling a bit with
the files it was checking on.
- The exact file matching wasn't working right. Fixed.
- The program had troubles under Windows 2008 R2 - it could not create
as many threads as I wanted to launch. So I changed the code to try
to minimize the number of threads at any one time.
- Fixed bug where NtQueryObject locked up so tight under XP on named
pipes that the fuser.exe process could not even exit. You couldn't even
kill the process under Task Manager. Anyway, I utilized PeekNamedPipe()
to detect whether or not it is a named pipe, and therefore ignore it.
- Changed to convert the \Device\HarddiskVolume* stuff into real drive
letters. It even handles network drives, which was a little bit of a
trick. Therefore, the file matching algorithm now takes the drive
- Fixed so that it will compile with a modern Microsoft Compiler.
- Had to fix some things in local.h since a structure I had defined is
already in the Microsoft headers.
- Had to rename an enumerator that conflicted with one that's already
defined elsewhere in the Microsoft headers.
- Fixed an uninitialized variable problem.
- Fixed handle leak when getting the filename.
- Rewrote makefile.
- Changed so that *any* object type is analyzed.
- Changed so that if a filename is given, if it starts with "\Device" we
won't treat it as a file (won't check to see if it exists).
- Changed access() and memcmp() calls to the POSIX-compliant versions.
- When searching for a file/device, print out what was being searched for
at the very top.
- Each thread will now pump out its own output, rather than having the
main thread do them all.
- The output has been changed to be less verbose. We will show the
PID in decimal, the short program name, and the filename.
- Changed so that only certain object types are analyzed. This has
greatly sped up the program, since 90% of what it was looking at
was essentially meaningless.
- Changed thread timeout from 200ms to a full second. I found that I was
declaring threads locked up that really weren't.
- Changed the thread cleanup logic that occurs while threads are being
launched. During this phase, we'll do a quick check to see if any
threads need cleaned up (as opposed to waiting forever). Of course,
at the very end we'll wait forever.
- The executable is now statically linked.