把下面的代码放在线程中处理
void WatchDirectory(LPTSTR lpDir)
{
DWORD dwWaitStatus;
HANDLE dwChangeHandles[2];
TCHAR lpDrive[4];
TCHAR lpFile[_MAX_FNAME];
TCHAR lpExt[_MAX_EXT];
_tsplitpath(lpDir, lpDrive, NULL, lpFile, lpExt);
lpDrive[2] = (TCHAR)'//';
lpDrive[3] = (TCHAR)'/0';
// Watch the directory for file creation and deletion.
dwChangeHandles[0] = FindFirstChangeNotification(
lpDir, // directory to watch
FALSE, // do not watch subtree
&nb