ReactOS  0.4.15-dev-1152-g6c94e4f
SHChangeNotify.cpp
Go to the documentation of this file.
1 /*
2  * PROJECT: ReactOS api tests
3  * LICENSE: LGPL-2.0-or-later (https://spdx.org/licenses/LGPL-2.0-or-later)
4  * PURPOSE: Test for SHChangeNotify
5  * COPYRIGHT: Copyright 2020 Katayama Hirofumi MZ (katayama.hirofumi.mz@gmail.com)
6  */
7 
8 // NOTE: This test program closes the Explorer cabinets before tests.
9 
10 #include "shelltest.h"
11 #include <shlwapi.h>
12 #include <stdio.h>
13 #include "SHChangeNotify.h"
14 
15 #define DONT_SEND 0x24242424
16 
17 static HWND s_hwnd = NULL;
18 static const WCHAR s_szName[] = L"SHChangeNotify testcase";
20 
21 typedef void (*ACTION)(void);
22 
23 typedef struct TEST_ENTRY
24 {
25  INT line;
33 } TEST_ENTRY;
34 
35 static BOOL
37 {
38  FILE *fp = _wfopen(pszFileName, L"wb");
39  fclose(fp);
40  return fp != NULL;
41 }
42 
43 static void
44 DoAction1(void)
45 {
47 }
48 
49 static void
50 DoAction2(void)
51 {
53 }
54 
55 static void
56 DoAction3(void)
57 {
59 }
60 
61 static void
62 DoAction4(void)
63 {
65 }
66 
67 static void
68 DoAction5(void)
69 {
71 }
72 
73 static void
74 DoAction6(void)
75 {
77 }
78 
79 static void
80 DoAction7(void)
81 {
85 }
86 
87 static void
88 DoAction8(void)
89 {
91  ok(ret, "RemoveDirectoryW failed. GetLastError() == %ld\n", GetLastError());
92 }
93 
95 {
96  {__LINE__, SHCNE_MKDIR, s_dir2, NULL, NULL, DoAction1, NULL, NULL},
97  {__LINE__, SHCNE_RMDIR, s_dir2, NULL, "00001000", NULL, s_dir2, L""},
98  {__LINE__, SHCNE_RMDIR, s_dir2, NULL, "00001000", DoAction2, s_dir2, L""},
99  {__LINE__, SHCNE_MKDIR, s_dir2, NULL, "00010000", DoAction1, s_dir2, L""},
100  {__LINE__, SHCNE_RENAMEFOLDER, s_dir2, s_dir3, "00000001", NULL, s_dir2, s_dir3},
101  {__LINE__, SHCNE_RENAMEFOLDER, s_dir2, s_dir3, "00000001", DoAction3, s_dir2, s_dir3},
102  {__LINE__, SHCNE_CREATE, s_file1, NULL, "01000000", NULL, s_file1, L""},
103  {__LINE__, SHCNE_CREATE, s_file1, s_file2, "01000000", NULL, s_file1, s_file2},
104  {__LINE__, SHCNE_CREATE, s_file1, NULL, "01000000", DoAction4, s_file1, L""},
105  {__LINE__, SHCNE_RENAMEITEM, s_file1, s_file2, "10000000", NULL, s_file1, s_file2},
106  {__LINE__, SHCNE_RENAMEITEM, s_file1, s_file2, "10000000", DoAction5, s_file1, s_file2},
107  {__LINE__, SHCNE_RENAMEITEM, s_file1, s_file2, "10000000", NULL, s_file1, s_file2},
108  {__LINE__, SHCNE_UPDATEITEM, s_file1, NULL, "00000010", NULL, s_file1, L""},
109  {__LINE__, SHCNE_UPDATEITEM, s_file2, NULL, "00000010", NULL, s_file2, L""},
110  {__LINE__, SHCNE_DELETE, s_file1, NULL, "00100000", NULL, s_file1, L""},
111  {__LINE__, SHCNE_DELETE, s_file2, NULL, "00100000", NULL, s_file2, L""},
112  {__LINE__, SHCNE_DELETE, s_file2, NULL, "00100000", DoAction6, s_file2, L""},
113  {__LINE__, SHCNE_DELETE, s_file2, NULL, "00100000", NULL, s_file2, L""},
114  {__LINE__, SHCNE_DELETE, s_file1, NULL, "00100000", NULL, s_file1, L""},
115  {__LINE__, SHCNE_RMDIR, s_dir2, NULL, "00001000", NULL, s_dir2, L""},
116  {__LINE__, SHCNE_RMDIR, s_dir3, NULL, "00001000", DoAction7, s_dir3, L""},
117  {__LINE__, SHCNE_RMDIR, s_dir1, NULL, "00001000", NULL, s_dir1, L""},
118  {__LINE__, SHCNE_RMDIR, s_dir1, NULL, "00001000", DoAction8, s_dir1, L""},
119 };
120 
121 #define s_TestEntriesMode1 s_TestEntriesMode0
122 #define s_TestEntriesMode2 s_TestEntriesMode0
123 
125 {
126  {__LINE__, DONT_SEND, s_dir2, NULL, NULL, DoAction1, NULL, NULL},
127  {__LINE__, DONT_SEND, s_dir2, NULL, "00001000", DoAction2, s_dir2, L""},
128  {__LINE__, DONT_SEND, s_dir2, NULL, "00010000", DoAction1, s_dir2, L""},
129  {__LINE__, DONT_SEND, s_dir2, s_dir3, "00000001", DoAction3, s_dir2, s_dir3},
130  {__LINE__, DONT_SEND, s_file1, NULL, "01000000", DoAction4, s_file1, L""},
131  {__LINE__, DONT_SEND, s_file1, s_file2, "10000000", DoAction5, s_file1, s_file2},
132  {__LINE__, DONT_SEND, s_file2, NULL, "00100000", DoAction6, s_file2, L""},
133  {__LINE__, DONT_SEND, s_dir3, NULL, "00001000", DoAction7, s_dir3, L""},
134  {__LINE__, SHCNE_MKDIR, s_dir2, NULL, "00000000", NULL, NULL, NULL},
135  {__LINE__, SHCNE_INTERRUPT | SHCNE_MKDIR, s_dir2, NULL, "00000000", NULL, NULL, NULL},
136 };
137 
139 {
140  {__LINE__, DONT_SEND, s_dir2, NULL, NULL, DoAction1, NULL, NULL},
141  {__LINE__, DONT_SEND, s_dir2, NULL, "00001000", DoAction2, s_dir2, L""},
142  {__LINE__, DONT_SEND, s_dir2, NULL, "00010000", DoAction1, s_dir2, L""},
143  {__LINE__, DONT_SEND, s_dir2, s_dir3, "00000001", DoAction3, s_dir2, s_dir3},
144  {__LINE__, DONT_SEND, s_file1, NULL, "01000000", DoAction4, s_file1, L""},
145  {__LINE__, DONT_SEND, s_file1, s_file2, "10000000", DoAction5, s_file1, s_file2},
146  {__LINE__, DONT_SEND, s_file2, NULL, "00100000", DoAction6, s_file2, L""},
147  {__LINE__, DONT_SEND, s_dir3, NULL, "00001000", DoAction7, s_dir3, L""},
148  {__LINE__, SHCNE_MKDIR, s_dir2, NULL, "00000000", NULL, NULL, NULL},
149  {__LINE__, SHCNE_INTERRUPT | SHCNE_MKDIR, s_dir2, NULL, "00000000", NULL, NULL, NULL},
150 };
151 
153 {
154  {__LINE__, SHCNE_MKDIR, s_dir2, NULL, "00000000", NULL, NULL, NULL},
155  {__LINE__, SHCNE_RMDIR, s_dir2, NULL, "00000000", NULL, NULL, NULL},
156  {__LINE__, SHCNE_MKDIR, s_dir2, NULL, "00000000", DoAction1, NULL, NULL},
157  {__LINE__, SHCNE_RMDIR, s_dir2, NULL, "00000000", NULL, NULL, NULL},
158  {__LINE__, SHCNE_RMDIR, s_dir2, NULL, "00000000", DoAction2, NULL, NULL},
159  {__LINE__, SHCNE_MKDIR, s_dir2, NULL, "00000000", DoAction1, NULL, NULL},
160  {__LINE__, SHCNE_RENAMEFOLDER, s_dir2, s_dir3, "00000000", NULL, NULL, NULL},
161  {__LINE__, SHCNE_RENAMEFOLDER, s_dir2, s_dir3, "00000000", DoAction3, NULL, NULL},
162  {__LINE__, SHCNE_CREATE, s_file1, NULL, "00000000", NULL, NULL, NULL},
163  {__LINE__, SHCNE_CREATE, s_file1, s_file2, "00000000", NULL, NULL, NULL},
164  {__LINE__, SHCNE_CREATE, s_file1, NULL, "00000000", DoAction4, NULL, NULL},
165  {__LINE__, SHCNE_RENAMEITEM, s_file1, s_file2, "00000000", NULL, NULL, NULL},
166  {__LINE__, SHCNE_RENAMEITEM, s_file1, s_file2, "00000000", DoAction5, NULL, NULL},
167  {__LINE__, SHCNE_RENAMEITEM, s_file1, s_file2, "00000000", NULL, NULL, NULL},
168  {__LINE__, SHCNE_UPDATEITEM, s_file1, NULL, "00000000", NULL, NULL, NULL},
169  {__LINE__, SHCNE_UPDATEITEM, s_file2, NULL, "00000000", NULL, NULL, NULL},
170  {__LINE__, SHCNE_UPDATEITEM, s_file1, s_file2, "00000000", NULL, NULL, NULL},
171  {__LINE__, SHCNE_UPDATEITEM, s_file2, s_file1, "00000000", NULL, NULL, NULL},
172  {__LINE__, SHCNE_DELETE, s_file1, NULL, "00000000", NULL, NULL, NULL},
173  {__LINE__, SHCNE_DELETE, s_file2, NULL, "00000000", NULL, NULL, NULL},
174  {__LINE__, SHCNE_DELETE, s_file2, s_file1, "00000000", NULL, NULL, NULL},
175  {__LINE__, SHCNE_DELETE, s_file1, s_file2, "00000000", NULL, NULL, NULL},
176  {__LINE__, SHCNE_DELETE, s_file2, NULL, "00000000", DoAction6, NULL, NULL},
177  {__LINE__, SHCNE_DELETE, s_file2, NULL, "00000000", NULL, NULL, NULL},
178  {__LINE__, SHCNE_DELETE, s_file1, NULL, "00000000", NULL, NULL, NULL},
179  {__LINE__, SHCNE_INTERRUPT | SHCNE_RMDIR, s_dir1, NULL, "00000000", NULL, NULL, NULL},
180  {__LINE__, SHCNE_INTERRUPT | SHCNE_RMDIR, s_dir2, NULL, "00000000", NULL, NULL, NULL},
181  {__LINE__, SHCNE_INTERRUPT | SHCNE_RMDIR, s_dir3, NULL, "00000000", NULL, NULL, NULL},
182  {__LINE__, SHCNE_INTERRUPT | SHCNE_RMDIR, s_dir1, s_dir2, "00000000", NULL, NULL, NULL},
183  {__LINE__, SHCNE_INTERRUPT | SHCNE_RMDIR, s_dir1, s_dir3, "00000000", NULL, NULL, NULL},
184  {__LINE__, SHCNE_INTERRUPT | SHCNE_RMDIR, s_dir2, s_dir1, "00000000", NULL, NULL, NULL},
185  {__LINE__, SHCNE_INTERRUPT | SHCNE_RMDIR, s_dir2, s_dir3, "00000000", NULL, NULL, NULL},
186  {__LINE__, SHCNE_INTERRUPT | SHCNE_RMDIR, s_dir3, NULL, "00000000", NULL, NULL, NULL},
187  {__LINE__, SHCNE_INTERRUPT | SHCNE_RMDIR, s_dir3, NULL, "00000000", DoAction7, NULL, NULL},
188  {__LINE__, SHCNE_INTERRUPT | SHCNE_RMDIR, s_dir1, NULL, "00000000", NULL, NULL, NULL},
189  {__LINE__, SHCNE_INTERRUPT | SHCNE_RMDIR, s_dir1, NULL, "00000000", DoAction8, NULL, NULL},
190 };
191 
193 {
194  static char s_buf[TYPE_RENAMEFOLDER + 1 + 1];
195  DWORD i;
196  for (i = 0; i <= TYPE_RENAMEFOLDER; ++i)
197  {
198  s_buf[i] = (char)('0' + !!(flags & (1 << i)));
199  }
200  s_buf[i] = 0;
201  return s_buf;
202 }
203 
204 static BOOL
205 DoGetPaths(LPWSTR pszPath1, LPWSTR pszPath2)
206 {
207  pszPath1[0] = pszPath2[0] = 0;
208 
209  WCHAR szText[MAX_PATH * 2];
210  szText[0] = 0;
211  if (FILE *fp = fopen(TEMP_FILE, "rb"))
212  {
213  fread(szText, 1, sizeof(szText), fp);
214  fclose(fp);
215  }
216 
217  LPWSTR pch = wcschr(szText, L'|');
218  if (pch == NULL)
219  return FALSE;
220 
221  *pch = 0;
222  lstrcpynW(pszPath1, szText, MAX_PATH);
223  lstrcpynW(pszPath2, pch + 1, MAX_PATH);
224  return TRUE;
225 }
226 
227 static void
229 {
230  if (entry->action)
231  {
232  (*entry->action)();
233  }
234 
235  if (entry->event != DONT_SEND)
236  {
237  SHChangeNotify(entry->event, SHCNF_PATHW | SHCNF_FLUSH, entry->item1, entry->item2);
238  }
239  else
240  {
242  }
243 
246 
247  if (entry->pattern)
248  {
249  ok(lstrcmpA(pattern, entry->pattern) == 0 ||
250  lstrcmpA(pattern, "00000100") == 0, // SHCNE_UPDATEDIR
251  "Line %d: pattern mismatch '%s'\n", entry->line, pattern);
252  }
253 
255  Sleep(50);
256 
257  WCHAR szPath1[MAX_PATH], szPath2[MAX_PATH];
258  szPath1[0] = szPath2[0] = 0;
259  BOOL bOK = DoGetPaths(szPath1, szPath2);
260 
261  if (lstrcmpA(pattern, "00000100") == 0) // SHCNE_UPDATEDIR
262  {
263  if (entry->path1)
264  ok(bOK && lstrcmpiW(s_dir1, szPath1) == 0,
265  "Line %d: path1 mismatch '%S' (%d)\n", entry->line, szPath1, bOK);
266  if (entry->path2)
267  ok(bOK && lstrcmpiW(L"", szPath2) == 0,
268  "Line %d: path2 mismatch '%S' (%d)\n", entry->line, szPath2, bOK);
269  }
270  else
271  {
272  if (entry->path1)
273  ok(bOK && lstrcmpiW(entry->path1, szPath1) == 0,
274  "Line %d: path1 mismatch '%S' (%d)\n", entry->line, szPath1, bOK);
275  if (entry->path2)
276  ok(bOK && lstrcmpiW(entry->path2, szPath2) == 0,
277  "Line %d: path2 mismatch '%S' (%d)\n", entry->line, szPath2, bOK);
278  }
279 
281 }
282 
283 static BOOL
284 DoInit(void)
285 {
286  DoInitPaths();
287 
289 
290  // close Explorer before tests
291  INT i, nCount = 50;
292  for (i = 0; i < nCount; ++i)
293  {
294  HWND hwnd = FindWindowW(L"CabinetWClass", NULL);
295  if (hwnd == NULL)
296  break;
297 
298  PostMessage(hwnd, WM_CLOSE, 0, 0);
299  Sleep(100);
300  }
301  if (i == nCount)
302  skip("Unable to close Explorer cabinet\n");
303 
304  return PathIsDirectoryW(s_dir1);
305 }
306 
307 static void
309 {
316 
318 }
319 
320 static BOOL
322 {
325  PathAppendW(s_szSubProgram, L"shell-notify.exe");
326 
328  {
330  PathAppendW(s_szSubProgram, L"testdata\\shell-notify.exe");
331 
333  {
334  return FALSE;
335  }
336  }
337 
338  return TRUE;
339 }
340 
341 static void
342 JustDoIt(INT nMode)
343 {
344  trace("nMode: %d\n", nMode);
346 
347  if (!DoInit())
348  {
349  skip("Unable to initialize.\n");
350  return;
351  }
352 
353  WCHAR szParams[8];
354  wsprintfW(szParams, L"%u", nMode);
355 
357  if ((INT_PTR)hinst <= 32)
358  {
359  skip("Unable to run shell-notify.exe.\n");
360  return;
361  }
362 
363  for (int i = 0; i < 15; ++i)
364  {
366  if (s_hwnd)
367  break;
368 
369  Sleep(50);
370  }
371 
372  if (!s_hwnd)
373  {
374  skip("Unable to find window.\n");
375  return;
376  }
377 
378  switch (nMode)
379  {
380  case 0:
381  case 1:
382  case 2:
383  for (size_t i = 0; i < _countof(s_TestEntriesMode0); ++i)
384  {
386  }
387  break;
388  case 3:
389  for (size_t i = 0; i < _countof(s_TestEntriesMode3); ++i)
390  {
392  }
393  break;
394  case 4:
395  for (size_t i = 0; i < _countof(s_TestEntriesMode4); ++i)
396  {
398  }
399  break;
400  case 5:
401  for (size_t i = 0; i < _countof(s_TestEntriesMode5); ++i)
402  {
404  }
405  break;
406  }
407 
408  DoEnd(s_hwnd);
409 
410  for (int i = 0; i < 15; ++i)
411  {
413  if (!s_hwnd)
414  break;
415 
416  Sleep(50);
417  }
418 }
419 
421 {
422  if (!GetSubProgramPath())
423  {
424  skip("shell-notify.exe not found\n");
425  }
426 
427  JustDoIt(0);
428  JustDoIt(1);
429  JustDoIt(2);
430  JustDoIt(3);
431  JustDoIt(4);
432  JustDoIt(5);
433 }
int WINAPIV wsprintfW(_Out_ LPWSTR, _In_ _Printf_format_string_ LPCWSTR,...)
#define SHCNE_MKDIR
Definition: shlobj.h:1732
static WCHAR s_file1[MAX_PATH]
BOOL WINAPI CreateDirectoryW(IN LPCWSTR lpPathName, IN LPSECURITY_ATTRIBUTES lpSecurityAttributes)
Definition: dir.c:90
static BOOL DoCreateEmptyFile(LPCWSTR pszFileName)
BOOL WINAPI PathIsDirectoryW(LPCWSTR lpszPath)
Definition: path.c:1702
DWORD WINAPI GetModuleFileNameW(HINSTANCE hModule, LPWSTR lpFilename, DWORD nSize)
Definition: loader.c:600
const DOCKBAR PVOID HWND HWND * hwnd
Definition: tooldock.h:22
BOOL WINAPI PathRemoveFileSpecW(LPWSTR lpszPath)
Definition: path.c:624
LPCSTR pattern
#define SHCNE_RMDIR
Definition: shlobj.h:1733
#define IDOK
Definition: winuser.h:824
VOID WINAPI DECLSPEC_HOTPATCH Sleep(IN DWORD dwMilliseconds)
Definition: synch.c:790
struct png_info_def **typedef void(__cdecl typeof(png_destroy_read_struct))(struct png_struct_def **
Definition: typeof.h:49
static WCHAR s_dir3[MAX_PATH]
static WCHAR s_szSubProgram[MAX_PATH]
DWORD event
const WCHAR * LPCWSTR
Definition: xmlstorage.h:185
#define MOVEFILE_REPLACE_EXISTING
Definition: filesup.h:28
_Check_return_ _CRTIMP FILE *__cdecl _wfopen(_In_z_ const wchar_t *_Filename, _In_z_ const wchar_t *_Mode)
void DoInitPaths(void)
static const TEST_ENTRY s_TestEntriesMode4[]
#define TRUE
Definition: types.h:120
#define MOVEFILE_COPY_ALLOWED
Definition: filesup.h:29
#define SHCNE_RENAMEFOLDER
Definition: shlobj.h:1746
#define SHCNE_INTERRUPT
Definition: shlobj.h:1754
static WCHAR s_dir2[MAX_PATH]
static const TEST_ENTRY s_TestEntriesMode0[]
int WINAPI lstrcmpA(LPCSTR lpString1, LPCSTR lpString2)
Definition: lstring.c:18
DWORD WINAPI GetLastError(VOID)
Definition: except.c:1044
static BOOL DoGetPaths(LPWSTR pszPath1, LPWSTR pszPath2)
START_TEST(SHChangeNotify)
static BOOL GetSubProgramPath(void)
int32_t INT_PTR
Definition: typedefs.h:64
#define SHCNE_RENAMEITEM
Definition: shlobj.h:1729
static WCHAR s_dir1[MAX_PATH]
int32_t INT
Definition: typedefs.h:58
#define pch(ap)
Definition: match.c:418
#define lstrcpynW
Definition: compat.h:486
BOOL WINAPI PathAppendW(LPWSTR lpszPath, LPCWSTR lpszAppend)
Definition: path.c:121
int WINAPI lstrcmpiW(LPCWSTR lpString1, LPCWSTR lpString2)
Definition: lstring.c:194
static BOOL DoInit(void)
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
_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
static const WCHAR szText[]
Definition: dialog.c:139
unsigned int BOOL
Definition: ntddk_ex.h:94
#define WM_CLEAR_FLAGS
WORD WORD PSZ PSZ pszFileName
Definition: vdmdbg.h:41
BOOL WINAPI DeleteFileW(IN LPCWSTR lpFileName)
Definition: delete.c:39
LPCSTR PatternFromFlags(DWORD flags)
smooth NULL
Definition: ftsmooth.c:416
struct TEST_ENTRY TEST_ENTRY
unsigned char
Definition: typeof.h:29
#define ok_int(expression, result)
Definition: atltest.h:134
BOOL WINAPI DeleteFileA(IN LPCSTR lpFileName)
Definition: delete.c:24
BOOL WINAPI PathFileExistsW(LPCWSTR lpszPath)
Definition: path.c:1756
static void DoAction4(void)
#define WM_SET_PATHS
const char * LPCSTR
Definition: xmlstorage.h:183
static void DoEnd(HWND hwnd)
BOOL WINAPI RemoveDirectoryW(IN LPCWSTR lpPathName)
Definition: dir.c:732
static const TEST_ENTRY s_TestEntriesMode3[]
#define PostMessage
Definition: winuser.h:5807
static void DoAction2(void)
LPCVOID item1
#define trace
Definition: atltest.h:70
_CONST_RETURN wchar_t *__cdecl wcschr(_In_z_ const wchar_t *_Str, wchar_t _Ch)
__wchar_t WCHAR
Definition: xmlstorage.h:180
HWND WINAPI FindWindowW(_In_opt_ LPCWSTR, _In_opt_ LPCWSTR)
#define _countof(array)
Definition: sndvol32.h:68
#define WM_CLOSE
Definition: winuser.h:1603
#define MAX_PATH
Definition: compat.h:34
INT line
Definition: cmd.c:14
#define DONT_SEND
unsigned long DWORD
Definition: ntddk_ex.h:95
#define WM_GET_NOTIFY_FLAGS
GLbitfield flags
Definition: glext.h:7161
static const WCHAR s_szName[]
LPCWSTR path2
static void DoAction6(void)
int ret
EXTERN_C void WINAPI SHChangeNotify(LONG wEventId, UINT uFlags, LPCVOID dwItem1, LPCVOID dwItem2)
Definition: cmd.c:12
static const WCHAR L[]
Definition: oid.c:1250
#define SHCNF_FLUSH
Definition: shlobj.h:1767
static void DoAction1(void)
uint32_t entry
Definition: isohybrid.c:63
static void DoAction7(void)
_Check_return_opt_ _CRTIMP int __cdecl fclose(_Inout_ FILE *_File)
_Check_return_ _CRTIMP FILE *__cdecl fopen(_In_z_ const char *_Filename, _In_z_ const char *_Mode)
#define WM_COMMAND
Definition: winuser.h:1722
static void DoTestEntry(const TEST_ENTRY *entry)
LPCVOID item2
static void DoAction3(void)
static WCHAR s_file2[MAX_PATH]
#define SHCNF_PATHW
Definition: shlobj.h:1764
#define SW_SHOWNORMAL
Definition: winuser.h:764
#define TEMP_FILE
Definition: SHChangeNotify.h:3
#define SHCNE_DELETE
Definition: shlobj.h:1731
LRESULT WINAPI SendMessageW(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
#define ok(value,...)
Definition: atltest.h:57
LPCWSTR path1
static HWND s_hwnd
static const TEST_ENTRY s_TestEntriesMode5[]
#define skip(...)
Definition: atltest.h:64
CONST void * LPCVOID
Definition: windef.h:191
static void DoAction5(void)
HINSTANCE WINAPI ShellExecuteW(HWND hwnd, LPCWSTR lpVerb, LPCWSTR lpFile, LPCWSTR lpParameters, LPCWSTR lpDirectory, INT nShowCmd)
Definition: shlexec.cpp:2274
static HINSTANCE hinst
Definition: edit.c:551
BOOL WINAPI MoveFileExW(IN LPCWSTR lpExistingFileName, IN LPCWSTR lpNewFileName OPTIONAL, IN DWORD dwFlags)
Definition: move.c:1060
static void DoAction8(void)
#define SHCNE_CREATE
Definition: shlobj.h:1730
#define SHCNE_UPDATEITEM
Definition: shlobj.h:1742
WCHAR * LPWSTR
Definition: xmlstorage.h:184
static void JustDoIt(INT nMode)
ACTION action
GLubyte * pattern
Definition: glext.h:7787