用ReadDirectoryChangesW()函数。msdn上有相应的例子 fwatch。ReadDirectoryChangesW
The ReadDirectoryChangesW function retrieves information describing the changes occurring within a directory.BOOL ReadDirectoryChangesW(
  HANDLE hDirectory,                                  // handle to directory
  LPVOID lpBuffer,                                    // read results buffer
  DWORD nBufferLength,                                // length of buffer
  BOOL bWatchSubtree,                                 // monitoring option
  DWORD dwNotifyFilter,                               // filter conditions
  LPDWORD lpBytesReturned,                            // bytes returned
  LPOVERLAPPED lpOverlapped,                          // overlapped buffer
  LPOVERLAPPED_COMPLETION_ROUTINE lpCompletionRoutine // completion routine
);