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
  • 134,889
  • 20
  • 356
  • 483
Nick Krasnov
  • 26,886
  • 6
  • 61
  • 78

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
  • 134,889
  • 20
  • 356
  • 483
  • 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