ReactOS  0.4.15-dev-4874-g57c84dd
SHChangeNotify.cpp File Reference
#include "shelltest.h"
#include "shell32_apitest_sub.h"
#include <time.h>
#include <process.h>
#include <versionhelpers.h>
Include dependency graph for SHChangeNotify.cpp:

Go to the source code of this file.

Classes

struct  TEST_ENTRY
 

Macros

#define DISABLE_THIS_TESTCASE
 
#define NO_TRIVIAL
 
#define NEW_DELIVERY_ONLY
 
#define RANDOM_QUARTER
 
#define GROUP_TICK
 
#define TOTAL_TICK
 
#define TEST_FILE   L"_TEST_.txt"
 
#define TEST_FILE_KAI   L"_TEST_KAI_.txt"
 
#define TEST_DIR   L"_TESTDIR_"
 
#define TEST_DIR_KAI   L"_TESTDIR_KAI_"
 
#define MOVE_FILE(from, to)   MoveFileW((from), (to))
 
#define WRITEDIR_0   DIRTYPE_DESKTOP
 
#define WRITEDIR_1   DIRTYPE_MYDOCUMENTS
 
#define SRC_00   0
 
#define SRC_01   SHCNRF_ShellLevel
 
#define SRC_02   (SHCNRF_NewDelivery)
 
#define SRC_03   (SHCNRF_NewDelivery | SHCNRF_ShellLevel)
 
#define SRC_04   SHCNRF_InterruptLevel
 
#define SRC_05   (SHCNRF_InterruptLevel | SHCNRF_ShellLevel)
 
#define SRC_06   (SHCNRF_InterruptLevel | SHCNRF_NewDelivery)
 
#define SRC_07   (SHCNRF_InterruptLevel | SHCNRF_NewDelivery | SHCNRF_ShellLevel)
 
#define SRC_08   (SHCNRF_RecursiveInterrupt | SHCNRF_InterruptLevel)
 
#define SRC_09   (SHCNRF_RecursiveInterrupt | SHCNRF_InterruptLevel | SHCNRF_ShellLevel)
 
#define SRC_10   (SHCNRF_RecursiveInterrupt | SHCNRF_InterruptLevel | SHCNRF_NewDelivery)
 
#define SRC_11   (SHCNRF_RecursiveInterrupt | SHCNRF_InterruptLevel | SHCNRF_NewDelivery | SHCNRF_ShellLevel)
 
#define WATCHDIR_0   DIRTYPE_NULL
 
#define WATCHDIR_1   DIRTYPE_DESKTOP
 
#define WATCHDIR_2   DIRTYPE_MYCOMPUTER
 
#define WATCHDIR_3   DIRTYPE_MYDOCUMENTS
 
#define SWITCH(x, y)   (bTarget ? (x) : (y))
 

Typedefs

typedef BOOL(* ACTION) (const struct TEST_ENTRY *entry)
 
typedef struct TEST_ENTRY TEST_ENTRY
 

Functions

static BOOL DoCreateEmptyFile (LPCWSTR pszFileName)
 
static BOOL DoAction1 (const TEST_ENTRY *entry)
 
static BOOL DoAction2 (const TEST_ENTRY *entry)
 
static BOOL DoAction3 (const TEST_ENTRY *entry)
 
static BOOL DoAction4 (const TEST_ENTRY *entry)
 
static BOOL DoAction5 (const TEST_ENTRY *entry)
 
static BOOL DoAction6 (const TEST_ENTRY *entry)
 
static BOOL DoAction7 (const TEST_ENTRY *entry)
 
static BOOL DoAction8 (const TEST_ENTRY *entry)
 
static BOOL DoAction9 (const TEST_ENTRY *entry)
 
static BOOL DoAction10 (const TEST_ENTRY *entry)
 
static BOOL DoAction11 (const TEST_ENTRY *entry)
 
static BOOL DoAction12 (const TEST_ENTRY *entry)
 
static void DoDeleteFilesAndDirs (void)
 
static LPCSTR PatternFromFlags (DWORD flags)
 
static BOOL DoGetPaths (LPWSTR pszPath1, LPWSTR pszPath2)
 
static void DoTestEntry (INT iEntry, const TEST_ENTRY *entry, INT nSources)
 
static void DoQuitTest (BOOL bForce)
 
static void DoAbortThread (void)
 
static BOOL CALLBACK HandlerRoutine (DWORD dwCtrlType)
 
static BOOL DoInitTest (void)
 
static BOOL GetSubProgramPath (void)
 
static void DoTestGroup (INT line, UINT cEntries, const TEST_ENTRY *pEntries, BOOL fRecursive, INT nSources, DIRTYPE iWatchDir)
 
static unsigned __stdcall TestThreadProc (void *)
 
 START_TEST (SHChangeNotify)
 

Variables

static HWND s_hwnd = NULL
 
static WCHAR s_szSubProgram [MAX_PATH]
 
static HANDLE s_hThread = NULL
 
static HANDLE s_hEvent = NULL
 
static WCHAR s_szDesktop [MAX_PATH]
 
static WCHAR s_szTestFile0 [MAX_PATH]
 
static WCHAR s_szTestFile0Kai [MAX_PATH]
 
static WCHAR s_szTestDir0 [MAX_PATH]
 
static WCHAR s_szTestDir0Kai [MAX_PATH]
 
static WCHAR s_szDocuments [MAX_PATH]
 
static WCHAR s_szTestFile1 [MAX_PATH]
 
static WCHAR s_szTestFile1Kai [MAX_PATH]
 
static WCHAR s_szTestDir1 [MAX_PATH]
 
static WCHAR s_szTestDir1Kai [MAX_PATH]
 
static const TEST_ENTRY s_group_00 []
 
static const TEST_ENTRY s_group_01 []
 
static const TEST_ENTRY s_group_02 []
 
static const TEST_ENTRY s_group_03 []
 
static const TEST_ENTRY s_group_04 []
 
static const TEST_ENTRY s_group_05 []
 
static const TEST_ENTRY s_group_06 []
 
static const TEST_ENTRY s_group_07 []
 
static const TEST_ENTRY s_group_08 []
 

Macro Definition Documentation

◆ DISABLE_THIS_TESTCASE

#define DISABLE_THIS_TESTCASE

Definition at line 17 of file SHChangeNotify.cpp.

◆ GROUP_TICK

#define GROUP_TICK

Definition at line 27 of file SHChangeNotify.cpp.

◆ MOVE_FILE

#define MOVE_FILE (   from,
  to 
)    MoveFileW((from), (to))

Definition at line 61 of file SHChangeNotify.cpp.

◆ NEW_DELIVERY_ONLY

#define NEW_DELIVERY_ONLY

Definition at line 21 of file SHChangeNotify.cpp.

◆ NO_TRIVIAL

#define NO_TRIVIAL

Definition at line 18 of file SHChangeNotify.cpp.

◆ RANDOM_QUARTER

#define RANDOM_QUARTER

Definition at line 23 of file SHChangeNotify.cpp.

◆ SRC_00

#define SRC_00   0

Definition at line 689 of file SHChangeNotify.cpp.

◆ SRC_01

#define SRC_01   SHCNRF_ShellLevel

Definition at line 690 of file SHChangeNotify.cpp.

◆ SRC_02

#define SRC_02   (SHCNRF_NewDelivery)

Definition at line 691 of file SHChangeNotify.cpp.

◆ SRC_03

Definition at line 692 of file SHChangeNotify.cpp.

◆ SRC_04

Definition at line 693 of file SHChangeNotify.cpp.

◆ SRC_05

Definition at line 694 of file SHChangeNotify.cpp.

◆ SRC_06

Definition at line 695 of file SHChangeNotify.cpp.

◆ SRC_07

◆ SRC_08

Definition at line 697 of file SHChangeNotify.cpp.

◆ SRC_09

◆ SRC_10

◆ SRC_11

◆ SWITCH

#define SWITCH (   x,
  y 
)    (bTarget ? (x) : (y))

◆ TEST_DIR

#define TEST_DIR   L"_TESTDIR_"

Definition at line 59 of file SHChangeNotify.cpp.

◆ TEST_DIR_KAI

#define TEST_DIR_KAI   L"_TESTDIR_KAI_"

Definition at line 60 of file SHChangeNotify.cpp.

◆ TEST_FILE

#define TEST_FILE   L"_TEST_.txt"

Definition at line 57 of file SHChangeNotify.cpp.

◆ TEST_FILE_KAI

#define TEST_FILE_KAI   L"_TEST_KAI_.txt"

Definition at line 58 of file SHChangeNotify.cpp.

◆ TOTAL_TICK

#define TOTAL_TICK

Definition at line 28 of file SHChangeNotify.cpp.

◆ WATCHDIR_0

#define WATCHDIR_0   DIRTYPE_NULL

Definition at line 702 of file SHChangeNotify.cpp.

◆ WATCHDIR_1

#define WATCHDIR_1   DIRTYPE_DESKTOP

Definition at line 703 of file SHChangeNotify.cpp.

◆ WATCHDIR_2

#define WATCHDIR_2   DIRTYPE_MYCOMPUTER

Definition at line 704 of file SHChangeNotify.cpp.

◆ WATCHDIR_3

#define WATCHDIR_3   DIRTYPE_MYDOCUMENTS

Definition at line 705 of file SHChangeNotify.cpp.

◆ WRITEDIR_0

#define WRITEDIR_0   DIRTYPE_DESKTOP

Definition at line 170 of file SHChangeNotify.cpp.

◆ WRITEDIR_1

#define WRITEDIR_1   DIRTYPE_MYDOCUMENTS

Definition at line 177 of file SHChangeNotify.cpp.

Typedef Documentation

◆ ACTION

Definition at line 45 of file SHChangeNotify.cpp.

◆ TEST_ENTRY

Function Documentation

◆ DoAbortThread()

static void DoAbortThread ( void  )
static

Definition at line 592 of file SHChangeNotify.cpp.

593 {
594  skip("Aborting the thread...\n");
595  if (s_hThread)
596  {
598  s_hThread = NULL;
599  }
600 }
BOOL WINAPI TerminateThread(IN HANDLE hThread, IN DWORD dwExitCode)
Definition: thread.c:587
static HANDLE s_hThread
#define NULL
Definition: types.h:112
#define skip(...)
Definition: atltest.h:64

Referenced by DoTestGroup(), and HandlerRoutine().

◆ DoAction1()

static BOOL DoAction1 ( const TEST_ENTRY entry)
static

Definition at line 63 of file SHChangeNotify.cpp.

