How to hook C++ in Explorer's rename event

前端 未结 2 1526
慢半拍i
慢半拍i 2021-01-19 10:45

I can\'t be clearer than my title. :P

I want to run my program whenever a user renames a file in Windows Explorer (and only within the Explorer). Here\'s a simple mo

2条回答
  •  自闭症患者
    2021-01-19 11:11

    It looks like Windows API hooking may be your best bet. You'll want to intercept all calls related to Windows file renaming (i.e. MoveFile, MoveFileEx, SHFileOperation, possibly more). There are a few commercial and open source solutions; Microsoft Detours, Madshi's madCodeHook, and the free, open source EasyHook.

    This approach, when done correctly, will allow you to capture all file renaming on a system.

提交回复
热议问题