33#define WIN32_NO_STATUS
54 ok(
ret,
"FindCloseChangeNotification error: %ld\n",
95 static const char prefix[] =
"FCN";
103 "FindFirstChangeNotification error: %ld\n",
GetLastError());
107 "Expected INVALID_HANDLE_VALUE, got %p\n", change);
109 "FindFirstChangeNotification error: %lu\n",
GetLastError());
142 "FindFirstChangeNotification error: %ld\n",
GetLastError());
259 static const WCHAR szBoo[] = {
'\\',
'b',
'o',
'o',0 };
260 static const WCHAR szHoo[] = {
'\\',
'h',
'o',
'o',0 };
261 static const WCHAR szZoo[] = {
'\\',
'z',
'o',
'o',0 };
264 ok(
r != 0,
"temp path failed\n");
277 ok(
r ==
TRUE,
"failed to create directory\n");
300 ok(
r ==
TRUE,
"find next failed\n");
306 ok(
r ==
TRUE,
"failed to remove file\n");
315 ok(
r ==
TRUE,
"find next failed\n");
321 ok(
r ==
TRUE,
"failed to create subdir\n");
330 ok(
r ==
TRUE,
"find next failed\n");
336 ok(
r ==
TRUE,
"failed to remove subdir\n");
345 ok(
r ==
TRUE,
"find next failed\n");
348 ok(
r ==
TRUE,
"find next failed\n");
351 ok(
r ==
TRUE,
"should succeed\n");
354 ok(
r ==
TRUE,
"failed to remove dir\n");
396 ok(
r ==
TRUE,
"failed to remove dir\n");
406 static const WCHAR szBoo[] = {
'\\',
'b',
'o',
'o',0 };
407 static const WCHAR szHoo[] = {
'\\',
'h',
'o',
'o',0 };
408 static const WCHAR szGa[] = {
'\\',
'h',
'o',
'o',
'\\',
'g',
'a',0 };
413 ok(
r != 0,
"temp path failed\n");
427 ok(
r ==
TRUE,
"failed to create directory\n");
432 ok(
r==
FALSE,
"should return false\n");
445 ok(
r==
FALSE,
"should return false\n");
450 ok(
r==
FALSE,
"should return false\n");
468 ok(
r==
FALSE,
"should return false\n");
472 ok(
r==
FALSE,
"should return false\n");
475 ok(
r==
TRUE,
"should return true\n");
481 ok(
r ==
TRUE,
"failed to create directory\n");
499 ok(
r==
FALSE,
"should return false\n");
503 ok(
r==
FALSE,
"should return false\n");
514 ok(
r==
TRUE,
"should return true\n");
523 ok(
r ==
TRUE,
"failed to remove directory\n");
534 ok(
r ==
TRUE,
"getoverlappedresult failed\n");
535 ok( dwCount == 0x12,
"count wrong\n");
546 ok(
r==
TRUE,
"should return true\n");
549 ok(
r ==
TRUE,
"failed to create directory\n");
559 ok(
r==
TRUE,
"should return true\n");
562 ok(
r ==
TRUE,
"failed to create directory\n");
586 got_subdir_change =
TRUE;
592 if (got_subdir_change)
break;
595 ok(
r==
TRUE,
"should return true\n");
597 ok(got_subdir_change,
"didn't get subdir change\n");
600 ok(
r ==
TRUE,
"failed to remove directory\n");
605 ok(
r==
TRUE,
"should return true\n");
608 ok(
r ==
TRUE,
"failed to remove directory\n");
633 ok(
r ==
TRUE,
"failed to remove directory\n");
645 static const WCHAR szBoo[] = {
'\\',
'b',
'o',
'o',0 };
646 static const WCHAR szHoo[] = {
'\\',
'h',
'o',
'o',0 };
650 ok(
r != 0,
"temp path failed\n");
660 ok(
r ==
TRUE,
"failed to create directory\n");
679 ok(
r==
TRUE,
"should return true\n");
685 ok(
r ==
TRUE,
"failed to create directory\n");
700 ok(
r==
TRUE,
"should return true\n");
706 ok(
r ==
TRUE,
"failed to remove directory\n");
720 ok(
r ==
TRUE,
"failed to remove directory\n");
731 static const WCHAR szBoo[] = {
'\\',
'b',
'o',
'o',0 };
732 static const WCHAR szHoo[] = {
'\\',
'h',
'o',
'o',0 };
733 static const WCHAR szFoo[] = {
'\\',
'f',
'o',
'o',0 };
737 ok(
r != 0,
"temp path failed\n");
751 ok(
r ==
TRUE,
"failed to create directory\n");
764 ok(
r==
TRUE,
"should return true\n");
770 ok(
r ==
TRUE,
"failed to create directory\n");
789 ok(
r ==
TRUE,
"failed to delete file\n");
792 ok(
r ==
TRUE,
"failed to remove directory\n");
797 ok(
r ==
TRUE,
"failed to remove directory\n");
802 ok(
error == 0,
"ReadDirectoryChangesW error %ld\n",
error);
803 ok(ov->
hEvent == (
void*)0xdeadbeef,
"hEvent should not have changed\n");
808 static const WCHAR szBoo[] = {
'\\',
'b',
'o',
'o',
'\\',0 };
809 static const WCHAR szDir[] = {
'd',
'i',
'r',0 };
810 static const WCHAR szFile[] = {
'f',
'i',
'l',
'e',0 };
811 static const WCHAR szBackslash[] = {
'\\',0 };
820 ok(
r != 0,
"temp path failed\n");
836 ok(
r ==
TRUE,
"failed to create directory\n");
843 memset(&ov, 0,
sizeof(ov));
844 ov.
hEvent = (
void*)0xdeadbeef;
847 ok(
r ==
TRUE,
"ReadDirectoryChangesW failed\n");
854 ok(
r != 0,
"failed to receive file creation event\n");
864 ok(
r ==
TRUE,
"ReadDirectoryChangesW failed\n");
868 ok(
r ==
TRUE,
"failed to create directory\n");
871 ok(
r ==
TRUE,
"failed to move file\n");
874 ok(
r != 0,
"failed to receive file move event\n");
884 ok(
r ==
TRUE,
"ReadDirectoryChangesW failed\n");
887 ok(
r ==
TRUE,
"failed to move file\n");
890 ok(
r != 0,
"failed to receive file move event\n");
900 ok(
r ==
TRUE,
"ReadDirectoryChangesW failed\n");
903 ok(
r ==
TRUE,
"failed to delete file\n");
906 ok(
r != 0,
"failed to receive file removal event\n");
923 ok(
r ==
TRUE,
"ReadDirectoryChangesW failed\n");
926 ok(
r ==
TRUE,
"failed to move directory\n");
929 ok(
r != 0,
"failed to receive directory move event\n");
939 ok(fni_next->
NextEntryOffset == 0,
"there should be no more events in buffer\n");
954 ok(
r ==
TRUE,
"ReadDirectoryChangesW failed\n");
957 ok(
r != 0,
"failed to receive directory move event\n");
962 ok(
r ==
TRUE,
"failed to create directory\n");
965 ok(
r ==
TRUE,
"failed to remove directory\n");
969 ok(
r ==
TRUE,
"ReadDirectoryChangesW failed\n");
972 ok(
r != 0,
"failed to receive directory creation event\n");
984 ok(
r ==
TRUE,
"ReadDirectoryChangesW failed\n");
987 ok(
r != 0,
"failed to receive directory removal event\n");
990 ok(fni_next->
NextEntryOffset == 0,
"there should be no more events in buffer\n");
1004 HANDLE parent_watch, child_watch, parent_thread, child_thread;
1043 ok(
ret,
"Missed parent notification\n");
1045 ok(
ret,
"Missed child notification\n");
1056 "FindFirstChangeNotification error: %ld\n",
GetLastError());
1060 "FindFirstChangeNotification error: %ld\n",
GetLastError());
1075 ok(
ret,
"Missed child notification\n");
BOOL WINAPI FindCloseChangeNotification(IN HANDLE hChangeHandle)
BOOL WINAPI FindNextChangeNotification(IN HANDLE hChangeHandle)
BOOL WINAPI ReadDirectoryChangesW(IN HANDLE hDirectory, IN LPVOID lpBuffer OPTIONAL, IN DWORD nBufferLength, IN BOOL bWatchSubtree, IN DWORD dwNotifyFilter, OUT LPDWORD lpBytesReturned, IN LPOVERLAPPED lpOverlapped OPTIONAL, IN LPOVERLAPPED_COMPLETION_ROUTINE lpCompletionRoutine)
HANDLE WINAPI FindFirstChangeNotificationW(IN LPCWSTR lpPathName, IN BOOL bWatchSubtree, IN DWORD dwNotifyFilter)
HANDLE WINAPI FindFirstChangeNotificationA(IN LPCSTR lpPathName, IN BOOL bWatchSubtree, IN DWORD dwNotifyFilter)
#define ERROR_INVALID_PARAMETER
#define INVALID_HANDLE_VALUE
#define CreateFileA(a, b, c, d, e, f, g)
#define ERROR_INVALID_HANDLE
#define FILE_ATTRIBUTE_NORMAL
BOOL WINAPI DeleteFileA(IN LPCSTR lpFileName)
BOOL WINAPI DeleteFileW(IN LPCWSTR lpFileName)
BOOL WINAPI RemoveDirectoryA(IN LPCSTR lpPathName)
BOOL WINAPI CreateDirectoryW(IN LPCWSTR lpPathName, IN LPSECURITY_ATTRIBUTES lpSecurityAttributes)
BOOL WINAPI RemoveDirectoryW(IN LPCWSTR lpPathName)
BOOL WINAPI CreateDirectoryA(IN LPCSTR lpPathName, IN LPSECURITY_ATTRIBUTES lpSecurityAttributes)
BOOL WINAPI SetFileAttributesA(LPCSTR lpFileName, DWORD dwFileAttributes)
DWORD WINAPI GetFileAttributesA(LPCSTR lpFileName)
BOOL WINAPI MoveFileA(IN LPCSTR lpExistingFileName, IN LPCSTR lpNewFileName)
BOOL WINAPI MoveFileW(IN LPCWSTR lpExistingFileName, IN LPCWSTR lpNewFileName)
BOOL WINAPI WriteFile(IN HANDLE hFile, IN LPCVOID lpBuffer, IN DWORD nNumberOfBytesToWrite OPTIONAL, OUT LPDWORD lpNumberOfBytesWritten, IN LPOVERLAPPED lpOverlapped OPTIONAL)
DWORD WINAPI GetTempPathW(IN DWORD count, OUT LPWSTR path)
DWORD WINAPI GetTempPathA(IN DWORD nBufferLength, OUT LPSTR lpBuffer)
VOID WINAPI ExitThread(IN DWORD uExitCode)
HANDLE WINAPI DECLSPEC_HOTPATCH CreateThread(IN LPSECURITY_ATTRIBUTES lpThreadAttributes, IN DWORD dwStackSize, IN LPTHREAD_START_ROUTINE lpStartAddress, IN LPVOID lpParameter, IN DWORD dwCreationFlags, OUT LPDWORD lpThreadId)
BOOL WINAPI GetExitCodeThread(IN HANDLE hThread, OUT LPDWORD lpExitCode)
_ACRTIMP int __cdecl memcmp(const void *, const void *, size_t)
UINT WINAPI GetTempFileNameA(IN LPCSTR lpPathName, IN LPCSTR lpPrefixString, IN UINT uUnique, OUT LPSTR lpTempFileName)
GLuint GLuint GLsizei count
GLdouble GLdouble GLdouble r
GLint GLint GLint GLint GLint GLint GLint GLbitfield GLenum filter
BOOL WINAPI GetOverlappedResult(IN HANDLE hFile, IN LPOVERLAPPED lpOverlapped, OUT LPDWORD lpNumberOfBytesTransferred, IN BOOL bWait)
static void test_readdirectorychanges_cr(void)
static void test_ffcn(void)
static void test_ffcn_directory_overlap(void)
static void test_FindFirstChangeNotification(void)
static void test_ffcnMultipleThreads(void)
static HANDLE StartNotificationThread(LPCSTR path, BOOL subtree, DWORD flags)
static void test_readdirectorychanges(void)
static DWORD CALLBACK NotificationThread(LPVOID arg)
static void test_readdirectorychanges_filedir(void)
static void CALLBACK readdirectorychanges_cr(DWORD error, DWORD len, LPOVERLAPPED ov)
static DWORD FinishNotificationThread(HANDLE thread)
static void test_readdirectorychanges_null(void)
LPSTR WINAPI lstrcpyA(LPSTR lpString1, LPCSTR lpString2)
LPWSTR WINAPI lstrcatW(LPWSTR lpString1, LPCWSTR lpString2)
LPSTR WINAPI lstrcatA(LPSTR lpString1, LPCSTR lpString2)
#define FILE_FLAG_OVERLAPPED
#define FILE_FLAG_BACKUP_SEMANTICS
#define ERROR_FILE_NOT_FOUND
static char workdir[MAX_PATH]
static int notified[MAX_INTERNET_STATUS]
#define FILE_ATTRIBUTE_READONLY
#define FILE_LIST_DIRECTORY
#define FILE_SHARE_DELETE
#define STATUS_NOTIFY_ENUM_DIR
DWORD WINAPI WaitForMultipleObjects(IN DWORD nCount, IN CONST HANDLE *lpHandles, IN BOOL bWaitAll, IN DWORD dwMilliseconds)
DWORD WINAPI SleepEx(IN DWORD dwMilliseconds, IN BOOL bAlertable)
DWORD WINAPI WaitForSingleObject(IN HANDLE hHandle, IN DWORD dwMilliseconds)
HANDLE WINAPI DECLSPEC_HOTPATCH CreateEventW(IN LPSECURITY_ATTRIBUTES lpEventAttributes OPTIONAL, IN BOOL bManualReset, IN BOOL bInitialState, IN LPCWSTR lpName OPTIONAL)
BOOL WINAPI DECLSPEC_HOTPATCH SetEvent(IN HANDLE hEvent)
BOOL WINAPI DECLSPEC_HOTPATCH ResetEvent(IN HANDLE hEvent)
Character const *const prefix
static EFI_HANDLE * handles
#define INVALID_FILE_ATTRIBUTES
DWORD WINAPI GetLastError(void)
#define ERROR_PATH_NOT_FOUND
struct _FILE_NOTIFY_INFORMATION * PFILE_NOTIFY_INFORMATION
#define FILE_NOTIFY_CHANGE_SIZE
#define FILE_ACTION_MODIFIED
#define FILE_ACTION_RENAMED_OLD_NAME
#define FILE_NOTIFY_CHANGE_LAST_ACCESS
#define FILE_NOTIFY_CHANGE_ATTRIBUTES
#define FILE_ACTION_REMOVED
#define FILE_NOTIFY_CHANGE_SECURITY
#define FILE_NOTIFY_CHANGE_FILE_NAME
#define FILE_ACTION_RENAMED_NEW_NAME
#define FILE_NOTIFY_CHANGE_CREATION
#define FILE_NOTIFY_CHANGE_LAST_WRITE
#define FILE_ACTION_ADDED
#define FILE_NOTIFY_CHANGE_DIR_NAME