In windows, ultimately any file access is granted, by the underlying winapi. See CreateFile and familly. These functions are hook-able by Microsoft Detours (though it is intended for instrumention purposes). There are also a handfull of other libraries for this sort of purposes e.g. easyhook.
File monitor- c# or c++ [closed]
-
29-08-2022 - |
문제
I am developing a file monitor to monitor file access of any exe. I monitor that exe for any file it opens/closes,reads/writes and collect the stats.
I am total newcomer to ETW (as from my research, it does not look there is any other way to do this.)
while I have been able to get some c++ code going, my client would prefer a c# solution.is there enough support in c# to monitor file io?
the samples in msdn are c++/c specific. I read vance Morrison's blogs.but its beyond me at the moment and they don't seem to suit "nt kernel logging sessions/ monitor file io" scenarios.
can anyone give me a simple sample or point me to a useful link ? any inputs is welcome on this.
해결책
다른 팁
Take a look at the FileSystemWatcher class.
제휴하지 않습니다 StackOverflow