> I've just spent a small amount of time looking as well... I'm
> afraid it doesn't look like you can find out. I was wondering
> if you could walk the process list to find out what handles
> it had open, and then query each handle to see if it referred
> to the file in question, thus building a list of handles
> referring to your file (thus, the number of times it has bee
> opened, ignoring duplicate handles)... but I can't seem to
> see any functions for doing that.
Unfortunately I'm being on a fresh copy of Windows, and I'm afraid I
won't be able to install the MSDN collection until some days to come
(since I lack the enough time). What I know without having to look at
the MSDN is that this is possible. VS.NET supports this same feature
using its undocumented $handles switch (to see it in action, start
debugging an app in VC7, and type $handles in the Watch window, and
change its value to 0, and then look at the output window.) I suspect
this functionality can be accessed using either the PSAPI or the
ToolHelp set of APIs, though this is merely a guess.
-------------
Ehsan Akhgari
List Owner: [EMAIL PROTECTED]
[ Email: [EMAIL PROTECTED]; [EMAIL PROTECTED] ]
[ WWW: http://www.beginthread.com/Ehsan ]