64 {
65  LPWSTR pszPath = DoGetDir(entry->iWriteDir);
66  PathAppendW(pszPath, TEST_FILE);
67  ok(DoCreateEmptyFile(pszPath), "Line %d: DoCreateEmptyFile failed\n", entry->line);
68  return TRUE;
69 }
static BOOL DoCreateEmptyFile(LPCWSTR pszFileName)
#define TRUE
Definition: types.h:120
BOOL WINAPI PathAppendW(LPWSTR lpszPath, LPCWSTR lpszAppend)
Definition: path.c:126
#define TEST_FILE
uint32_t entry
Definition: isohybrid.c:63
#define ok(value,...)
Definition: atltest.h:57
WCHAR * LPWSTR
Definition: xmlstorage.h:184
static LPWSTR DoGetDir(DIRTYPE iDir)

◆ DoAction10()

static BOOL DoAction10 ( const TEST_ENTRY entry)
static

Definition at line 146 of file SHChangeNotify.cpp.

147 {
148  LPWSTR pszPath = DoGetDir(entry->iWriteDir);
149  PathAppendW(pszPath, TEST_FILE);
151  return FALSE;
152 }
BOOL WINAPI PathAppendW(LPWSTR lpszPath, LPCWSTR lpszAppend)
Definition: path.c:126
#define FALSE
Definition: types.h:117
#define TEST_FILE
EXTERN_C void WINAPI SHChangeNotify(LONG wEventId, UINT uFlags, LPCVOID dwItem1, LPCVOID dwItem2)
#define SHCNF_FLUSH
Definition: shlobj.h:1767
uint32_t entry
Definition: isohybrid.c:63
#define SHCNF_PATHW
Definition: shlobj.h:1764
#define SHCNE_DELETE
Definition: shlobj.h:1731
#define NULL
Definition: types.h:112
WCHAR * LPWSTR
Definition: xmlstorage.h:184
static LPWSTR DoGetDir(DIRTYPE iDir)

◆ DoAction11()

static BOOL DoAction11 ( const TEST_ENTRY entry)
static

Definition at line 154 of file SHChangeNotify.cpp.

155 {
156  LPWSTR pszPath = DoGetDir(entry->iWriteDir);
157  PathAppendW(pszPath, TEST_DIR);
159  return FALSE;
160 }
#define SHCNE_MKDIR
Definition: shlobj.h:1732
BOOL WINAPI PathAppendW(LPWSTR lpszPath, LPCWSTR lpszAppend)
Definition: path.c:126
#define TEST_DIR
#define FALSE
Definition: types.h:117
EXTERN_C void WINAPI SHChangeNotify(LONG wEventId, UINT uFlags, LPCVOID dwItem1, LPCVOID dwItem2)
#define SHCNF_FLUSH
Definition: shlobj.h:1767
uint32_t entry
Definition: isohybrid.c:63
#define SHCNF_PATHW
Definition: shlobj.h:1764
#define NULL
Definition: types.h:112
WCHAR * LPWSTR
Definition: xmlstorage.h:184
static LPWSTR DoGetDir(DIRTYPE iDir)

◆ DoAction12()

static BOOL DoAction12 ( const TEST_ENTRY entry)
static

Definition at line 162 of file SHChangeNotify.cpp.

163 {
164  LPWSTR pszPath = DoGetDir(entry->iWriteDir);
165  PathAppendW(pszPath, TEST_DIR);
167  return FALSE;
168 }
#define SHCNE_RMDIR
Definition: shlobj.h:1733
BOOL WINAPI PathAppendW(LPWSTR lpszPath, LPCWSTR lpszAppend)
Definition: path.c:126
#define TEST_DIR
#define FALSE
Definition: types.h:117
EXTERN_C void WINAPI SHChangeNotify(LONG wEventId, UINT uFlags, LPCVOID dwItem1, LPCVOID dwItem2)
#define SHCNF_FLUSH
Definition: shlobj.h:1767
uint32_t entry
Definition: isohybrid.c:63
#define SHCNF_PATHW
Definition: shlobj.h:1764
#define NULL
Definition: types.h:112
WCHAR * LPWSTR
Definition: xmlstorage.h:184
static LPWSTR DoGetDir(DIRTYPE iDir)

◆ DoAction2()

static BOOL DoAction2 ( const TEST_ENTRY entry)
static

Definition at line 71 of file SHChangeNotify.cpp.

72 {
73  LPWSTR pszPath1 = DoGetDir(entry->iWriteDir), pszPath2 = DoGetDir(entry->iWriteDir);
74  PathAppendW(pszPath1, TEST_FILE);
75  PathAppendW(pszPath2, TEST_FILE_KAI);
76  ok(MOVE_FILE(pszPath1, pszPath2), "Line %d: MOVE_FILE(%ls, %ls) failed (%ld)\n",
77  entry->line, pszPath1, pszPath2, GetLastError());
78  return TRUE;
79 }
#define TRUE
Definition: types.h:120
DWORD WINAPI GetLastError(VOID)
Definition: except.c:1040
#define MOVE_FILE(from, to)
BOOL WINAPI PathAppendW(LPWSTR lpszPath, LPCWSTR lpszAppend)
Definition: path.c:126
#define TEST_FILE
uint32_t entry
Definition: isohybrid.c:63
#define ok(value,...)
Definition: atltest.h:57
WCHAR * LPWSTR
Definition: xmlstorage.h:184
static LPWSTR DoGetDir(DIRTYPE iDir)
#define TEST_FILE_KAI

◆ DoAction3()

static BOOL DoAction3 ( const TEST_ENTRY entry)
static

Definition at line 81 of file SHChangeNotify.cpp.

82 {
83  LPWSTR pszPath1 = DoGetDir(entry->iWriteDir), pszPath2 = DoGetDir(entry->iWriteDir);
84  PathAppendW(pszPath1, TEST_FILE_KAI);
85  PathAppendW(pszPath2, TEST_FILE);
86  ok(MOVE_FILE(pszPath1, pszPath2), "Line %d: MOVE_FILE(%ls, %ls) failed (%ld)\n",
87  entry->line, pszPath1, pszPath2, GetLastError());
88  return TRUE;
89 }
#define TRUE
Definition: types.h:120
DWORD WINAPI GetLastError(VOID)
Definition: except.c:1040
#define MOVE_FILE(from, to)
BOOL WINAPI PathAppendW(LPWSTR lpszPath, LPCWSTR lpszAppend)
Definition: path.c:126
#define TEST_FILE
uint32_t entry
Definition: isohybrid.c:63
#define ok(value,...)
Definition: atltest.h:57
WCHAR * LPWSTR
Definition: xmlstorage.h:184
static LPWSTR DoGetDir(DIRTYPE iDir)
#define TEST_FILE_KAI

◆ DoAction4()

static BOOL DoAction4 ( const TEST_ENTRY entry)
static

Definition at line 91 of file SHChangeNotify.cpp.

92 {
93  LPWSTR pszPath = DoGetDir(entry->iWriteDir);
94  PathAppendW(pszPath, TEST_FILE);
95  ok(DeleteFileW(pszPath), "Line %d: DeleteFileW(%ls) failed (%ld)\n",
96  entry->line, pszPath, GetLastError());
97  return TRUE;
98 }
#define TRUE
Definition: types.h:120
DWORD WINAPI GetLastError(VOID)
Definition: except.c:1040
BOOL WINAPI PathAppendW(LPWSTR lpszPath, LPCWSTR lpszAppend)
Definition: path.c:126
BOOL WINAPI DeleteFileW(IN LPCWSTR lpFileName)
Definition: delete.c:39
#define TEST_FILE
uint32_t entry
Definition: isohybrid.c:63
#define ok(value,...)
Definition: atltest.h:57
WCHAR * LPWSTR
Definition: xmlstorage.h:184
static LPWSTR DoGetDir(DIRTYPE iDir)

◆ DoAction5()

static BOOL DoAction5 ( const TEST_ENTRY entry)
static

Definition at line 100 of file SHChangeNotify.cpp.

101 {
102  LPWSTR pszPath = DoGetDir(entry->iWriteDir);
103  PathAppendW(pszPath, TEST_DIR);
104  ok(CreateDirectoryW(pszPath, NULL), "Line %d: CreateDirectoryW(%ls) failed (%ld)\n",
105  entry->line, pszPath, GetLastError());
106  return TRUE;
107 }
BOOL WINAPI CreateDirectoryW(IN LPCWSTR lpPathName, IN LPSECURITY_ATTRIBUTES lpSecurityAttributes)
Definition: dir.c:90
#define TRUE
Definition: types.h:120
DWORD WINAPI GetLastError(VOID)
Definition: except.c:1040
BOOL WINAPI PathAppendW(LPWSTR lpszPath, LPCWSTR lpszAppend)
Definition: path.c:126
#define TEST_DIR
uint32_t entry
Definition: isohybrid.c:63
#define ok(value,...)
Definition: atltest.h:57
#define NULL
Definition: types.h:112
WCHAR * LPWSTR
Definition: xmlstorage.h:184
static LPWSTR DoGetDir(DIRTYPE iDir)

◆ DoAction6()

static BOOL DoAction6 ( const TEST_ENTRY entry)
static

Definition at line 109 of file SHChangeNotify.cpp.

110 {
111  LPWSTR pszPath1 = DoGetDir(entry->iWriteDir), pszPath2 = DoGetDir(entry->iWriteDir);
112  PathAppendW(pszPath1, TEST_DIR);
113  PathAppendW(pszPath2, TEST_DIR_KAI);
114  ok(MOVE_FILE(pszPath1, pszPath2), "Line %d: MOVE_FILE(%ls, %ls) failed (%ld)\n",
115  entry->line, pszPath1, pszPath2, GetLastError());
116  return TRUE;
117 }
#define TRUE
Definition: types.h:120
DWORD WINAPI GetLastError(VOID)
Definition: except.c:1040
#define MOVE_FILE(from, to)
BOOL WINAPI PathAppendW(LPWSTR lpszPath, LPCWSTR lpszAppend)
Definition: path.c:126
#define TEST_DIR
uint32_t entry
Definition: isohybrid.c:63
#define TEST_DIR_KAI
#define ok(value,...)
Definition: atltest.h:57
WCHAR * LPWSTR
Definition: xmlstorage.h:184
static LPWSTR DoGetDir(DIRTYPE iDir)

◆ DoAction7()

static BOOL DoAction7 ( const TEST_ENTRY entry)
static

Definition at line 119 of file SHChangeNotify.cpp.

