17#define MAX_EVENT_TYPE 6
58#define FILE_1 L"_TESTFILE_1_.txt"
59#define FILE_2 L"_TESTFILE_2_.txt"
60#define DIR_1 L"_TESTDIR_1_"
61#define DIR_2 L"_TESTDIR_2_"
120#define TRACE_PATH(path) trace(#path ": %ls\n", path)
141 szPath1[0] = szPath2[0] = 0;
145 trace(
"(0x%lX, '%ls', '%ls')\n",
lEvent, szPath1, szPath2);
149 trace(
"Got SHCNE_UPDATEDIR\n");
189 assert((
pch - s_sz) + 1 ==
sizeof(s_sz));
227 { __LINE__,
"000000010000010000000000" },
228 { __LINE__,
"000000040000000000000400" },
229 { __LINE__,
"000000000200020000000000" },
230 { __LINE__,
"000000000000080000000000" },
231 { __LINE__,
"000000000001010000000000" },
232 { __LINE__,
"000000000002020000000000" },
233 { __LINE__,
"000000000000000020000000" },
234 { __LINE__,
"000010000000100000000000" },
237 lineno = c_answers[iStep].
lineno;
238 answer = c_answers[iStep].
answer;
248 { __LINE__,
"000000000000000000000000" },
249 { __LINE__,
"000000000000000000000000" },
250 { __LINE__,
"000000000000000000000000" },
251 { __LINE__,
"000000000000000000000000" },
252 { __LINE__,
"000000000000000000000000" },
253 { __LINE__,
"000000000000000000000000" },
254 { __LINE__,
"000000000000000000000000" },
255 { __LINE__,
"000000000000000000000000" },
258 lineno = c_answers[iStep].
lineno;
259 answer = c_answers[iStep].
answer;
266 { __LINE__,
"000000010000010000000000" },
267 { __LINE__,
"000000040000000000000400" },
268 { __LINE__,
"000000000200020000000000" },
269 { __LINE__,
"000000000000080000000000" },
270 { __LINE__,
"000000000001010000000000" },
271 { __LINE__,
"000000000002020000000000" },
272 { __LINE__,
"000000000000000020000000" },
273 { __LINE__,
"000010000000100000000000" },
276 lineno = c_answers[iStep].
lineno;
277 answer = c_answers[iStep].
answer;
278 if (iStep == 4 || iStep == 5)
280 if (
lstrcmpA(checks,
"000000000000000000000000") == 0)
282 trace(
"Warning! Recursive cases...\n");
283 answer =
"000000000000000000000000";
296 "Line %d: '%s' vs '%s' at Stage %d, Step %d\n", lineno, checks, answer, iStage, iStep);
409 if (pCopyData->
dwData != 0xBEEFCAFE)
422 pb +=
sizeof(cbPidl1);
425 pb +=
sizeof(cbPidl2);
472 skip(
"!s_hThread\n");
485 skip(
"!s_hThread\n");
520 skip(
"shell32_apitest_sub.exe not found\n");
531 skip(
"Unable to run shell32_apitest_sub.exe.\n");
547 skip(
"RegisterClassW failed\n");
557 skip(
"CreateWindowW failed\n");
567 skip(
"Unable to find sub-program window.\n");
581 skip(
"Unable to start testing.\n");
599 trace(
"Please close all Explorer windows before testing.\n");
600 trace(
"Please don't operate your PC while testing.\n");
606 DWORD dwTick = dwNewTick - dwOldTick;
607 trace(
"SHChangeNotify: Total %lu.%lu sec\n", (dwTick / 1000), (dwTick / 100 % 10));
static DWORD WINAPI StageThreadFunc(LPVOID arg)
static void TEST_Quit(void)
static WCHAR s_szDir1InDir1[MAX_PATH]
static WCHAR s_szFile1InDir1InDir1[MAX_PATH]
static void TEST_Main(void)
static BOOL TEST_Init(void)
static BOOL OnCopyData(HWND hwnd, HWND hwndSender, COPYDATASTRUCT *pCopyData)
static INT GetEventType(LONG lEvent)
static BOOL s_bGotUpdateDir
static void DoDeleteFilesAndDirs(void)
static BYTE s_abChecks[NUM_CHECKS]
static WCHAR s_szSubProgram[MAX_PATH]
static void DoDeleteDirectory(LPCWSTR pszDir)
static void DoStepCheck(INT iStage, INT iStep, LPCSTR checks)
static LRESULT CALLBACK MainWndProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
static void DoTestEntry(LONG lEvent, LPCITEMIDLIST pidl1, LPCITEMIDLIST pidl2)
static LPCSTR StringFromChecks(void)
static WCHAR s_szDir2InDir1[MAX_PATH]
static WCHAR s_szDir1[MAX_PATH]
static void DoBuildFilesAndDirs(void)
static WCHAR s_szFile1InDir1[MAX_PATH]
static BOOL DoCreateFile(LPCWSTR pszFileName)
static WCHAR s_szFile2InDir1[MAX_PATH]
#define ok_int(expression, result)
EXTERN_C void WINAPI SHChangeNotify(LONG wEventId, UINT uFlags, LPCVOID dwItem1, LPCVOID dwItem2)
#define INVALID_HANDLE_VALUE
#define FILE_ATTRIBUTE_NORMAL
BOOL WINAPI DeleteFileW(IN LPCWSTR lpFileName)
BOOL WINAPI CreateDirectoryExW(IN LPCWSTR lpTemplateDirectory, IN LPCWSTR lpNewDirectory, IN LPSECURITY_ATTRIBUTES lpSecurityAttributes)
BOOL WINAPI CreateDirectoryW(IN LPCWSTR lpPathName, IN LPSECURITY_ATTRIBUTES lpSecurityAttributes)
BOOL WINAPI RemoveDirectoryW(IN LPCWSTR lpPathName)
BOOL WINAPI MoveFileW(IN LPCWSTR lpExistingFileName, IN LPCWSTR lpNewFileName)
HMODULE WINAPI GetModuleHandleW(LPCWSTR lpModuleName)
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)
DWORD WINAPI GetTickCount(VOID)
int WINAPI lstrcmpA(LPCSTR str1, LPCSTR str2)
int WINAPI lstrcmpiW(LPCWSTR str1, LPCWSTR str2)
BOOL WINAPI SHGetSpecialFolderPathW(HWND hwndOwner, LPWSTR szPath, int nFolder, BOOL bCreate)
BOOL WINAPI PathRemoveFileSpecW(LPWSTR lpszPath)
BOOL WINAPI PathIsDirectoryW(LPCWSTR lpszPath)
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
VOID WINAPI CoTaskMemFree(LPVOID ptr)
LPVOID WINAPI CoTaskMemAlloc(SIZE_T size)
#define WS_OVERLAPPEDWINDOW
BOOL WINAPI SHGetPathFromIDListW(LPCITEMIDLIST pidl, LPWSTR pszPath)
static HWND DoWaitForWindow(LPCWSTR clsname, LPCWSTR text, BOOL bClosing, BOOL bForce)
static BOOL FindSubProgram(LPWSTR pszSubProgram, DWORD cchSubProgram)
#define FOF_NOCONFIRMATION
HINSTANCE WINAPI ShellExecuteW(HWND hwnd, LPCWSTR lpVerb, LPCWSTR lpFile, LPCWSTR lpParameters, LPCWSTR lpDirectory, INT nShowCmd)
#define SHCNE_RENAMEFOLDER
ITEMIDLIST UNALIGNED * LPITEMIDLIST
const ITEMIDLIST UNALIGNED * LPCITEMIDLIST
STRSAFEAPI StringCchPrintfW(STRSAFE_LPWSTR pszDest, size_t cchDest, STRSAFE_LPCWSTR pszFormat,...)
STRSAFEAPI StringCchCopyW(STRSAFE_LPWSTR pszDest, size_t cchDest, STRSAFE_LPCWSTR pszSrc)
VOID WINAPI DECLSPEC_HOTPATCH Sleep(IN DWORD dwMilliseconds)
TW_UINT32 TW_UINT16 TW_UINT16 MSG
WORD WORD PSZ PSZ pszFileName
_In_ HCRYPTHASH _In_ BOOL _In_ DWORD _Inout_updates_bytes_to_ pdwDataLen BYTE * pbData
BOOL WINAPI TranslateMessage(_In_ const MSG *)
BOOL WINAPI ShowWindow(_In_ HWND, _In_ int)
BOOL WINAPI GetMessageW(_Out_ LPMSG, _In_opt_ HWND, _In_ UINT, _In_ UINT)
BOOL WINAPI PostMessageW(_In_opt_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
__analysis_noreturn void WINAPI PostQuitMessage(_In_ int)
ATOM WINAPI RegisterClassW(_In_ CONST WNDCLASSW *)
HCURSOR WINAPI LoadCursorW(_In_opt_ HINSTANCE, _In_ LPCWSTR)
BOOL WINAPI UpdateWindow(_In_ HWND)
#define CreateWindowW(a, b, c, d, e, f, g, h, i, j, k)
BOOL WINAPI DestroyWindow(_In_ HWND)
HICON WINAPI LoadIconW(_In_opt_ HINSTANCE hInstance, _In_ LPCWSTR lpIconName)
LRESULT WINAPI SendMessageW(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)