I need to check when a specific application (that I known) access to a specific file (that I know)
In short I need to hook an external application to see when start to play a scecific wav file.
I like to track "before" or "during" but not "after" play the file.
To try to do it, I have imported this code on a console application:
to do a test I have inserted this code;
var list = DetectOpenFiles.GetOpenFilesEnumerator(4780);
while (list.MoveNext())
Console.WriteLine(list.Current.FullName);
on main module where 4780 is the PID of a mediaplayer that play a wav file.
At debug (list.Current.FullName) I see only the file dependence but don't show me the wav file opened.
After show the first 2/3 debug lines the application crash (out of memory).
If I press F5 without debug the application crash (out of memory).
There is an easy to track when an external application play a specific wav file ?