120 {
121  LPWSTR pszPath1 = DoGetDir(entry->iWriteDir), pszPath2 = DoGetDir(entry->iWriteDir);
122  PathAppendW(pszPath1, TEST_DIR_KAI);
123  PathAppendW(pszPath2, TEST_DIR);
124  ok(MOVE_FILE(pszPath1, pszPath2), "Line %d: MOVE_FILE(%ls, %ls) failed (%ld)\n",
125  entry->line, pszPath1, pszPath2, GetLastError());
126  return TRUE;
127 }
#define TRUE
Definition: types.h:120
DWORD WINAPI GetLastError(VOID)
Definition: except.c:1040
#define MOVE_FILE(from, to)
BOOL WINAPI PathAppendW(LPWSTR lpszPath, LPCWSTR lpszAppend)
Definition: path.c:126
#define TEST_DIR
uint32_t entry
Definition: isohybrid.c:63
#define TEST_DIR_KAI
#define ok(value,...)
Definition: atltest.h:57
WCHAR * LPWSTR
Definition: xmlstorage.h:184
static LPWSTR DoGetDir(DIRTYPE iDir)

◆ DoAction8()

static BOOL DoAction8 ( const TEST_ENTRY entry)
static

Definition at line 129 of file SHChangeNotify.cpp.

130 {
131  LPWSTR pszPath = DoGetDir(entry->iWriteDir);
132  PathAppendW(pszPath, TEST_DIR);
133  ok(RemoveDirectoryW(pszPath), "Line %d: RemoveDirectoryW(%ls) failed (%ld)\n",
134  entry->line, pszPath, GetLastError());
135  return TRUE;
136 }
#define TRUE
Definition: types.h:120
DWORD WINAPI GetLastError(VOID)
Definition: except.c:1040
BOOL WINAPI PathAppendW(LPWSTR lpszPath, LPCWSTR lpszAppend)
Definition: path.c:126
#define TEST_DIR
BOOL WINAPI RemoveDirectoryW(IN LPCWSTR lpPathName)
Definition: dir.c:732
uint32_t entry
Definition: isohybrid.c:63
#define ok(value,...)
Definition: atltest.h:57
WCHAR * LPWSTR
Definition: xmlstorage.h:184
static LPWSTR DoGetDir(DIRTYPE iDir)

◆ DoAction9()

static BOOL DoAction9 ( const TEST_ENTRY entry)
static

Definition at line 138 of file SHChangeNotify.cpp.

139 {
140  LPWSTR pszPath = DoGetDir(entry->iWriteDir);
141  PathAppendW(pszPath, TEST_FILE);
143  return FALSE;
144 }
BOOL WINAPI PathAppendW(LPWSTR lpszPath, LPCWSTR lpszAppend)
Definition: path.c:126
#define FALSE
Definition: types.h:117
#define TEST_FILE
EXTERN_C void WINAPI SHChangeNotify(LONG wEventId, UINT uFlags, LPCVOID dwItem1, LPCVOID dwItem2)
#define SHCNF_FLUSH
Definition: shlobj.h:1767
uint32_t entry
Definition: isohybrid.c:63
#define SHCNF_PATHW
Definition: shlobj.h:1764
#define NULL
Definition: types.h:112
#define SHCNE_CREATE
Definition: shlobj.h:1730
WCHAR * LPWSTR
Definition: xmlstorage.h:184
static LPWSTR DoGetDir(DIRTYPE iDir)

◆ DoCreateEmptyFile()

static BOOL DoCreateEmptyFile ( LPCWSTR  pszFileName)
static

Definition at line 35 of file SHChangeNotify.cpp.

36 {
37  FILE *fp = _wfopen(pszFileName, L"wb");
38  if (fp)
39  fclose(fp);
40  return fp != NULL;
41 }
_Check_return_ _CRTIMP FILE *__cdecl _wfopen(_In_z_ const wchar_t *_Filename, _In_z_ const wchar_t *_Mode)
#define L(x)
Definition: ntvdm.h:50
WORD WORD PSZ PSZ pszFileName
Definition: vdmdbg.h:41
_Check_return_opt_ _CRTIMP int __cdecl fclose(_Inout_ FILE *_File)
#define NULL
Definition: types.h:112

Referenced by DoAction1(), and DoInitTest().

◆ DoDeleteFilesAndDirs()

static void DoDeleteFilesAndDirs ( void  )
static

Definition at line 184 of file SHChangeNotify.cpp.

185 {
195 }
static WCHAR s_szTestFile0[MAX_PATH]
BOOL WINAPI DeleteFileW(IN LPCWSTR lpFileName)
Definition: delete.c:39
static WCHAR s_szTestFile0Kai[MAX_PATH]
BOOL WINAPI RemoveDirectoryW(IN LPCWSTR lpPathName)
Definition: dir.c:732
static WCHAR s_szTestDir0Kai[MAX_PATH]
static WCHAR s_szTestDir0[MAX_PATH]
static WCHAR s_szTestDir1Kai[MAX_PATH]
static WCHAR s_szTestDir1[MAX_PATH]
#define TEMP_FILE
static WCHAR s_szTestFile1Kai[MAX_PATH]
static WCHAR s_szTestFile1[MAX_PATH]

Referenced by DoInitTest(), and DoQuitTest().

◆ DoGetPaths()

static BOOL DoGetPaths ( LPWSTR  pszPath1,
LPWSTR  pszPath2 
)
static

Definition at line 468 of file SHChangeNotify.cpp.

469 {
470  pszPath1[0] = pszPath2[0] = 0;
471 
472  WCHAR szText[MAX_PATH * 2];
473  szText[0] = 0;
474  FILE *fp = _wfopen(TEMP_FILE, L"rb");
475  if (fp)
476  {
477  fread(szText, 1, sizeof(szText), fp);
478  fclose(fp);
479  }
480 
481  LPWSTR pch = wcschr(szText, L'|');
482  if (pch == NULL)
483  return FALSE;
484 
485  *pch = 0;
486  StringCchCopyW(pszPath1, MAX_PATH, szText);
487  StringCchCopyW(pszPath2, MAX_PATH, pch + 1);
488  return TRUE;
489 }
_Check_return_ _CRTIMP FILE *__cdecl _wfopen(_In_z_ const wchar_t *_Filename, _In_z_ const wchar_t *_Mode)
#define TRUE
Definition: types.h:120
#define pch(ap)
Definition: match.c:418
#define L(x)
Definition: ntvdm.h:50
_Check_return_opt_ _CRTIMP size_t __cdecl fread(_Out_writes_bytes_(_ElementSize *_Count) void *_DstBuf, _In_ size_t _ElementSize, _In_ size_t _Count, _Inout_ FILE *_File)
#define FALSE
Definition: types.h:117
STRSAFEAPI StringCchCopyW(STRSAFE_LPWSTR pszDest, size_t cchDest, STRSAFE_LPCWSTR pszSrc)
Definition: strsafe.h:149
_CONST_RETURN wchar_t *__cdecl wcschr(_In_z_ const wchar_t *_Str, wchar_t _Ch)
__wchar_t WCHAR
Definition: xmlstorage.h:180
#define MAX_PATH
Definition: compat.h:34
_Check_return_opt_ _CRTIMP int __cdecl fclose(_Inout_ FILE *_File)
#define TEMP_FILE
#define NULL
Definition: types.h:112
WCHAR * LPWSTR
Definition: xmlstorage.h:184

Referenced by DoTestEntry().

◆ DoInitTest()

static BOOL DoInitTest ( void  )
static

Definition at line 615 of file SHChangeNotify.cpp.

616 {
617  // DIRTYPE_DESKTOP
620 
621  PathAppendW(psz, TEST_FILE);
623 
624  PathRemoveFileSpecW(psz);
627 
628  PathRemoveFileSpecW(psz);
629  PathAppendW(psz, TEST_DIR);
631 
632  PathRemoveFileSpecW(psz);
635 
636  // DIRTYPE_MYDOCUMENTS
639 
640  PathAppendW(psz, TEST_FILE);
642 
643  PathRemoveFileSpecW(psz);
646 
647  PathRemoveFileSpecW(psz);
648  PathAppendW(psz, TEST_DIR);
650 
651  PathRemoveFileSpecW(psz);
654 
655  // prepare for files and dirs
658 
659  // Ctrl+C
661 
662  // close Explorer windows
663  trace("Closing Explorer windows...\n");
664  DoWaitForWindow(L"CabinetWClass", NULL, TRUE, TRUE);
665 
666  // close the CLASSNAME windows
668 }
static BOOL DoCreateEmptyFile(LPCWSTR pszFileName)
BOOL WINAPI PathRemoveFileSpecW(LPWSTR lpszPath)
Definition: path.c:629
static WCHAR s_szTestFile0[MAX_PATH]
#define TRUE
Definition: types.h:120
static HWND DoWaitForWindow(LPCWSTR clsname, LPCWSTR text, BOOL bClosing, BOOL bForce)
static void DoDeleteFilesAndDirs(void)
static WCHAR s_szDesktop[MAX_PATH]
static WCHAR s_szDocuments[MAX_PATH]
BOOL WINAPI PathAppendW(LPWSTR lpszPath, LPCWSTR lpszAppend)
Definition: path.c:126
#define TEST_DIR
#define L(x)
Definition: ntvdm.h:50
BOOL WINAPI DECLSPEC_HOTPATCH SetConsoleCtrlHandler(PHANDLER_ROUTINE HandlerRoutine, BOOL Add)
Definition: console.c:2109
STRSAFEAPI StringCchCopyW(STRSAFE_LPWSTR pszDest, size_t cchDest, STRSAFE_LPCWSTR pszSrc)
Definition: strsafe.h:149
static WCHAR s_szTestFile0Kai[MAX_PATH]
static WCHAR s_szTestDir0Kai[MAX_PATH]
static WCHAR s_szTestDir0[MAX_PATH]
#define trace
Definition: atltest.h:70
#define _countof(array)
Definition: sndvol32.h:68
#define TEST_FILE
static WCHAR s_szTestDir1Kai[MAX_PATH]
#define CLASSNAME
#define TEST_DIR_KAI
static WCHAR s_szTestDir1[MAX_PATH]
#define TEMP_FILE
#define NULL
Definition: types.h:112
static WCHAR s_szTestFile1Kai[MAX_PATH]
WCHAR * LPWSTR
Definition: xmlstorage.h:184
static LPWSTR DoGetDir(DIRTYPE iDir)
static BOOL CALLBACK HandlerRoutine(DWORD dwCtrlType)
static WCHAR s_szTestFile1[MAX_PATH]
#define TEST_FILE_KAI

Referenced by START_TEST().

◆ DoQuitTest()

static void DoQuitTest ( BOOL  bForce)
static

Definition at line 576 of file SHChangeNotify.cpp.

577 {
579 
581  s_hwnd = NULL;
582 
583  if (s_hEvent)
584  {
586  s_hEvent = NULL;
587  }
588 
590 }
#define IDOK
Definition: winuser.h:824
#define CloseHandle
Definition: compat.h:598
#define TRUE
Definition: types.h:120
static HWND DoWaitForWindow(LPCWSTR clsname, LPCWSTR text, BOOL bClosing, BOOL bForce)
static void DoDeleteFilesAndDirs(void)
static HANDLE s_hEvent
#define CLASSNAME
#define WM_COMMAND
Definition: winuser.h:1727
#define NULL
Definition: types.h:112
static HWND s_hwnd
BOOL WINAPI PostMessageW(_In_opt_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)

