My employers asked me to find a way to make a service that runs when a virtual drive is mounted and checks if either the user or a foreign process tries to access it, in case it does, the service should notify the the software responsible for managing the drive and unmount it. This is Because they don't want no one to mess around with the files that are within the drive.
I tried to look up some questions here on stackoverflow, and what I found was: - block the files within the drive DirectoryInfo; - Create a driver with minifilter that checks if file is accessed;
But none of them really answer my question.
I have the code to create and mount the drive and to unmount the drive, I also have the code to block the files with DirectoryInfo, but I don't know how to proceed
Can someone tell me if what I'm trying to achieve is possible, and if so what is the path I should take to do so!