If I read or write to a file and receive a 33 or 32 error, I would like to log a message containing the name of the other process(es) that have the file opened. There must be a Win32 API I could use to get this info. Process Explorer displays it. Of course, Process Explorer also has info about all processes in memory. I'd prefer to find the culprit without interrogating all processes.
views:
1170answers:
2
+1
A:
The Handle program from SysInternals does this as well, but I'm not sure how. I don't think there is a single documented API to do this. I think you have to iterate over the processes, enumerate each of the handles in the process, and then determine the filename associated with that handle.
Nick
2008-10-08 17:50:11