Referenced by DoTestGroup(), HandlerRoutine(), and START_TEST().

◆ DoTestEntry()

static void DoTestEntry ( INT  iEntry,
const TEST_ENTRY entry,
INT  nSources 
)
static

Definition at line 491 of file SHChangeNotify.cpp.

492 {
493 #ifdef ENTRY_TICK
494  DWORD dwOldTick = GetTickCount();
495 #endif
496 
497  BOOL bInterrupting = FALSE;
498  if (entry->action)
499  bInterrupting = entry->action(entry);
500 
501  DWORD flags;
502  LPCSTR pattern;
503  if ((nSources & SHCNRF_InterruptLevel) && bInterrupting)
504  {
505  // The event won't work at here. Manually waiting...
506  UINT cTry = ((iEntry == 0) ? 100 : 60);
507  for (UINT iTry = 0; iTry < cTry; ++iTry)
508  {
511  if (strcmp(pattern, "0000000") != 0)
512  break;
513 
514  Sleep(1);
515  }
516  }
517  else
518  {
520  Sleep(1);
521 
524  }
525 
527 
528  WCHAR szPath1[MAX_PATH], szPath2[MAX_PATH];
529  szPath1[0] = szPath2[0] = 0;
530  BOOL bOK = DoGetPaths(szPath1, szPath2);
531 
532  static UINT s_cCalmDown = 0;
533 
534  if (pattern[TYPE_UPDATEDIR] == '1')
535  {
536  trace("Line %d: SHCNE_UPDATEDIR: Calm down (%u)...\n", entry->line, s_cCalmDown);
537 
538  if (++s_cCalmDown < 3)
539  Sleep(3000);
540 
541  if (entry->pattern)
542  ok(TRUE, "Line %d:\n", entry->line);
543  if (entry->path1)
544  ok(TRUE, "Line %d:\n", entry->line);
545  if (entry->path2)
546  ok(TRUE, "Line %d:\n", entry->line);
547  }
548  else
549  {
550  s_cCalmDown = 0;
551  if (entry->pattern)
552  {
553  ok(strcmp(pattern, entry->pattern) == 0,
554  "Line %d: pattern mismatch '%s', tick=0x%08lX\n",
555  entry->line, pattern, GetTickCount());
556  }
557  if (entry->path1)
558  ok(bOK && lstrcmpiW(entry->path1, szPath1) == 0,
559  "Line %d: path1 mismatch '%S' (%d)\n", entry->line, szPath1, bOK);
560  if (entry->path2)
561  ok(bOK && lstrcmpiW(entry->path2, szPath2) == 0,
562  "Line %d: path2 mismatch '%S' (%d)\n", entry->line, szPath2, bOK);
563  }
564 
567 
568 #ifdef ENTRY_TICK
569  DWORD dwNewTick = GetTickCount();
570  DWORD dwTick = dwNewTick - dwOldTick;
571  trace("DoTestEntry: Line %d: tick=%lu.%lu sec\n", entry->line,
572  (dwTick / 1000), (dwTick / 100 % 10));
573 #endif
574 }
VOID WINAPI DECLSPEC_HOTPATCH Sleep(IN DWORD dwMilliseconds)
Definition: synch.c:790
#define TRUE
Definition: types.h:120
DWORD WINAPI GetTickCount(VOID)
Definition: time.c:455
#define WM_CLEAR_FLAGS
static BOOL DoGetPaths(LPWSTR pszPath1, LPWSTR pszPath2)
static HANDLE s_hEvent
int WINAPI lstrcmpiW(LPCWSTR lpString1, LPCWSTR lpString2)
Definition: lstring.c:194
DWORD WINAPI WaitForSingleObject(IN HANDLE hHandle, IN DWORD dwMilliseconds)
Definition: synch.c:82
#define FALSE
Definition: types.h:117
unsigned int BOOL
Definition: ntddk_ex.h:94
#define WM_GET_NOTIFY_FLAGS
#define SHCNRF_InterruptLevel
Definition: shlobj.h:1774
const char * LPCSTR
Definition: xmlstorage.h:183
#define WM_SET_PATHS
#define WAIT_OBJECT_0
Definition: winbase.h:403
#define trace
Definition: atltest.h:70
__wchar_t WCHAR
Definition: xmlstorage.h:180
#define MAX_PATH
Definition: compat.h:34
unsigned long DWORD
Definition: ntddk_ex.h:95
GLbitfield flags
Definition: glext.h:7161
uint32_t entry
Definition: isohybrid.c:63
LRESULT WINAPI SendMessageW(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
#define ok(value,...)
Definition: atltest.h:57
unsigned int UINT
Definition: ndis.h:50
static HWND s_hwnd
BOOL WINAPI DECLSPEC_HOTPATCH ResetEvent(IN HANDLE hEvent)
Definition: synch.c:714
int strcmp(const char *String1, const char *String2)
Definition: utclib.c:469
static LPCSTR PatternFromFlags(DWORD flags)
GLubyte * pattern
Definition: glext.h:7787

Referenced by DoTestGroup().

◆ DoTestGroup()

static void DoTestGroup ( INT  line,
UINT  cEntries,
const TEST_ENTRY pEntries,
BOOL  fRecursive,
INT  nSources,
DIRTYPE  iWatchDir 
)
static

Definition at line 708 of file SHChangeNotify.cpp.

710 {
711 #ifdef NO_INTERRUPT_LEVEL
712  if (nSources & SHCNRF_InterruptLevel)
713  return;
714 #endif
715 #ifdef NO_SHELL_LEVEL
716  if (nSources & SHCNRF_ShellLevel)
717  return;
718 #endif
719 #ifdef NEW_DELIVERY_ONLY
720  if (!(nSources & SHCNRF_NewDelivery))
721  return;
722 #endif
723 #ifdef GROUP_TICK
724  DWORD dwOldTick = GetTickCount();
725 #endif
726 #ifdef RANDOM_QUARTER
727  if ((rand() & 3) == 0)
728  return;
729 #elif defined(RANDOM_HALF)
730  if (rand() & 1)
731  return;
732 #endif
733 
734  trace("DoTestGroup: Line %d: fRecursive:%u, iWatchDir:%u, nSources:0x%X\n",
735  line, fRecursive, iWatchDir, nSources);
736 
737  if (s_hEvent)
738  {
740  s_hEvent = NULL;
741  }
743 
744  WCHAR szParams[64];
745  StringCchPrintfW(szParams, _countof(szParams), L"%u,%u,%u", fRecursive, iWatchDir, nSources);
746 
748  if ((INT_PTR)hinst <= 32)
749  {
750  skip("Unable to run shell32_apitest_sub.exe.\n");
751  return;
752  }
753 
755  if (!s_hwnd)
756  {
757  skip("Unable to find window.\n");
758  return;
759  }
760 
761  for (UINT i = 0; i < cEntries; ++i)
762  {
763  if (!IsWindow(s_hwnd))
764  {
765  DoAbortThread();
766  DoQuitTest(TRUE);
767  break;
768  }
769 
770  DoTestEntry(i, &pEntries[i], nSources);
771  }
772 
773  DoQuitTest(FALSE);
774 
775 #ifdef GROUP_TICK
776  DWORD dwNewTick = GetTickCount();
777  DWORD dwTick = dwNewTick - dwOldTick;
778  trace("DoTestGroup: Line %d: %lu.%lu sec\n", line, (dwTick / 1000), (dwTick / 100 % 10));
779 #endif
780 }
#define CloseHandle
Definition: compat.h:598
static WCHAR s_szSubProgram[MAX_PATH]
BOOL WINAPI IsWindow(_In_opt_ HWND)
#define TRUE
Definition: types.h:120
static HWND DoWaitForWindow(LPCWSTR clsname, LPCWSTR text, BOOL bClosing, BOOL bForce)
DWORD WINAPI GetTickCount(VOID)
Definition: time.c:455
static void DoAbortThread(void)
static HANDLE s_hEvent
int32_t INT_PTR
Definition: typedefs.h:64
static void DoTestEntry(INT iEntry, const TEST_ENTRY *entry, INT nSources)
HANDLE WINAPI DECLSPEC_HOTPATCH CreateEventW(IN LPSECURITY_ATTRIBUTES lpEventAttributes OPTIONAL, IN BOOL bManualReset, IN BOOL bInitialState, IN LPCWSTR lpName OPTIONAL)
Definition: synch.c:651
#define L(x)
Definition: ntvdm.h:50
#define FALSE
Definition: types.h:117
_Check_return_ int __cdecl rand(void)
Definition: rand.c:10
#define SHCNRF_InterruptLevel
Definition: shlobj.h:1774
Definition: parser.c:48
#define EVENT_NAME
#define trace
Definition: atltest.h:70
__wchar_t WCHAR
Definition: xmlstorage.h:180
#define _countof(array)
Definition: sndvol32.h:68
#define SHCNRF_ShellLevel
Definition: shlobj.h:1775
unsigned long DWORD
Definition: ntddk_ex.h:95
_In_ UINT _In_ UINT cEntries
Definition: wingdi.h:3620
#define CLASSNAME
#define SHCNRF_NewDelivery
Definition: shlobj.h:1777
#define SW_SHOWNORMAL
Definition: winuser.h:764
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
STRSAFEAPI StringCchPrintfW(STRSAFE_LPWSTR pszDest, size_t cchDest, STRSAFE_LPCWSTR pszFormat,...)
Definition: strsafe.h:530
unsigned int UINT
Definition: ndis.h:50
#define NULL
Definition: types.h:112
static HWND s_hwnd
#define skip(...)
Definition: atltest.h:64
HINSTANCE WINAPI ShellExecuteW(HWND hwnd, LPCWSTR lpVerb, LPCWSTR lpFile, LPCWSTR lpParameters, LPCWSTR lpDirectory, INT nShowCmd)
Definition: shlexec.cpp:2354
static HINSTANCE hinst
Definition: edit.c:551
static void DoQuitTest(BOOL bForce)

Referenced by TestThreadProc().

◆ GetSubProgramPath()

static BOOL GetSubProgramPath ( void  )
static

Definition at line 671 of file SHChangeNotify.cpp.

672 {
675  PathAppendW(s_szSubProgram, L"shell32_apitest_sub.exe");
676 
678  {
680  PathAppendW(s_szSubProgram, L"testdata\\shell32_apitest_sub.exe");
681 
683  return FALSE;
684  }
685 
686  return TRUE;
687 }
DWORD WINAPI GetModuleFileNameW(HINSTANCE hModule, LPWSTR lpFilename, DWORD nSize)
Definition: loader.c:600
BOOL WINAPI PathRemoveFileSpecW(LPWSTR lpszPath)
Definition: path.c:629
static WCHAR s_szSubProgram[MAX_PATH]
#define TRUE
Definition: types.h:120
BOOL WINAPI PathAppendW(LPWSTR lpszPath, LPCWSTR lpszAppend)
Definition: path.c:126
#define L(x)
Definition: ntvdm.h:50
#define FALSE
Definition: types.h:117
BOOL WINAPI PathFileExistsW(LPCWSTR lpszPath)
Definition: path.c:1776
#define _countof(array)
Definition: sndvol32.h:68
#define NULL
Definition: types.h:112

Referenced by START_TEST().

◆ HandlerRoutine()

static BOOL CALLBACK HandlerRoutine ( DWORD  dwCtrlType)
static

Definition at line 602 of file SHChangeNotify.cpp.

603 {
604  switch (dwCtrlType)
605  {
606  case CTRL_C_EVENT:
607  case CTRL_BREAK_EVENT:
608  DoAbortThread();
609  DoQuitTest(TRUE);
610  return TRUE;
611  }
612  return FALSE;
613 }
#define CTRL_BREAK_EVENT
Definition: wincon.h:69
#define TRUE
Definition: types.h:120
#define CTRL_C_EVENT
Definition: wincon.h:68
static void DoAbortThread(void)
#define FALSE
Definition: types.h:117
static void DoQuitTest(BOOL bForce)

Referenced by DoInitTest().

◆ PatternFromFlags()

static LPCSTR PatternFromFlags ( DWORD  flags)
static

Definition at line 458 of file SHChangeNotify.cpp.

459 {
460  static CHAR s_buf[(TYPE_MAX + 1) + 1];
461  for (INT i = 0; i < (TYPE_MAX + 1); ++i)
462  s_buf[i] = (char)('0' + !!(flags & (1 << i)));
463 
464  s_buf[TYPE_MAX + 1] = 0;
465  return s_buf;
466 }
char CHAR
Definition: xmlstorage.h:175
int32_t INT
Definition: typedefs.h:58
GLbitfield flags
Definition: glext.h:7161
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248

Referenced by DoTestEntry().

◆ START_TEST()

START_TEST ( SHChangeNotify  )

Definition at line 906 of file SHChangeNotify.cpp.

907 {
908 #ifdef TOTAL_TICK
909  DWORD dwOldTick = GetTickCount();
910 #endif
911 #ifdef DISABLE_THIS_TESTCASE
912  skip("This testcase is disabled by DISABLE_THIS_TESTCASE macro.\n");
913  return;
914 #endif
915 
916  trace("Please don't operate your PC while testing...\n");
917 
918  if (!GetSubProgramPath())
919  {
920  skip("shell32_apitest_sub.exe not found\n");
921  return;
922  }
923 
924  if (!DoInitTest())
925  {
926  skip("Unable to initialize.\n");
927  DoQuitTest(TRUE);
928  return;
929  }
930 
934 
935 #ifdef TOTAL_TICK
936  DWORD dwNewTick = GetTickCount();
937  DWORD dwTick = dwNewTick - dwOldTick;
938  trace("SHChangeNotify: Total %lu.%lu sec\n", (dwTick / 1000), (dwTick / 100 % 10));
939 #endif
940 
942  Sleep(100);
943 }
#define CloseHandle
Definition: compat.h:598
VOID WINAPI DECLSPEC_HOTPATCH Sleep(IN DWORD dwMilliseconds)
Definition: synch.c:790
#define TRUE
Definition: types.h:120
static HWND DoWaitForWindow(LPCWSTR clsname, LPCWSTR text, BOOL bClosing, BOOL bForce)
DWORD WINAPI GetTickCount(VOID)
Definition: time.c:455
static BOOL GetSubProgramPath(void)
_CRTIMP uintptr_t __cdecl _beginthreadex(_In_opt_ void *_Security, _In_ unsigned _StackSize, _In_ unsigned(__stdcall *_StartAddress)(void *), _In_opt_ void *_ArgList, _In_ unsigned _InitFlag, _Out_opt_ unsigned *_ThrdAddr)
DWORD WINAPI WaitForSingleObject(IN HANDLE hHandle, IN DWORD dwMilliseconds)
Definition: synch.c:82
static unsigned __stdcall TestThreadProc(void *)
#define trace
Definition: atltest.h:70
PVOID HANDLE
Definition: typedefs.h:73
unsigned long DWORD
Definition: ntddk_ex.h:95
#define CLASSNAME
static BOOL DoInitTest(void)
static HANDLE s_hThread
#define NULL
Definition: types.h:112
#define skip(...)
Definition: atltest.h:64
static void DoQuitTest(BOOL bForce)
#define INFINITE
Definition: serial.h:102

◆ TestThreadProc()

static unsigned __stdcall TestThreadProc ( void )
static

Definition at line 782 of file SHChangeNotify.cpp.

783 {
784  srand(time(NULL));
785 #ifdef RANDOM_QUARTER
786  skip("RANDOM_QUARTER\n");
787 #elif defined(RANDOM_HALF)
788  skip("RANDOM_HALF\n");
789 #endif
790 
791  // fRecursive == FALSE.
804 
806 
807 #define SWITCH(x, y) (bTarget ? (x) : (y))
820 #undef SWITCH
821 
822 #ifndef NO_TRIVIAL
835 #endif
836 
849 
850  // fRecursive == TRUE.
863 
876 
889 
902 
903  return 0;
904 }
#define SRC_08
#define TRUE
Definition: types.h:120
#define WATCHDIR_0
#define WATCHDIR_2
#define SRC_01
void __cdecl srand(_In_ unsigned int _Seed)
__u16 time
Definition: mkdosfs.c:366
#define SWITCH(x, y)
static const TEST_ENTRY s_group_02[]
#define SRC_03
#define FALSE
Definition: types.h:117
unsigned int BOOL
Definition: ntddk_ex.h:94
static const TEST_ENTRY s_group_08[]
static void DoTestGroup(INT line, UINT cEntries, const TEST_ENTRY *pEntries, BOOL fRecursive, INT nSources, DIRTYPE iWatchDir)
#define SRC_00
#define WATCHDIR_1
VERSIONHELPERAPI IsWindowsVistaOrGreater()
static const TEST_ENTRY s_group_05[]
VERSIONHELPERAPI IsWindowsXPOrGreater()
#define _countof(array)
Definition: sndvol32.h:68
static const TEST_ENTRY s_group_01[]
static const TEST_ENTRY s_group_04[]
#define WATCHDIR_3
static const TEST_ENTRY s_group_00[]
static const TEST_ENTRY s_group_07[]
#define NULL
Definition: types.h:112
#define skip(...)
Definition: atltest.h:64
#define SRC_05
#define SRC_10
#define SRC_04
static const TEST_ENTRY s_group_06[]
#define SRC_02
#define SRC_06
static const TEST_ENTRY s_group_03[]
#define SRC_09
#define SRC_11
#define SRC_07

Referenced by START_TEST().

Variable Documentation

◆ s_group_00

const TEST_ENTRY s_group_00[]
static
Initial value:
=
{
{ __LINE__, WRITEDIR_0, "0000000", L"", L"", DoAction1 },
{ __LINE__, WRITEDIR_0, "0000000", L"", L"", DoAction2 },
{ __LINE__, WRITEDIR_0, "0000000", L"", L"", DoAction3 },
{ __LINE__, WRITEDIR_0, "0000000", L"", L"", DoAction4 },
{ __LINE__, WRITEDIR_0, "0000000", L"", L"", DoAction5 },
{ __LINE__, WRITEDIR_0, "0000000", L"", L"", DoAction6 },
{ __LINE__, WRITEDIR_0, "0000000", L"", L"", DoAction7 },
{ __LINE__, WRITEDIR_0, "0000000", L"", L"", DoAction8 },
{ __LINE__, WRITEDIR_0, "0000000", L"", L"", DoAction9 },
{ __LINE__, WRITEDIR_0, "0000000", L"", L"", DoAction10 },
{ __LINE__, WRITEDIR_0, "0000000", L"", L"", DoAction11 },
{ __LINE__, WRITEDIR_0, "0000000", L"", L"", DoAction12 },
{ __LINE__, WRITEDIR_1, "0000000", L"", L"", DoAction1 },
{ __LINE__, WRITEDIR_1, "0000000", L"", L"", DoAction2 },
{ __LINE__, WRITEDIR_1, "0000000", L"", L"", DoAction3 },
{ __LINE__, WRITEDIR_1, "0000000", L"", L"", DoAction4 },
{ __LINE__, WRITEDIR_1, "0000000", L"", L"", DoAction5 },
{ __LINE__, WRITEDIR_1, "0000000", L"", L"", DoAction6 },
{ __LINE__, WRITEDIR_1, "0000000", L"", L"", DoAction7 },
{ __LINE__, WRITEDIR_1, "0000000", L"", L"", DoAction8 },
{ __LINE__, WRITEDIR_1, "0000000", L"", L"", DoAction9 },
{ __LINE__, WRITEDIR_1, "0000000", L"", L"", DoAction10 },
{ __LINE__, WRITEDIR_1, "0000000", L"", L"", DoAction11 },
{ __LINE__, WRITEDIR_1, "0000000", L"", L"", DoAction12 },
}
#define WRITEDIR_0
static BOOL DoAction11(const TEST_ENTRY *entry)
static BOOL DoAction3(const TEST_ENTRY *entry)
static BOOL DoAction2(const TEST_ENTRY *entry)
static BOOL DoAction8(const TEST_ENTRY *entry)
static BOOL DoAction7(const TEST_ENTRY *entry)
static BOOL DoAction6(const TEST_ENTRY *entry)
#define L(x)
Definition: ntvdm.h:50
#define WRITEDIR_1
static BOOL DoAction9(const TEST_ENTRY *entry)
static BOOL DoAction1(const TEST_ENTRY *entry)
static BOOL DoAction10(const TEST_ENTRY *entry)
static BOOL DoAction5(const TEST_ENTRY *entry)
static BOOL DoAction12(const TEST_ENTRY *entry)
static BOOL DoAction4(const TEST_ENTRY *entry)

Definition at line 197 of file SHChangeNotify.cpp.

Referenced by TestThreadProc().

◆ s_group_01

const TEST_ENTRY s_group_01[]
static
Initial value:
=
{
{ __LINE__, WRITEDIR_0, "0000000", L"", L"", DoAction1 },
{ __LINE__, WRITEDIR_0, "0000000", L"", L"", DoAction2 },
{ __LINE__, WRITEDIR_0, "0000000", L"", L"", DoAction3 },
{ __LINE__, WRITEDIR_0, "0000000", L"", L"", DoAction4 },
{ __LINE__, WRITEDIR_0, "0000000", L"", L"", DoAction5 },
{ __LINE__, WRITEDIR_0, "0000000", L"", L"", DoAction6 },
{ __LINE__, WRITEDIR_0, "0000000", L"", L"", DoAction7 },
{ __LINE__, WRITEDIR_0, "0000000", L"", L"", DoAction8 },
{ __LINE__, WRITEDIR_0, "0100000", s_szTestFile0, L"", DoAction9 },
{ __LINE__, WRITEDIR_0, "0010000", s_szTestFile0, L"", DoAction10 },
{ __LINE__, WRITEDIR_0, "0001000", s_szTestDir0, L"", DoAction11 },
{ __LINE__, WRITEDIR_0, "0000100", s_szTestDir0, L"", DoAction12 },
{ __LINE__, WRITEDIR_1, "0000000", L"", L"", DoAction1 },
{ __LINE__, WRITEDIR_1, "0000000", L"", L"", DoAction2 },
{ __LINE__, WRITEDIR_1, "0000000", L"", L"", DoAction3 },
{ __LINE__, WRITEDIR_1, "0000000", L"", L"", DoAction4 },
{ __LINE__, WRITEDIR_1, "0000000", L"", L"", DoAction5 },
{ __LINE__, WRITEDIR_1, "0000000", L"", L"", DoAction6 },
{ __LINE__, WRITEDIR_1, "0000000", L"", L"", DoAction7 },
{ __LINE__, WRITEDIR_1, "0000000", L"", L"", DoAction8 },
{ __LINE__, WRITEDIR_1, "0100000", s_szTestFile1, L"", DoAction9 },
{ __LINE__, WRITEDIR_1, "0010000", s_szTestFile1, L"", DoAction10 },
{ __LINE__, WRITEDIR_1, "0001000", s_szTestDir1, L"", DoAction11 },
{ __LINE__, WRITEDIR_1, "0000100", s_szTestDir1, L"", DoAction12 },
}
#define WRITEDIR_0
static BOOL DoAction11(const TEST_ENTRY *entry)
static WCHAR s_szTestFile0[MAX_PATH]
static BOOL DoAction3(const TEST_ENTRY *entry)
static BOOL DoAction2(const TEST_ENTRY *entry)
static BOOL DoAction8(const TEST_ENTRY *entry)
static BOOL DoAction7(const TEST_ENTRY *entry)
static BOOL DoAction6(const TEST_ENTRY *entry)
#define L(x)
Definition: ntvdm.h:50
#define WRITEDIR_1
static BOOL DoAction9(const TEST_ENTRY *entry)
static BOOL DoAction1(const TEST_ENTRY *entry)
static WCHAR s_szTestDir0[MAX_PATH]
static BOOL DoAction10(const TEST_ENTRY *entry)
static WCHAR s_szTestDir1[MAX_PATH]
static BOOL DoAction5(const TEST_ENTRY *entry)
static BOOL DoAction12(const TEST_ENTRY *entry)
static BOOL DoAction4(const TEST_ENTRY *entry)
static WCHAR s_szTestFile1[MAX_PATH]

Definition at line 226 of file SHChangeNotify.cpp.

Referenced by TestThreadProc().

◆ s_group_02

const TEST_ENTRY s_group_02[]
static
Initial value:
=
{
{ __LINE__, WRITEDIR_0, "0000000", L"", L"", DoAction1 },
{ __LINE__, WRITEDIR_0, "0000000", L"", L"", DoAction2 },
{ __LINE__, WRITEDIR_0, "0000000", L"", L"", DoAction3 },
{ __LINE__, WRITEDIR_0, "0000000", L"", L"", DoAction4 },
{ __LINE__, WRITEDIR_0, "0000000", L"", L"", DoAction5 },
{ __LINE__, WRITEDIR_0, "0000000", L"", L"", DoAction6 },
{ __LINE__, WRITEDIR_0, "0000000", L"", L"", DoAction7 },
{ __LINE__, WRITEDIR_0, "0000000", L"", L"", DoAction8 },
{ __LINE__, WRITEDIR_0, "0000000", L"", L"", DoAction9 },
{ __LINE__, WRITEDIR_0, "0000000", L"", L"", DoAction10 },
{ __LINE__, WRITEDIR_0, "0000000", L"", L"", DoAction11 },
{ __LINE__, WRITEDIR_0, "0000000", L"", L"", DoAction12 },
{ __LINE__, WRITEDIR_1, "0000000", L"", L"", DoAction1 },
{ __LINE__, WRITEDIR_1, "0000000", L"", L"", DoAction2 },
{ __LINE__, WRITEDIR_1, "0000000", L"", L"", DoAction3 },
{ __LINE__, WRITEDIR_1, "0000000", L"", L"", DoAction4 },
{ __LINE__, WRITEDIR_1, "0000000", L"", L"", DoAction5 },
{ __LINE__, WRITEDIR_1, "0000000", L"", L"", DoAction6 },
{ __LINE__, WRITEDIR_1, "0000000", L"", L"", DoAction7 },
{ __LINE__, WRITEDIR_1, "0000000", L"", L"", DoAction8 },
{ __LINE__, WRITEDIR_1, "0100000", s_szTestFile1, L"", DoAction9 },
{ __LINE__, WRITEDIR_1, "0010000", s_szTestFile1, L"", DoAction10 },
{ __LINE__, WRITEDIR_1, "0001000", s_szTestDir1, L"", DoAction11 },
{ __LINE__, WRITEDIR_1, "0000100", s_szTestDir1, L"", DoAction12 },
}
#define WRITEDIR_0
static BOOL DoAction11(const TEST_ENTRY *entry)
static BOOL DoAction3(const TEST_ENTRY *entry)
static BOOL DoAction2(const TEST_ENTRY *entry)
static BOOL DoAction8(const TEST_ENTRY *entry)
static BOOL DoAction7(const TEST_ENTRY *entry)
static BOOL DoAction6(const TEST_ENTRY *entry)
#define L(x)
Definition: ntvdm.h:50
#define WRITEDIR_1
static BOOL DoAction9(const TEST_ENTRY *entry)
static BOOL DoAction1(const TEST_ENTRY *entry)
static BOOL DoAction10(const TEST_ENTRY *entry)
static WCHAR s_szTestDir1[MAX_PATH]
static BOOL DoAction5(const TEST_ENTRY *entry)
static BOOL DoAction12(const TEST_ENTRY *entry)
static BOOL DoAction4(const TEST_ENTRY *entry)
static WCHAR s_szTestFile1[MAX_PATH]

Definition at line 255 of file SHChangeNotify.cpp.

Referenced by TestThreadProc().

◆ s_group_03

const TEST_ENTRY s_group_03[]
static
Initial value:
=
{
{ __LINE__, WRITEDIR_0, "0000000", L"", L"", DoAction1 },
{ __LINE__, WRITEDIR_0, "0000000", L"", L"", DoAction2 },
{ __LINE__, WRITEDIR_0, "0000000", L"", L"", DoAction3 },
{ __LINE__, WRITEDIR_0, "0000000", L"", L"", DoAction4 },
{ __LINE__, WRITEDIR_0, "0000000", L"", L"", DoAction5 },
{ __LINE__, WRITEDIR_0, "0000000", L"", L"", DoAction6 },
{ __LINE__, WRITEDIR_0, "0000000", L"", L"", DoAction7 },
{ __LINE__, WRITEDIR_0, "0000000", L"", L"", DoAction8 },
{ __LINE__, WRITEDIR_0, "0100000", s_szTestFile0, L"", DoAction9 },
{ __LINE__, WRITEDIR_0, "0010000", s_szTestFile0, L"", DoAction10 },
{ __LINE__, WRITEDIR_0, "0001000", s_szTestDir0, L"", DoAction11 },
{ __LINE__, WRITEDIR_0, "0000100", s_szTestDir0, L"", DoAction12 },
{ __LINE__, WRITEDIR_1, "0000000", L"", L"", DoAction1 },
{ __LINE__, WRITEDIR_1, "0000000", L"", L"", DoAction2 },
{ __LINE__, WRITEDIR_1, "0000000", L"", L"", DoAction3 },
{ __LINE__, WRITEDIR_1, "0000000", L"", L"", DoAction4 },
{ __LINE__, WRITEDIR_1, "0000000", L"", L"", DoAction5 },
{ __LINE__, WRITEDIR_1, "0000000", L"", L"", DoAction6 },
{ __LINE__, WRITEDIR_1, "0000000", L"", L"", DoAction7 },
{ __LINE__, WRITEDIR_1, "0000000", L"", L"", DoAction8 },
{ __LINE__, WRITEDIR_1, "0000000", L"", L"", DoAction9 },
{ __LINE__, WRITEDIR_1, "0000000", L"", L"", DoAction10 },
{ __LINE__, WRITEDIR_1, "0000000", L"", L"", DoAction11 },
{ __LINE__, WRITEDIR_1, "0000000", L"", L"", DoAction12 },
}
#define WRITEDIR_0
static BOOL DoAction11(const TEST_ENTRY *entry)
static WCHAR s_szTestFile0[MAX_PATH]
static BOOL DoAction3(const TEST_ENTRY *entry)
static BOOL DoAction2(const TEST_ENTRY *entry)
static BOOL DoAction8(const TEST_ENTRY *entry)
static BOOL DoAction7(const TEST_ENTRY *entry)
static BOOL DoAction6(const TEST_ENTRY *entry)
#define L(x)
Definition: ntvdm.h:50
#define WRITEDIR_1
static BOOL DoAction9(const TEST_ENTRY *entry)
static BOOL DoAction1(const TEST_ENTRY *entry)
static WCHAR s_szTestDir0[MAX_PATH]
static BOOL DoAction10(const TEST_ENTRY *entry)
static BOOL DoAction5(const TEST_ENTRY *entry)
static BOOL DoAction12(const TEST_ENTRY *entry)
static BOOL DoAction4(const TEST_ENTRY *entry)

Definition at line 284 of file SHChangeNotify.cpp.

Referenced by TestThreadProc().

◆ s_group_04

const TEST_ENTRY s_group_04[]
static
Initial value:
=
{
{ __LINE__, WRITEDIR_0, "0100000", s_szTestFile0, L"", DoAction1 },
{ __LINE__, WRITEDIR_0, "1000000", s_szTestFile0, s_szTestFile0Kai, DoAction2 },
{ __LINE__, WRITEDIR_0, "1000000", s_szTestFile0Kai, s_szTestFile0, DoAction3 },
{ __LINE__, WRITEDIR_0, "0010000", s_szTestFile0, L"", DoAction4 },
{ __LINE__, WRITEDIR_0, "0001000", s_szTestDir0, L"", DoAction5 },
{ __LINE__, WRITEDIR_0, "0000010", s_szTestDir0, s_szTestDir0Kai, DoAction6 },
{ __LINE__, WRITEDIR_0, "0000010", s_szTestDir0Kai, s_szTestDir0, DoAction7 },
{ __LINE__, WRITEDIR_0, "0000100", s_szTestDir0, L"", DoAction8 },
{ __LINE__, WRITEDIR_0, "0000000", L"", L"", DoAction9 },
{ __LINE__, WRITEDIR_0, "0000000", L"", L"", DoAction10 },
{ __LINE__, WRITEDIR_0, "0000000", L"", L"", DoAction11 },
{ __LINE__, WRITEDIR_0, "0000000", L"", L"", DoAction12 },
{ __LINE__, WRITEDIR_1, "0000000", L"", L"", DoAction1 },
{ __LINE__, WRITEDIR_1, "0000000", L"", L"", DoAction2 },
{ __LINE__, WRITEDIR_1, "0000000", L"", L"", DoAction3 },
{ __LINE__, WRITEDIR_1, "0000000", L"", L"", DoAction4 },
{ __LINE__, WRITEDIR_1, "0000000", L"", L"", DoAction5 },
{ __LINE__, WRITEDIR_1, "0000000", L"", L"", DoAction6 },
{ __LINE__, WRITEDIR_1, "0000000", L"", L"", DoAction7 },
{ __LINE__, WRITEDIR_1, "0000000", L"", L"", DoAction8 },
{ __LINE__, WRITEDIR_1, "0000000", L"", L"", DoAction9 },
{ __LINE__, WRITEDIR_1, "0000000", L"", L"", DoAction10 },
{ __LINE__, WRITEDIR_1, "0000000", L"", L"", DoAction11 },
{ __LINE__, WRITEDIR_1, "0000000", L"", L"", DoAction12 },
}
#define WRITEDIR_0
static BOOL DoAction11(const TEST_ENTRY *entry)
static WCHAR s_szTestFile0[MAX_PATH]
static BOOL DoAction3(const TEST_ENTRY *entry)
static BOOL DoAction2(const TEST_ENTRY *entry)
static BOOL DoAction8(const TEST_ENTRY *entry)
static BOOL DoAction7(const TEST_ENTRY *entry)
static BOOL DoAction6(const TEST_ENTRY *entry)
#define L(x)
Definition: ntvdm.h:50
#define WRITEDIR_1
static BOOL DoAction9(const TEST_ENTRY *entry)
static WCHAR s_szTestFile0Kai[MAX_PATH]
static WCHAR s_szTestDir0Kai[MAX_PATH]
static BOOL DoAction1(const TEST_ENTRY *entry)
static WCHAR s_szTestDir0[MAX_PATH]
static BOOL DoAction10(const TEST_ENTRY *entry)
static BOOL DoAction5(const TEST_ENTRY *entry)
static BOOL DoAction12(const TEST_ENTRY *entry)
static BOOL DoAction4(const TEST_ENTRY *entry)

Definition at line 313 of file SHChangeNotify.cpp.

Referenced by TestThreadProc().

◆ s_group_05

const TEST_ENTRY s_group_05[]
static
Initial value:
=
{
{ __LINE__, WRITEDIR_0, "0000000", L"", L"", DoAction1 },
{ __LINE__, WRITEDIR_0, "0000000", L"", L"", DoAction2 },
{ __LINE__, WRITEDIR_0, "0000000", L"", L"", DoAction3 },
{ __LINE__, WRITEDIR_0, "0000000", L"", L"", DoAction4 },
{ __LINE__, WRITEDIR_0, "0000000", L"", L"", DoAction5 },
{ __LINE__, WRITEDIR_0, "0000000", L"", L"", DoAction6 },
{ __LINE__, WRITEDIR_0, "0000000", L"", L"", DoAction7 },
{ __LINE__, WRITEDIR_0, "0000000", L"", L"", DoAction8 },
{ __LINE__, WRITEDIR_0, "0000000", L"", L"", DoAction9 },
{ __LINE__, WRITEDIR_0, "0000000", L"", L"", DoAction10 },
{ __LINE__, WRITEDIR_0, "0000000", L"", L"", DoAction11 },
{ __LINE__, WRITEDIR_0, "0000000", L"", L"", DoAction12 },
{ __LINE__, WRITEDIR_1, "0100000", s_szTestFile1, L"", DoAction1 },
{ __LINE__, WRITEDIR_1, "1000000", s_szTestFile1, s_szTestFile1Kai, DoAction2 },
{ __LINE__, WRITEDIR_1, "1000000", s_szTestFile1Kai, s_szTestFile1, DoAction3 },
{ __LINE__, WRITEDIR_1, "0010000", s_szTestFile1, L"", DoAction4 },
{ __LINE__, WRITEDIR_1, "0001000", s_szTestDir1, L"", DoAction5 },
{ __LINE__, WRITEDIR_1, "0000010", s_szTestDir1, s_szTestDir1Kai, DoAction6 },
{ __LINE__, WRITEDIR_1, "0000010", s_szTestDir1Kai, s_szTestDir1, DoAction7 },
{ __LINE__, WRITEDIR_1, "0000100", s_szTestDir1, L"", DoAction8 },
{ __LINE__, WRITEDIR_1, "0000000", L"", L"", DoAction9 },
{ __LINE__, WRITEDIR_1, "0000000", L"", L"", DoAction10 },
{ __LINE__, WRITEDIR_1, "0000000", L"", L"", DoAction11 },
{ __LINE__, WRITEDIR_1, "0000000", L"", L"", DoAction12 },
}
#define WRITEDIR_0
static BOOL DoAction11(const TEST_ENTRY *entry)
static BOOL DoAction3(const TEST_ENTRY *entry)
static BOOL DoAction2(const TEST_ENTRY *entry)
static BOOL DoAction8(const TEST_ENTRY *entry)
static BOOL DoAction7(const TEST_ENTRY *entry)
static BOOL DoAction6(const TEST_ENTRY *entry)
#define L(x)
Definition: ntvdm.h:50
#define WRITEDIR_1
static BOOL DoAction9(const TEST_ENTRY *entry)
static BOOL DoAction1(const TEST_ENTRY *entry)
static WCHAR s_szTestDir1Kai[MAX_PATH]
static BOOL DoAction10(const TEST_ENTRY *entry)
static WCHAR s_szTestDir1[MAX_PATH]
static BOOL DoAction5(const TEST_ENTRY *entry)
static BOOL DoAction12(const TEST_ENTRY *entry)
static WCHAR s_szTestFile1Kai[MAX_PATH]
static BOOL DoAction4(const TEST_ENTRY *entry)
static WCHAR s_szTestFile1[MAX_PATH]

Definition at line 342 of file SHChangeNotify.cpp.

Referenced by TestThreadProc().

◆ s_group_06

const TEST_ENTRY s_group_06[]
static
Initial value:
=
{
{ __LINE__, WRITEDIR_0, "0100000", s_szTestFile0, L"", DoAction1 },
{ __LINE__, WRITEDIR_0, "1000000", s_szTestFile0, s_szTestFile0Kai, DoAction2 },
{ __LINE__, WRITEDIR_0, "1000000", s_szTestFile0Kai, s_szTestFile0, DoAction3 },
{ __LINE__, WRITEDIR_0, "0010000", s_szTestFile0, L"", DoAction4 },
{ __LINE__, WRITEDIR_0, "0001000", s_szTestDir0, L"", DoAction5 },
{ __LINE__, WRITEDIR_0, "0000010", s_szTestDir0, s_szTestDir0Kai, DoAction6 },
{ __LINE__, WRITEDIR_0, "0000010", s_szTestDir0Kai, s_szTestDir0, DoAction7 },
{ __LINE__, WRITEDIR_0, "0000100", s_szTestDir0, L"", DoAction8 },
{ __LINE__, WRITEDIR_0, "0100000", s_szTestFile0, L"", DoAction9 },
{ __LINE__, WRITEDIR_0, "0010000", s_szTestFile0, L"", DoAction10 },
{ __LINE__, WRITEDIR_0, "0001000", s_szTestDir0, L"", DoAction11 },
{ __LINE__, WRITEDIR_0, "0000100", s_szTestDir0, L"", DoAction12 },
{ __LINE__, WRITEDIR_1, "0000000", L"", L"", DoAction1 },
{ __LINE__, WRITEDIR_1, "0000000", L"", L"", DoAction2 },
{ __LINE__, WRITEDIR_1, "0000000", L"", L"", DoAction3 },
{ __LINE__, WRITEDIR_1, "0000000", L"", L"", DoAction4 },
{ __LINE__, WRITEDIR_1, "0000000", L"", L"", DoAction5 },
{ __LINE__, WRITEDIR_1, "0000000", L"", L"", DoAction6 },
{ __LINE__, WRITEDIR_1, "0000000", L"", L"", DoAction7 },
{ __LINE__, WRITEDIR_1, "0000000", L"", L"", DoAction8 },
{ __LINE__, WRITEDIR_1, "0100000", s_szTestFile1, L"", DoAction9 },
{ __LINE__, WRITEDIR_1, "0010000", s_szTestFile1, L"", DoAction10 },
{ __LINE__, WRITEDIR_1, "0001000", s_szTestDir1, L"", DoAction11 },
{ __LINE__, WRITEDIR_1, "0000100", s_szTestDir1, L"", DoAction12 },
}
#define WRITEDIR_0
static BOOL DoAction11(const TEST_ENTRY *entry)
static WCHAR s_szTestFile0[MAX_PATH]
static BOOL DoAction3(const TEST_ENTRY *entry)
static BOOL DoAction2(const TEST_ENTRY *entry)
static BOOL DoAction8(const TEST_ENTRY *entry)
static BOOL DoAction7(const TEST_ENTRY *entry)
static BOOL DoAction6(const TEST_ENTRY *entry)
#define L(x)
Definition: ntvdm.h:50
#define WRITEDIR_1
static BOOL DoAction9(const TEST_ENTRY *entry)
static WCHAR s_szTestFile0Kai[MAX_PATH]
static WCHAR s_szTestDir0Kai[MAX_PATH]
static BOOL DoAction1(const TEST_ENTRY *entry)
static WCHAR s_szTestDir0[MAX_PATH]
static BOOL DoAction10(const TEST_ENTRY *entry)
static WCHAR s_szTestDir1[MAX_PATH]
static BOOL DoAction5(const TEST_ENTRY *entry)
static BOOL DoAction12(const TEST_ENTRY *entry)
static BOOL DoAction4(const TEST_ENTRY *entry)
static WCHAR s_szTestFile1[MAX_PATH]

Definition at line 371 of file SHChangeNotify.cpp.

Referenced by TestThreadProc().

◆ s_group_07

const TEST_ENTRY s_group_07[]
static
Initial value:
=
{
{ __LINE__, WRITEDIR_0, "0100000", s_szTestFile0, L"", DoAction1 },
{ __LINE__, WRITEDIR_0, "1000000", s_szTestFile0, s_szTestFile0Kai, DoAction2 },
{ __LINE__, WRITEDIR_0, "1000000", s_szTestFile0Kai, s_szTestFile0, DoAction3 },
{ __LINE__, WRITEDIR_0, "0010000", s_szTestFile0, L"", DoAction4 },
{ __LINE__, WRITEDIR_0, "0001000", s_szTestDir0, L"", DoAction5 },
{ __LINE__, WRITEDIR_0, "0000010", s_szTestDir0, s_szTestDir0Kai, DoAction6 },
{ __LINE__, WRITEDIR_0, "0000010", s_szTestDir0Kai, s_szTestDir0, DoAction7 },
{ __LINE__, WRITEDIR_0, "0000100", s_szTestDir0, L"", DoAction8 },
{ __LINE__, WRITEDIR_0, "0100000", s_szTestFile0, L"", DoAction9 },
{ __LINE__, WRITEDIR_0, "0010000", s_szTestFile0, L"", DoAction10 },
{ __LINE__, WRITEDIR_0, "0001000", s_szTestDir0, L"", DoAction11 },
{ __LINE__, WRITEDIR_0, "0000100", s_szTestDir0, L"", DoAction12 },
{ __LINE__, WRITEDIR_1, "0000000", L"", L"", DoAction1 },
{ __LINE__, WRITEDIR_1, "0000000", L"", L"", DoAction2 },
{ __LINE__, WRITEDIR_1, "0000000", L"", L"", DoAction3 },
{ __LINE__, WRITEDIR_1, "0000000", L"", L"", DoAction4 },
{ __LINE__, WRITEDIR_1, "0000000", L"", L"", DoAction5 },
{ __LINE__, WRITEDIR_1, "0000000", L"", L"", DoAction6 },
{ __LINE__, WRITEDIR_1, "0000000", L"", L"", DoAction7 },
{ __LINE__, WRITEDIR_1, "0000000", L"", L"", DoAction8 },
{ __LINE__, WRITEDIR_1, "0000000", L"", L"", DoAction9 },
{ __LINE__, WRITEDIR_1, "0000000", L"", L"", DoAction10 },
{ __LINE__, WRITEDIR_1, "0000000", L"", L"", DoAction11 },
{ __LINE__, WRITEDIR_1, "0000000", L"", L"", DoAction12 },
}
#define WRITEDIR_0
static BOOL DoAction11(const TEST_ENTRY *entry)
static WCHAR s_szTestFile0[MAX_PATH]
static BOOL DoAction3(const TEST_ENTRY *entry)
static BOOL DoAction2(const TEST_ENTRY *entry)
static BOOL DoAction8(const TEST_ENTRY *entry)
static BOOL DoAction7(const TEST_ENTRY *entry)
static BOOL DoAction6(const TEST_ENTRY *entry)
#define L(x)
Definition: ntvdm.h:50
#define WRITEDIR_1
static BOOL DoAction9(const TEST_ENTRY *entry)
static WCHAR s_szTestFile0Kai[MAX_PATH]
static WCHAR s_szTestDir0Kai[MAX_PATH]
static BOOL DoAction1(const TEST_ENTRY *entry)
static WCHAR s_szTestDir0[MAX_PATH]
static BOOL DoAction10(const TEST_ENTRY *entry)
static BOOL DoAction5(const TEST_ENTRY *entry)
static BOOL DoAction12(const TEST_ENTRY *entry)
static BOOL DoAction4(const TEST_ENTRY *entry)

Definition at line 400 of file SHChangeNotify.cpp.

Referenced by TestThreadProc().

◆ s_group_08

const TEST_ENTRY s_group_08[]
static
Initial value:
=
{
{ __LINE__, WRITEDIR_0, "0000000", L"", L"", DoAction1 },
{ __LINE__, WRITEDIR_0, "0000000", L"", L"", DoAction2 },
{ __LINE__, WRITEDIR_0, "0000000", L"", L"", DoAction3 },
{ __LINE__, WRITEDIR_0, "0000000", L"", L"", DoAction4 },
{ __LINE__, WRITEDIR_0, "0000000", L"", L"", DoAction5 },
{ __LINE__, WRITEDIR_0, "0000000", L"", L"", DoAction6 },
{ __LINE__, WRITEDIR_0, "0000000", L"", L"", DoAction7 },
{ __LINE__, WRITEDIR_0, "0000000", L"", L"", DoAction8 },
{ __LINE__, WRITEDIR_0, "0000000", L"", L"", DoAction9 },
{ __LINE__, WRITEDIR_0, "0000000", L"", L"", DoAction10 },
{ __LINE__, WRITEDIR_0, "0000000", L"", L"", DoAction11 },
{ __LINE__, WRITEDIR_0, "0000000", L"", L"", DoAction12 },
{ __LINE__, WRITEDIR_1, "0100000", s_szTestFile1, L"", DoAction1 },
{ __LINE__, WRITEDIR_1, "1000000", s_szTestFile1, s_szTestFile1Kai, DoAction2 },
{ __LINE__, WRITEDIR_1, "1000000", s_szTestFile1Kai, s_szTestFile1, DoAction3 },
{ __LINE__, WRITEDIR_1, "0010000", s_szTestFile1, L"", DoAction4 },
{ __LINE__, WRITEDIR_1, "0001000", s_szTestDir1, L"", DoAction5 },
{ __LINE__, WRITEDIR_1, "0000010", s_szTestDir1, s_szTestDir1Kai, DoAction6 },
{ __LINE__, WRITEDIR_1, "0000010", s_szTestDir1Kai, s_szTestDir1, DoAction7 },
{ __LINE__, WRITEDIR_1, "0000100", s_szTestDir1, L"", DoAction8 },
{ __LINE__, WRITEDIR_1, "0100000", s_szTestFile1, L"", DoAction9 },
{ __LINE__, WRITEDIR_1, "0010000", s_szTestFile1, L"", DoAction10 },
{ __LINE__, WRITEDIR_1, "0001000", s_szTestDir1, L"", DoAction11 },
{ __LINE__, WRITEDIR_1, "0000100", s_szTestDir1, L"", DoAction12 },
}
#define WRITEDIR_0
static BOOL DoAction11(const TEST_ENTRY *entry)
static BOOL DoAction3(const TEST_ENTRY *entry)
static BOOL DoAction2(const TEST_ENTRY *entry)
static BOOL DoAction8(const TEST_ENTRY *entry)
static BOOL DoAction7(const TEST_ENTRY *entry)
static BOOL DoAction6(const TEST_ENTRY *entry)
#define L(x)
Definition: ntvdm.h:50
#define WRITEDIR_1
static BOOL DoAction9(const TEST_ENTRY *entry)
static BOOL DoAction1(const TEST_ENTRY *entry)
static WCHAR s_szTestDir1Kai[MAX_PATH]
static BOOL DoAction10(const TEST_ENTRY *entry)
static WCHAR s_szTestDir1[MAX_PATH]
static BOOL DoAction5(const TEST_ENTRY *entry)
static BOOL DoAction12(const TEST_ENTRY *entry)
static WCHAR s_szTestFile1Kai[MAX_PATH]
static BOOL DoAction4(const TEST_ENTRY *entry)
static WCHAR s_szTestFile1[MAX_PATH]

Definition at line 429 of file SHChangeNotify.cpp.

Referenced by TestThreadProc().

◆ s_hEvent

HANDLE s_hEvent = NULL
static

Definition at line 33 of file SHChangeNotify.cpp.

Referenced by DoQuitTest(), DoTestEntry(), and DoTestGroup().

◆ s_hThread

HANDLE s_hThread = NULL
static

Definition at line 32 of file SHChangeNotify.cpp.

Referenced by DoAbortThread(), and START_TEST().

◆ s_hwnd

HWND s_hwnd = NULL
static

Definition at line 30 of file SHChangeNotify.cpp.

Referenced by DoQuitTest(), DoTestEntry(), and DoTestGroup().

◆ s_szDesktop

WCHAR s_szDesktop[MAX_PATH]
static

Definition at line 171 of file SHChangeNotify.cpp.

Referenced by DoInitTest().

◆ s_szDocuments

WCHAR s_szDocuments[MAX_PATH]
static

Definition at line 178 of file SHChangeNotify.cpp.

Referenced by DoInitTest().

◆ s_szSubProgram

WCHAR s_szSubProgram[MAX_PATH]
static

Definition at line 31 of file SHChangeNotify.cpp.

Referenced by DoTestGroup(), and GetSubProgramPath().

◆ s_szTestDir0

WCHAR s_szTestDir0[MAX_PATH]
static

Definition at line 174 of file SHChangeNotify.cpp.

Referenced by DoDeleteFilesAndDirs(), and DoInitTest().

◆ s_szTestDir0Kai

WCHAR s_szTestDir0Kai[MAX_PATH]
static

Definition at line 175 of file SHChangeNotify.cpp.

Referenced by DoDeleteFilesAndDirs(), and DoInitTest().

◆ s_szTestDir1

WCHAR s_szTestDir1[MAX_PATH]
static

Definition at line 181 of file SHChangeNotify.cpp.

Referenced by DoDeleteFilesAndDirs(), and DoInitTest().

◆ s_szTestDir1Kai

WCHAR s_szTestDir1Kai[MAX_PATH]
static

Definition at line 182 of file SHChangeNotify.cpp.

Referenced by DoDeleteFilesAndDirs(), and DoInitTest().

◆ s_szTestFile0

WCHAR s_szTestFile0[MAX_PATH]
static

Definition at line 172 of file SHChangeNotify.cpp.

Referenced by DoDeleteFilesAndDirs(), and DoInitTest().

◆ s_szTestFile0Kai

WCHAR s_szTestFile0Kai[MAX_PATH]
static

Definition at line 173 of file SHChangeNotify.cpp.

Referenced by DoDeleteFilesAndDirs(), and DoInitTest().

◆ s_szTestFile1

WCHAR s_szTestFile1[MAX_PATH]
static

Definition at line 179 of file SHChangeNotify.cpp.

Referenced by DoDeleteFilesAndDirs(), and DoInitTest().

◆ s_szTestFile1Kai

WCHAR s_szTestFile1Kai[MAX_PATH]
static

Definition at line 180 of file SHChangeNotify.cpp.

Referenced by DoDeleteFilesAndDirs(), and DoInitTest().