4.7. Detecting Changes to Directories and Files

The 32-bit APIs contains a set of functions that allow you to detect changes in files and directories. For example, if you set up a change notification handle on a certain directory and a new file appears in that directory, you can detect it in your application.

Two applications that allow you to see this capability in action are the File Manager and Visual C++ (VC++). In VC++, if someone modifies a file that VC++ has open, then VC++ will recognize the change and advise you of it. For example, another user might attach to your drive over the network, open a file with Notepad, modify it, and write it back to the disk. VC++ will post an error dialog when it detects the change, and ask you what to ...

Get Win32 System Services: The Heart of Windows® 98 and Windows® 2000 now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.