Is it possible to check if a file is accessible in a specific directory by process X and get the process identifier (in C ++ or better C #)?
I think that there should be a moment when a process accesses a file before it opens it. (for example, antivirus tools also use this)
Example:
- I double click the txt file
- Before notepad is automatically opened, a C ++ or C # program must get the process identifier in notepad before it is opened.
Is it possible? Someone told me that this can be done with low-level hooks, but I did not find a โfile access hookโ.
Thank.
source
share