I'm trying to eject a (virtual) removable drive, and it fails because there are some file handles open, maybe explorer windows. What's the best way to get all the open handles to files on that drive and close them?
Is it also feasible (within user-mode) to find any processes running off that drive, so I can warn the user with the process name?
Ideally I'd like to do this within a user-mode app rather than require admin privileges.
I'm using VC++ in Visual Studio 2005, in an MFC app, but samples in any language would be welcome!