is there some Win32 API I can use to get a list of opened folders? Process class will of course not do this, as it gets a list of running processes (programs) - not folders.
Thanks!
Printable View
is there some Win32 API I can use to get a list of opened folders? Process class will of course not do this, as it gets a list of running processes (programs) - not folders.
Thanks!
I don't think that's possible. You don't open folders and you can't make a folder unreadable unless it's restricted by security policies, unlike a file which can be unreadable because a program is using it. You ask for a list of files and subfolders of a folder, but you never get a HANDLE for a folder like you do a file. Therefore Windows cannot track who is still using a directory.
yeh, thought so but wasnt sure - thanks :)
But I think you can do that using ShDocVw COM component (if at all you are willing to) as the get_document() method of IWebBrowser gives you a reference to both HTML docs and the explorer windows. It has been quite a while since I used it, so don't have much re-collection how we did it.
How does using IWebBrowser allow you to determine what processes are using what directories on the hard drive?
It won't tell you what processes are using what folders but you can get the list of all open Windows explorer windows and I thought that's what the OP wanted.