33#define WIN32_NO_STATUS
54 ok(
ret,
"FindCloseChangeNotification error: %d\n",
95 static const char prefix[] =
"FCN";
104 "FindFirstChangeNotification error: %d\n",
GetLastError());
110 "FindFirstChangeNotification error: %d\n",
GetLastError());
142 "FindFirstChangeNotification error: %d\n",
GetLastError());
260 static const WCHAR szBoo[] = {
'\\',
'b',
'o',
'o',0 };
261 static const WCHAR szHoo[] = {
'\\',
'h',
'o',
'o',0 };
267 win_skip(
"GetTempPathW is not implemented\n");
270 ok(
r != 0,
"temp path failed\n");
282 ok(
r ==
TRUE,
"failed to create directory\n");
294 ok(
r ==
TRUE,
"failed to create subdir\n");
303 ok(
r ==
TRUE,
"find next failed\n");
309 ok(
r ==
TRUE,
"failed to remove subdir\n");
318 ok(
r ==
TRUE,
"find next failed\n");
321 ok(
r ==
TRUE,
"find next failed\n");
324 ok(
r ==
TRUE,
"should succeed\n");
327 ok(
r ==
TRUE,
"failed to remove dir\n");
369 ok(
r ==
TRUE,
"failed to remove dir\n");
382 static const WCHAR szBoo[] = {
'\\',
'b',
'o',
'o',0 };
383 static const WCHAR szHoo[] = {
'\\',
'h',
'o',
'o',0 };
384 static const WCHAR szGa[] = {
'\\',
'h',
'o',
'o',
'\\',
'g',
'a',0 };
388 if (!pReadDirectoryChangesW)
390 win_skip(
"ReadDirectoryChangesW is not available\n");
398 win_skip(
"GetTempPathW is not implemented\n");
401 ok(
r != 0,
"temp path failed\n");
417 ok(
r ==
TRUE,
"failed to create directory\n");
422 ok(
r==
FALSE,
"should return false\n");
435 ok(
r==
FALSE,
"should return false\n");
440 ok(
r==
FALSE,
"should return false\n");
458 ok(
r==
FALSE,
"should return false\n");
462 ok(
r==
FALSE,
"should return false\n");
465 ok(
r==
TRUE,
"should return true\n");
471 ok(
r ==
TRUE,
"failed to create directory\n");
489 ok(
r==
FALSE,
"should return false\n");
493 ok(
r==
FALSE,
"should return false\n");
501 S(
U(ov)).OffsetHigh = 0;
504 ok(
r==
TRUE,
"should return true\n");
513 ok(
r ==
TRUE,
"failed to remove directory\n");
524 ok(
r ==
TRUE,
"getoverlappedresult failed\n");
525 ok( dwCount == 0x12,
"count wrong\n");
536 ok(
r==
TRUE,
"should return true\n");
539 ok(
r ==
TRUE,
"failed to create directory\n");
549 ok(
r==
TRUE,
"should return true\n");
552 ok(
r ==
TRUE,
"failed to create directory\n");
576 got_subdir_change =
TRUE;
582 if (got_subdir_change)
break;
585 ok(
r==
TRUE,
"should return true\n");
587 ok(got_subdir_change,
"didn't get subdir change\n");
590 ok(
r ==
TRUE,
"failed to remove directory\n");
595 ok(
r==
TRUE,
"should return true\n");
598 ok(
r ==
TRUE,
"failed to remove directory\n");
623 ok(
r ==
TRUE,
"failed to remove directory\n");
635 static const WCHAR szBoo[] = {
'\\',
'b',
'o',
'o',0 };
636 static const WCHAR szHoo[] = {
'\\',
'h',
'o',
'o',0 };
639 if (!pReadDirectoryChangesW)
641 win_skip(
"ReadDirectoryChangesW is not available\n");
648 win_skip(
"GetTempPathW is not implemented\n");
651 ok(
r != 0,
"temp path failed\n");
663 ok(
r ==
TRUE,
"failed to create directory\n");
682 ok(
r==
TRUE,
"should return true\n");
688 ok(
r ==
TRUE,
"failed to create directory\n");
699 S(
U(ov)).OffsetHigh = 0;
703 ok(
r==
TRUE,
"should return true\n");
709 ok(
r ==
TRUE,
"failed to remove directory\n");
723 ok(
r ==
TRUE,
"failed to remove directory\n");
734 static const WCHAR szBoo[] = {
'\\',
'b',
'o',
'o',0 };
735 static const WCHAR szHoo[] = {
'\\',
'h',
'o',
'o',0 };
736 static const WCHAR szFoo[] = {
'\\',
'f',
'o',
'o',0 };
743 win_skip(
"GetTempPathW is not implemented\n");
746 ok(
r != 0,
"temp path failed\n");
762 ok(
r ==
TRUE,
"failed to create directory\n");
775 ok(
r==
TRUE,
"should return true\n");
781 ok(
r ==
TRUE,
"failed to create directory\n");
800 ok(
r ==
TRUE,
"failed to delete file\n");
803 ok(
r ==
TRUE,
"failed to remove directory\n");
808 ok(
r ==
TRUE,
"failed to remove directory\n");
813 ok(
error == 0,
"ReadDirectoryChangesW error %d\n",
error);
814 ok(ov->
hEvent == (
void*)0xdeadbeef,
"hEvent should not have changed\n");
819 static const WCHAR szBoo[] = {
'\\',
'b',
'o',
'o',
'\\',0 };
820 static const WCHAR szDir[] = {
'd',
'i',
'r',0 };
821 static const WCHAR szFile[] = {
'f',
'i',
'l',
'e',0 };
822 static const WCHAR szBackslash[] = {
'\\',0 };
830 if (!pReadDirectoryChangesW)
832 win_skip(
"ReadDirectoryChangesW is not available\n");
840 win_skip(
"GetTempPathW is not implemented\n");
843 ok(
r != 0,
"temp path failed\n");
861 ok(
r ==
TRUE,
"failed to create directory\n");
868 memset(&ov, 0,
sizeof(ov));
869 ov.
hEvent = (
void*)0xdeadbeef;
870 r = pReadDirectoryChangesW(hdir, fni,
sizeof(fni),
FALSE,
872 ok(
r ==
TRUE,
"pReadDirectoryChangesW failed\n");
879 ok(
r != 0,
"failed to receive file creation event\n");
887 r = pReadDirectoryChangesW(hdir, fni,
sizeof(fni),
FALSE,
889 ok(
r ==
TRUE,
"pReadDirectoryChangesW failed\n");
893 ok(
r ==
TRUE,
"failed to create directory\n");
896 ok(
r ==
TRUE,
"failed to move file\n");
899 ok(
r != 0,
"failed to receive file move event\n");
907 r = pReadDirectoryChangesW(hdir, fni,
sizeof(fni),
FALSE,
909 ok(
r ==
TRUE,
"pReadDirectoryChangesW failed\n");
912 ok(
r ==
TRUE,
"failed to move file\n");
915 ok(
r != 0,
"failed to receive file move event\n");
923 r = pReadDirectoryChangesW(hdir, fni,
sizeof(fni),
FALSE,
925 ok(
r ==
TRUE,
"pReadDirectoryChangesW failed\n");
928 ok(
r ==
TRUE,
"failed to delete file\n");
931 ok(
r != 0,
"failed to receive file removal event\n");
946 r = pReadDirectoryChangesW(hdir, fni,
sizeof(fni),
FALSE,
948 ok(
r ==
TRUE,
"pReadDirectoryChangesW failed\n");
951 ok(
r ==
TRUE,
"failed to move directory\n");
954 ok(
r != 0,
"failed to receive directory move event\n");
964 ok(fni_next->
NextEntryOffset == 0,
"there should be no more events in buffer\n");
977 r = pReadDirectoryChangesW(hdir, fni,
sizeof(fni),
FALSE,
979 ok(
r ==
TRUE,
"pReadDirectoryChangesW failed\n");
982 ok(
r != 0,
"failed to receive directory move event\n");
987 ok(
r ==
TRUE,
"failed to create directory\n");
990 ok(
r ==
TRUE,
"failed to remove directory\n");
992 r = pReadDirectoryChangesW(hdir, fni,
sizeof(fni),
FALSE,
994 ok(
r ==
TRUE,
"pReadDirectoryChangesW failed\n");
997 ok(
r != 0,
"failed to receive directory creation event\n");
1007 r = pReadDirectoryChangesW(hdir, fni,
sizeof(fni),
FALSE,
1009 ok(
r ==
TRUE,
"pReadDirectoryChangesW failed\n");
1012 ok(
r != 0,
"failed to receive directory removal event\n");
1015 ok(fni_next->
NextEntryOffset == 0,
"there should be no more events in buffer\n");
1029 HANDLE parent_watch, child_watch, parent_thread, child_thread;
1068 ok(
ret,
"Missed parent notification\n");
1070 ok(
ret,
"Missed child notification\n");
1081 "FindFirstChangeNotification error: %d\n",
GetLastError());
1085 "FindFirstChangeNotification error: %d\n",
GetLastError());
1100 ok(
ret,
"Missed child notification\n");
int memcmp(void *Buffer1, void *Buffer2, ACPI_SIZE Count)
BOOL WINAPI FindCloseChangeNotification(IN HANDLE hChangeHandle)
BOOL WINAPI FindNextChangeNotification(IN HANDLE hChangeHandle)
HANDLE WINAPI FindFirstChangeNotificationW(IN LPCWSTR lpPathName, IN BOOL bWatchSubtree, IN DWORD dwNotifyFilter)
HANDLE WINAPI FindFirstChangeNotificationA(IN LPCSTR lpPathName, IN BOOL bWatchSubtree, IN DWORD dwNotifyFilter)
const char * wine_dbgstr_wn(const WCHAR *str, int n)
#define ERROR_CALL_NOT_IMPLEMENTED
#define ERROR_INVALID_PARAMETER
#define GetProcAddress(x, y)
#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)
HMODULE WINAPI DECLSPEC_HOTPATCH GetModuleHandleA(LPCSTR lpModuleName)
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)
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 LPOVERLAPPED_COMPLETION_ROUTINE
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 HINSTANCE hkernel32
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)
static EFI_HANDLE * handles
#define INVALID_FILE_ATTRIBUTES
DWORD WINAPI GetLastError(void)
#define ERROR_PATH_NOT_FOUND
#define ERROR_NO_MORE_FILES
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