用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
);
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
);
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货