12#if defined(_tsplitpath) && !defined(_tsplitpath_s)
13#define _tsplitpath_s(f, d,dl, p,pl, n,nl, e,el) _tsplitpath(f, d, p, n, e)
15#define _wsplitpath_s(f, d,dl, p,pl, n,nl, e,el) _wsplitpath(f, d, p, n, e)
16#define _splitpath_s(f, d,dl, p,pl, n,nl, e,el) _splitpath(f, d, p, n, e)
46 lpDrive[2] = (
TCHAR)
'\\';
47 lpDrive[3] = (
TCHAR)
'\0';
58 printf(
"\n ERROR: FindFirstChangeNotification function failed.\n");
71 printf(
"\n ERROR: FindFirstChangeNotification function failed.\n");
78 if ((dwChangeHandles[0] ==
NULL) || (dwChangeHandles[1] ==
NULL))
80 printf(
"\n ERROR: Unexpected NULL from FindFirstChangeNotification.\n");
91 printf(
"\nWaiting for notification...\n");
106 printf(
"\n ERROR: FindNextChangeNotification function failed.\n");
119 printf(
"\n ERROR: FindNextChangeNotification function failed.\n");
131 printf(
"\nNo changes in the timeout period.\n");
135 printf(
"\n ERROR: Unhandled dwWaitStatus.\n");
156 _tprintf(
TEXT(
"Directory tree (%s) changed.\n"), lpDrive);
BOOL WINAPI FindNextChangeNotification(IN HANDLE hChangeHandle)
#define INVALID_HANDLE_VALUE
VOID WINAPI ExitProcess(IN UINT uExitCode)
void WatchDirectory(LPTSTR)
void RefreshDirectory(LPTSTR)
DWORD WINAPI WaitForMultipleObjects(IN DWORD nCount, IN CONST HANDLE *lpHandles, IN BOOL bWaitAll, IN DWORD dwMilliseconds)
DWORD WINAPI GetLastError(void)
#define FindFirstChangeNotification
#define FILE_NOTIFY_CHANGE_FILE_NAME
#define FILE_NOTIFY_CHANGE_DIR_NAME