VC++ 文件监控(二) FindFirstChangeNotification
摘要:
原因: 因为ReadDirectoryChangesW 上次测试发现不能多级目录监控, 所以尝试用FindFirstChangeNotification来实施文件监控。关键代码:CFolderMonitorDlg *dlg = (CFolderMonitorDlg*)lParam; HANDLE hEvent;//监控句柄 CString path ;//监控目录 GetCurrentDirectory(MAX_PATH,path.GetBuffer(MAX_PATH+1)); hEvent = FindFirstChangeNotification(path,TRUE,FILE_NOTIFY 阅读全文
posted @ 2011-08-17 10:13
DoubleSnake
阅读(7914)
评论(0)
推荐(1)
浙公网安备 33010602011771号