ReactOS  0.4.15-dev-4934-gfd1e799
shell32_apitest_sub.cpp File Reference
#include "shelltest.h"
#include "shell32_apitest_sub.h"
Include dependency graph for shell32_apitest_sub.cpp:

Go to the source code of this file.

Functions

static BOOL OnCreate (HWND hwnd)
 
static void OnCommand (HWND hwnd, UINT id)
 
static void OnDestroy (HWND hwnd)
 
static BOOL DoPathes (PIDLIST_ABSOLUTE pidl1, PIDLIST_ABSOLUTE pidl2)
 
static VOID DoPathesAndFlags (UINT type, PIDLIST_ABSOLUTE pidl1, PIDLIST_ABSOLUTE pidl2)
 
static void DoShellNotify (HWND hwnd, PIDLIST_ABSOLUTE pidl1, PIDLIST_ABSOLUTE pidl2, LONG lEvent)
 
static INT_PTR OnShellNotify (HWND hwnd, WPARAM wParam, LPARAM lParam)
 
static LRESULT OnGetNotifyFlags (HWND hwnd)
 
static void DoSetPaths (HWND hwnd)
 
static LRESULT CALLBACK WindowProc (HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
 
static BOOL ParseCommandLine (LPWSTR lpCmdLine)
 
INT APIENTRY wWinMain (HINSTANCE hInstance, HINSTANCE hPrevInstance, LPWSTR lpCmdLine, INT nCmdShow)
 

Variables

static HWND s_hwnd = NULL
 
static UINT s_uRegID = 0
 
static BOOL s_fRecursive = FALSE
 
static DIRTYPE s_iWatchDir = DIRTYPE_NULL
 
static INT s_nSources = 0
 
static LPITEMIDLIST s_pidl = NULL
 
static WCHAR s_path1 [MAX_PATH]
 
static WCHAR s_path2 [MAX_PATH]
 
static BYTE s_counters [TYPE_MAX+1]
 
static HANDLE s_hEvent = NULL
 

Function Documentation

◆ DoPathes()

static BOOL DoPathes ( PIDLIST_ABSOLUTE  pidl1,
PIDLIST_ABSOLUTE  pidl2 
)
static

Definition at line 59 of file shell32_apitest_sub.cpp.

60 {
62  if (!SHGetPathFromIDListW(pidl1, path))
63  {
64  s_path1[0] = s_path2[0] = 0;
65  return FALSE;
66  }
67 
68  if (wcsstr(path, L"Recent") != NULL)
69  return FALSE;
70 
72 
73  if (!SHGetPathFromIDListW(pidl2, s_path2))
74  s_path2[0] = 0;
75 
76  return TRUE;
77 }
#define TRUE
Definition: types.h:120
_CONST_RETURN wchar_t *__cdecl wcsstr(_In_z_ const wchar_t *_Str, _In_z_ const wchar_t *_SubStr)
BOOL WINAPI SHGetPathFromIDListW(LPCITEMIDLIST pidl, LPWSTR pszPath)
Definition: pidl.c:1294
#define L(x)
Definition: ntvdm.h:50
#define FALSE
Definition: types.h:117
STRSAFEAPI StringCchCopyW(STRSAFE_LPWSTR pszDest, size_t cchDest, STRSAFE_LPCWSTR pszSrc)
Definition: strsafe.h:149
static WCHAR s_path1[MAX_PATH]
__wchar_t WCHAR
Definition: xmlstorage.h:180
#define _countof(array)
Definition: sndvol32.h:68
#define MAX_PATH
Definition: compat.h:34
static WCHAR s_path2[MAX_PATH]
#define NULL
Definition: types.h:112

Referenced by DoPathesAndFlags().

◆ DoPathesAndFlags()

static VOID DoPathesAndFlags ( UINT  type,
PIDLIST_ABSOLUTE  pidl1,
PIDLIST_ABSOLUTE  pidl2 
)
static

Definition at line 79 of file shell32_apitest_sub.cpp.

80 {
81  if (DoPathes(pidl1, pidl2))
82  {
83  s_counters[type] = 1;
85  }
86 }
BOOL WINAPI DECLSPEC_HOTPATCH SetEvent(IN HANDLE hEvent)
Definition: synch.c:733
static BOOL DoPathes(PIDLIST_ABSOLUTE pidl1, PIDLIST_ABSOLUTE pidl2)
static BYTE s_counters[TYPE_MAX+1]
GLuint GLuint GLsizei GLenum type
Definition: gl.h:1545
static HANDLE s_hEvent

Referenced by DoShellNotify().

◆ DoSetPaths()

static void DoSetPaths ( HWND  hwnd)
static

Definition at line 182 of file shell32_apitest_sub.cpp.

183 {
184  WCHAR szText[MAX_PATH * 2];
185  StringCchCopyW(szText, _countof(szText), s_path1);
186  StringCchCatW(szText, _countof(szText), L"|");
187  StringCchCatW(szText, _countof(szText), s_path2);
188 
189  FILE *fp = _wfopen(TEMP_FILE, L"wb");
190  if (fp)
191  {
192  fwrite(szText, (wcslen(szText) + 1) * sizeof(WCHAR), 1, fp);
193  fflush(fp);
194  fclose(fp);
195  }
196 }
_Check_return_ _CRTIMP FILE *__cdecl _wfopen(_In_z_ const wchar_t *_Filename, _In_z_ const wchar_t *_Mode)
_Check_return_opt_ _CRTIMP size_t __cdecl fwrite(_In_reads_bytes_(_Size *_Count) const void *_Str, _In_ size_t _Size, _In_ size_t _Count, _Inout_ FILE *_File)
STRSAFEAPI StringCchCatW(STRSAFE_LPWSTR pszDest, size_t cchDest, STRSAFE_LPCWSTR pszSrc)
Definition: strsafe.h:325
#define L(x)
Definition: ntvdm.h:50
STRSAFEAPI StringCchCopyW(STRSAFE_LPWSTR pszDest, size_t cchDest, STRSAFE_LPCWSTR pszSrc)
Definition: strsafe.h:149
static WCHAR s_path1[MAX_PATH]
__wchar_t WCHAR
Definition: xmlstorage.h:180
#define _countof(array)
Definition: sndvol32.h:68
#define MAX_PATH
Definition: compat.h:34
static WCHAR s_path2[MAX_PATH]
_Check_return_opt_ _CRTIMP int __cdecl fclose(_Inout_ FILE *_File)
_Check_return_opt_ _CRTIMP int __cdecl fflush(_Inout_opt_ FILE *_File)
#define TEMP_FILE
_CRTIMP size_t __cdecl wcslen(_In_z_ const wchar_t *_Str)

Referenced by WindowProc().

◆ DoShellNotify()

static void DoShellNotify ( HWND  hwnd,
PIDLIST_ABSOLUTE  pidl1,
PIDLIST_ABSOLUTE  pidl2,
LONG  lEvent 
)
static

Definition at line 89 of file shell32_apitest_sub.cpp.

90 {
91  switch (lEvent)
92  {
93  case SHCNE_RENAMEITEM:
94  DoPathesAndFlags(TYPE_RENAMEITEM, pidl1, pidl2);
95  break;
96  case SHCNE_CREATE:
97  DoPathesAndFlags(TYPE_CREATE, pidl1, pidl2);
98  break;
99  case SHCNE_DELETE:
100  DoPathesAndFlags(TYPE_DELETE, pidl1, pidl2);
101  break;
102  case SHCNE_MKDIR:
103  DoPathesAndFlags(TYPE_MKDIR, pidl1, pidl2);
104  break;
105  case SHCNE_RMDIR:
106  DoPathesAndFlags(TYPE_RMDIR, pidl1, pidl2);
107  break;
108  case SHCNE_MEDIAINSERTED:
109  break;
110  case SHCNE_MEDIAREMOVED:
111  break;
112  case SHCNE_DRIVEREMOVED:
113  break;
114  case SHCNE_DRIVEADD:
115  break;
116  case SHCNE_NETSHARE:
117  break;
118  case SHCNE_NETUNSHARE:
119  break;
120  case SHCNE_ATTRIBUTES:
121  break;
122  case SHCNE_UPDATEDIR:
123  DoPathesAndFlags(TYPE_UPDATEDIR, pidl1, pidl2);
124  break;
125  case SHCNE_UPDATEITEM:
126  break;
128  break;
129  case SHCNE_UPDATEIMAGE:
130  break;
131  case SHCNE_DRIVEADDGUI:
132  break;
133  case SHCNE_RENAMEFOLDER:
134  DoPathesAndFlags(TYPE_RENAMEFOLDER, pidl1, pidl2);
135  break;
136  case SHCNE_FREESPACE:
137  break;
139  break;
140  case SHCNE_ASSOCCHANGED:
141  break;
142  default:
143  break;
144  }
145 }
#define SHCNE_MKDIR
Definition: shlobj.h:1732
#define SHCNE_ATTRIBUTES
Definition: shlobj.h:1740
#define SHCNE_RMDIR
Definition: shlobj.h:1733
#define SHCNE_UPDATEIMAGE
Definition: shlobj.h:1744
#define SHCNE_NETUNSHARE
Definition: shlobj.h:1739
#define SHCNE_RENAMEFOLDER
Definition: shlobj.h:1746
#define SHCNE_RENAMEITEM
Definition: shlobj.h:1729
static VOID DoPathesAndFlags(UINT type, PIDLIST_ABSOLUTE pidl1, PIDLIST_ABSOLUTE pidl2)
#define SHCNE_MEDIAREMOVED
Definition: shlobj.h:1735
#define SHCNE_EXTENDED_EVENT
Definition: shlobj.h:1749
HANDLE lEvent
Definition: tftpd.cpp:56
#define SHCNE_FREESPACE
Definition: shlobj.h:1747
#define SHCNE_DELETE
Definition: shlobj.h:1731
#define SHCNE_UPDATEDIR
Definition: shlobj.h:1741
#define SHCNE_NETSHARE
Definition: shlobj.h:1738
#define SHCNE_MEDIAINSERTED
Definition: shlobj.h:1734
#define SHCNE_DRIVEADD
Definition: shlobj.h:1737
#define SHCNE_SERVERDISCONNECT
Definition: shlobj.h:1743
#define SHCNE_CREATE
Definition: shlobj.h:1730
#define SHCNE_UPDATEITEM
Definition: shlobj.h:1742
#define SHCNE_DRIVEADDGUI
Definition: shlobj.h:1745
#define SHCNE_DRIVEREMOVED
Definition: shlobj.h:1736
#define SHCNE_ASSOCCHANGED
Definition: shlobj.h:1750

Referenced by OnShellNotify().

◆ OnCommand()

static void OnCommand ( HWND  hwnd,
UINT  id 
)
static

Definition at line 35 of file shell32_apitest_sub.cpp.

36 {
37  switch (id)
38  {
39  case IDOK:
40  case IDCANCEL:
42  break;
43  }
44 }
#define IDOK
Definition: winuser.h:824
BOOL WINAPI DestroyWindow(_In_ HWND)
#define IDCANCEL
Definition: winuser.h:825
_In_ LONG _In_ HWND hwnd
Definition: winddi.h:4022

Referenced by WindowProc().

◆ OnCreate()

static BOOL OnCreate ( HWND  hwnd)
static

Definition at line 22 of file shell32_apitest_sub.cpp.

23 {
24  s_hwnd = hwnd;
26 
28  entry.pidl = s_pidl;
29  entry.fRecursive = s_fRecursive;
31  return s_uRegID != 0;
32 }
static BOOL s_fRecursive
static INT s_nSources
#define SHCNE_ALLEVENTS
Definition: shlobj.h:1753
static LPITEMIDLIST s_pidl
static DIRTYPE s_iWatchDir
uint32_t entry
Definition: isohybrid.c:63
LPITEMIDLIST DoGetPidl(DIRTYPE iDir)
#define WM_SHELL_NOTIFY
static UINT s_uRegID
EXTERN_C ULONG WINAPI SHChangeNotifyRegister(HWND hwnd, INT fSources, LONG wEventMask, UINT uMsg, INT cItems, SHChangeNotifyEntry *lpItems)
static HWND s_hwnd
_In_ LONG _In_ HWND hwnd
Definition: winddi.h:4022

Referenced by WindowProc().

◆ OnDestroy()

static void OnDestroy ( HWND  hwnd)
static

Definition at line 47 of file shell32_apitest_sub.cpp.

48 {
50  s_uRegID = 0;
51 
53  s_pidl = NULL;
54 
55  PostQuitMessage(0);
56  s_hwnd = NULL;
57 }
VOID WINAPI CoTaskMemFree(LPVOID ptr)
Definition: ifs.c:442
static LPITEMIDLIST s_pidl
EXTERN_C BOOL WINAPI SHChangeNotifyDeregister(ULONG hNotify)
#define NULL
Definition: types.h:112
static UINT s_uRegID
static HWND s_hwnd
__analysis_noreturn void WINAPI PostQuitMessage(_In_ int)

Referenced by WindowProc().

◆ OnGetNotifyFlags()

static LRESULT OnGetNotifyFlags ( HWND  hwnd)
static

Definition at line 167 of file shell32_apitest_sub.cpp.

168 {
169  if (s_uRegID == 0)
170  return 0xFFFFFFFF;
171 
172  DWORD dwFlags = 0;
173  for (size_t i = 0; i < _countof(s_counters); ++i)
174  {
175  if (s_counters[i])
176  dwFlags |= (1 << i);
177  }
178  return dwFlags;
179 }
#define _countof(array)
Definition: sndvol32.h:68
unsigned long DWORD
Definition: ntddk_ex.h:95
_In_ PCCERT_CONTEXT _In_ DWORD dwFlags
Definition: wincrypt.h:1175
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
static BYTE s_counters[TYPE_MAX+1]
static UINT s_uRegID

Referenced by WindowProc().

◆ OnShellNotify()

static INT_PTR OnShellNotify ( HWND  hwnd,
WPARAM  wParam,
LPARAM  lParam 
)
static

Definition at line 148 of file shell32_apitest_sub.cpp.

149 {
150  LONG lEvent;
151  PIDLIST_ABSOLUTE *pidlAbsolute;
152  HANDLE hLock = SHChangeNotification_Lock((HANDLE)wParam, (DWORD)lParam, &pidlAbsolute, &lEvent);
153  if (hLock)
154  {
155  DoShellNotify(hwnd, pidlAbsolute[0], pidlAbsolute[1], lEvent);
157  }
158  else
159  {
160  pidlAbsolute = (PIDLIST_ABSOLUTE *)wParam;
161  DoShellNotify(hwnd, pidlAbsolute[0], pidlAbsolute[1], lParam);
162  }
163  return TRUE;
164 }
EXTERN_C BOOL WINAPI SHChangeNotification_Unlock(HANDLE hLock)
#define TRUE
Definition: types.h:120
WPARAM wParam
Definition: combotst.c:138
long LONG
Definition: pedump.c:60
static void DoShellNotify(HWND hwnd, PIDLIST_ABSOLUTE pidl1, PIDLIST_ABSOLUTE pidl2, LONG lEvent)
unsigned long DWORD
Definition: ntddk_ex.h:95
HANDLE lEvent
Definition: tftpd.cpp:56
EXTERN_C HANDLE WINAPI SHChangeNotification_Lock(HANDLE hTicket, DWORD dwOwnerPID, LPITEMIDLIST **lppidls, LPLONG lpwEventId)
_In_ LONG _In_ HWND hwnd
Definition: winddi.h:4022
LPARAM lParam
Definition: combotst.c:139

Referenced by WindowProc().

◆ ParseCommandLine()

static BOOL ParseCommandLine ( LPWSTR  lpCmdLine)
static

Definition at line 235 of file shell32_apitest_sub.cpp.

236 {
237  LPWSTR pch = lpCmdLine; // fRecursive,iWatchDir,nSources
238  s_fRecursive = !!wcstoul(pch, NULL, 0);
239  pch = wcschr(pch, L',');
240  if (!pch)
241  return FALSE;
242  ++pch;
243 
245  pch = wcschr(pch, L',');
246  if (!pch)
247  return FALSE;
248  ++pch;
249 
250  s_nSources = wcstoul(pch, NULL, 0);
251  return TRUE;
252 }
static BOOL s_fRecursive
static INT s_nSources
#define TRUE
Definition: types.h:120
_Check_return_ unsigned long __cdecl wcstoul(_In_z_ const wchar_t *_Str, _Out_opt_ _Deref_post_z_ wchar_t **_EndPtr, _In_ int _Radix)
#define pch(ap)
Definition: match.c:418
#define L(x)
Definition: ntvdm.h:50
#define FALSE
Definition: types.h:117
static DIRTYPE s_iWatchDir
_CONST_RETURN wchar_t *__cdecl wcschr(_In_z_ const wchar_t *_Str, wchar_t _Ch)
#define NULL
Definition: types.h:112
WCHAR * LPWSTR
Definition: xmlstorage.h:184

Referenced by wWinMain().

◆ WindowProc()

static LRESULT CALLBACK WindowProc ( HWND  hwnd,
UINT  uMsg,
WPARAM  wParam,
LPARAM  lParam 
)
static

Definition at line 199 of file shell32_apitest_sub.cpp.

200 {
201  switch (uMsg)
202  {
203  case WM_CREATE:
204  return (OnCreate(hwnd) ? 0 : -1);
205 
206  case WM_COMMAND:
208  break;
209 
210  case WM_SHELL_NOTIFY:
211  return OnShellNotify(hwnd, wParam, lParam);
212 
213  case WM_DESTROY:
214  OnDestroy(hwnd);
215  break;
216 
217  case WM_GET_NOTIFY_FLAGS:
218  return OnGetNotifyFlags(hwnd);
219 
220  case WM_CLEAR_FLAGS:
221  ZeroMemory(&s_counters, sizeof(s_counters));
222  s_path1[0] = s_path2[0] = 0;
223  break;
224 
225  case WM_SET_PATHS:
226  DoSetPaths(hwnd);
227  break;
228 
229  default:
230  return DefWindowProcW(hwnd, uMsg, wParam, lParam);
231  }
232  return 0;
233 }
static void OnDestroy(HWND hwnd)
UINT uMsg
Definition: menu.cpp:213
static LRESULT OnGetNotifyFlags(HWND hwnd)
#define ZeroMemory
Definition: winbase.h:1667
#define WM_CLEAR_FLAGS
static BOOL OnCreate(HWND hwnd)
WPARAM wParam
Definition: combotst.c:138
LRESULT WINAPI DefWindowProcW(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
static void OnCommand(HWND hwnd, UINT id)
#define WM_GET_NOTIFY_FLAGS
static WCHAR s_path1[MAX_PATH]
#define WM_DESTROY
Definition: winuser.h:1596
#define WM_SET_PATHS
static WCHAR s_path2[MAX_PATH]
#define WM_COMMAND
Definition: winuser.h:1727
static BYTE s_counters[TYPE_MAX+1]
#define WM_SHELL_NOTIFY
#define WM_CREATE
Definition: winuser.h:1595
static INT_PTR OnShellNotify(HWND hwnd, WPARAM wParam, LPARAM lParam)
static void DoSetPaths(HWND hwnd)
_In_ LONG _In_ HWND hwnd
Definition: winddi.h:4022
LPARAM lParam
Definition: combotst.c:139
#define LOWORD(l)
Definition: pedump.c:82

Referenced by wWinMain().

◆ wWinMain()

INT APIENTRY wWinMain ( HINSTANCE  hInstance,
HINSTANCE  hPrevInstance,
LPWSTR  lpCmdLine,
INT  nCmdShow 
)

Definition at line 255 of file shell32_apitest_sub.cpp.

259 {
260  if (lstrcmpiW(lpCmdLine, L"") == 0 || lstrcmpiW(lpCmdLine, L"TEST") == 0)
261  return 0;
262 
263  if (!ParseCommandLine(lpCmdLine))
264  return -1;
265 
267 
268  WNDCLASSW wc;
269  ZeroMemory(&wc, sizeof(wc));
270  wc.lpfnWndProc = WindowProc;
274  wc.hbrBackground = (HBRUSH)(COLOR_3DFACE + 1);
276  if (!RegisterClassW(&wc))
277  return -1;
278 
280  CW_USEDEFAULT, CW_USEDEFAULT, 400, 100,
282  if (!hwnd)
283  return -1;
284 
287 
288  MSG msg;
289  while (GetMessageW(&msg, NULL, 0, 0))
290  {
293  }
294 
296 
297  return 0;
298 }
BOOL WINAPI TranslateMessage(_In_ const MSG *)
#define CloseHandle
Definition: compat.h:598
#define TRUE
Definition: types.h:120
TW_UINT32 TW_UINT16 TW_UINT16 MSG
Definition: twain.h:1827
BOOL WINAPI UpdateWindow(_In_ HWND)
#define ZeroMemory
Definition: winbase.h:1667
#define IDI_APPLICATION
Definition: winuser.h:699
BOOL WINAPI ShowWindow(_In_ HWND, _In_ int)
#define CreateWindowW(a, b, c, d, e, f, g, h, i, j, k)
Definition: winuser.h:4296
int WINAPI lstrcmpiW(LPCWSTR lpString1, LPCWSTR lpString2)
Definition: lstring.c:194
HANDLE WINAPI DECLSPEC_HOTPATCH OpenEventW(IN DWORD dwDesiredAccess, IN BOOL bInheritHandle, IN LPCWSTR lpName)
Definition: synch.c:682
ATOM WINAPI RegisterClassW(_In_ CONST WNDCLASSW *)
#define L(x)
Definition: ntvdm.h:50
#define COLOR_3DFACE
Definition: winuser.h:923
LRESULT WINAPI DispatchMessageW(_In_ const MSG *)
#define EVENT_ALL_ACCESS
Definition: isotest.c:82
WNDPROC lpfnWndProc
Definition: winuser.h:3157
#define CW_USEDEFAULT
Definition: winuser.h:225
LPCWSTR lpszClassName
Definition: winuser.h:3165
#define EVENT_NAME
static BOOL ParseCommandLine(LPWSTR lpCmdLine)
HICON hIcon
Definition: winuser.h:3161
#define CLASSNAME
#define LoadCursor
Definition: winuser.h:5792
HCURSOR hCursor
Definition: winuser.h:3162
#define SW_SHOWNORMAL
Definition: winuser.h:764
HBRUSH hbrBackground
Definition: winuser.h:3163
static LRESULT CALLBACK WindowProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
#define NULL
Definition: types.h:112
BOOL WINAPI GetMessageW(_Out_ LPMSG, _In_opt_ HWND, _In_ UINT, _In_ UINT)
HINSTANCE hInstance
Definition: winuser.h:3160
#define msg(x)
Definition: auth_time.c:54
#define IDC_ARROW
Definition: winuser.h:682
#define WS_OVERLAPPEDWINDOW
Definition: pedump.c:637
HMODULE WINAPI GetModuleHandleW(LPCWSTR lpModuleName)
Definition: loader.c:838
#define LoadIcon
Definition: winuser.h:5793
_In_ LONG _In_ HWND hwnd
Definition: winddi.h:4022
static HANDLE s_hEvent

Variable Documentation

◆ s_counters

BYTE s_counters[TYPE_MAX+1]
static

Definition at line 18 of file shell32_apitest_sub.cpp.

Referenced by DoPathesAndFlags(), OnGetNotifyFlags(), and WindowProc().

◆ s_fRecursive

BOOL s_fRecursive = FALSE
static

Definition at line 13 of file shell32_apitest_sub.cpp.

Referenced by OnCreate(), and ParseCommandLine().

◆ s_hEvent

HANDLE s_hEvent = NULL
static

Definition at line 19 of file shell32_apitest_sub.cpp.

Referenced by DoPathesAndFlags(), and wWinMain().

◆ s_hwnd

HWND s_hwnd = NULL
static

Definition at line 11 of file shell32_apitest_sub.cpp.

Referenced by OnCreate(), and OnDestroy().

◆ s_iWatchDir

DIRTYPE s_iWatchDir = DIRTYPE_NULL
static

Definition at line 14 of file shell32_apitest_sub.cpp.

Referenced by OnCreate(), and ParseCommandLine().

◆ s_nSources

INT s_nSources = 0
static

Definition at line 15 of file shell32_apitest_sub.cpp.

Referenced by OnCreate(), and ParseCommandLine().

◆ s_path1

WCHAR s_path1[MAX_PATH]
static

Definition at line 17 of file shell32_apitest_sub.cpp.

Referenced by DoPathes(), DoSetPaths(), and WindowProc().

◆ s_path2

WCHAR s_path2[MAX_PATH]
static

Definition at line 17 of file shell32_apitest_sub.cpp.

Referenced by DoPathes(), DoSetPaths(), and WindowProc().

◆ s_pidl

LPITEMIDLIST s_pidl = NULL
static

Definition at line 16 of file shell32_apitest_sub.cpp.

Referenced by OnCreate(), and OnDestroy().

◆ s_uRegID

UINT s_uRegID = 0
static

Definition at line 12 of file shell32_apitest_sub.cpp.

Referenced by OnCreate(), OnDestroy(), and OnGetNotifyFlags().