Intercept FIleSytemCall for Deletion

后端 未结 3 1874
长发绾君心
长发绾君心 2020-12-12 06:34

Is there a way to detect deletion of a file before windows performs the deletion? I found FileSystemWatcher class but the event is raised only after the delete action is per

3条回答
  •  刺人心
    刺人心 (楼主)
    2020-12-12 07:11

    Or may try ICopyHook interface.

    http://msdn.microsoft.com/en-us/library/windows/desktop/bb776049%28v=vs.85%29.aspx

    In CopyCallback method use FO_DELETE in wFunc parameter, to specify delete operation.

    Disadvantage: Only prevent deletion in Windows Shell.

提交回复
热议问题