如何拦截低级 Windows 文件重命名 API
How To Intercept Low-Level Windows File Rename API
在 Windows 10 上有没有办法 (a) 以编程方式检测重命名文件的低级调用,以及 (b) 确定哪个进程在做它,是否是由 Microsoft .NET、GCC、Qt/C++ 或其他 C 语言完成的?
来自eryksun:
这需要 file-system minifilter driver, like what Process Monitor does. For example, a rename via MoveFileEx
calls the system service NtSetInformationFile
to set the FileRenameInformation
. Then the I/O Manager calls the file system device stack with an IRP_MJ_SET_INFORMATION
。
在 Windows 10 上有没有办法 (a) 以编程方式检测重命名文件的低级调用,以及 (b) 确定哪个进程在做它,是否是由 Microsoft .NET、GCC、Qt/C++ 或其他 C 语言完成的?
来自eryksun:
这需要 file-system minifilter driver, like what Process Monitor does. For example, a rename via MoveFileEx
calls the system service NtSetInformationFile
to set the FileRenameInformation
. Then the I/O Manager calls the file system device stack with an IRP_MJ_SET_INFORMATION
。