2

There's a possibility to hook folder modification operations(copy, delete, rename and so forth), but unfortunately I need hook those operations applied to files. Any thoughts?

Environment:

Delphi XE2, Windows XP/7/2008

Thanks.

RRUZ
  • 133,023
  • 16
  • 348
  • 476
Nick Krasnov
  • 26,363
  • 6
  • 58
  • 76

1 Answers1

7

I know two options

1) You can hook the WinAPi functions like CopyFile and CopyFileEx creating a system wide hook, wrtting the hook yourself or using a API hook library like madCodeHook or Deviare API hook (I've used both libraries with great results.)

2) Writting a File System Filter Driver.

RRUZ
  • 133,023
  • 16
  • 348
  • 476
  • WinAPI can also be hooked with Microsoft's Detours library, which comes with an example of such hooks – Roman L Feb 08 '12 at 18:17