ReactOS  0.4.14-dev-323-g6fe6a88
IShellFolderViewCB.cpp
Go to the documentation of this file.
1 /*
2  * PROJECT: ReactOS API tests
3  * LICENSE: GPL-2.0+ (https://spdx.org/licenses/GPL-2.0+)
4  * PURPOSE: Test for IShellFolderViewCB
5  * COPYRIGHT: Copyright 2017 Mark Jansen (mark.jansen@reactos.org)
6  */
7 
8 #include "shelltest.h"
9 #include <atlsimpcoll.h>
10 #include <stdio.h>
11 #include <shellutils.h>
12 //#include <msgtrace.h>
13 
15 #define WINVER_VISTA 0x0600
16 
17 #ifndef SFVM_SELECTIONCHANGED
18 #define SFVM_SELECTIONCHANGED 8 /* undocumented */
19 #define SFVM_DRAWMENUITEM 9 /* undocumented */
20 #define SFVM_MEASUREMENUITEM 10 /* undocumented */
21 #define SFVM_EXITMENULOOP 11 /* undocumented */
22 #define SFVM_VIEWRELEASE 12 /* undocumented */
23 #define SFVM_GETNAMELENGTH 13 /* undocumented */
24 #define SFVM_WINDOWCLOSING 16 /* undocumented */
25 #define SFVM_LISTREFRESHED 17 /* undocumented */
26 #define SFVM_WINDOWFOCUSED 18 /* undocumented */
27 #define SFVM_REGISTERCOPYHOOK 20 /* undocumented */
28 #define SFVM_COPYHOOKCALLBACK 21 /* undocumented */
29 #define SFVM_UNMERGEFROMMENU 28 /* undocumented */
30 #define SFVM_ADDINGOBJECT 29 /* undocumented */
31 #define SFVM_REMOVINGOBJECT 30 /* undocumented */
32 #define SFVM_GETCOMMANDDIR 33 /* undocumented */
33 #define SFVM_GETCOLUMNSTREAM 34 /* undocumented */
34 #define SFVM_CANSELECTALL 35 /* undocumented */
35 #define SFVM_ISSTRICTREFRESH 37 /* undocumented */
36 #define SFVM_ISCHILDOBJECT 38 /* undocumented */
37 #define SFVM_GETEXTVIEWS 40 /* undocumented */
38 #define SFVM_GET_CUSTOMVIEWINFO 77 /* undocumented */
39 #define SFVM_ENUMERATEDITEMS 79 /* undocumented */
40 #define SFVM_GET_VIEW_DATA 80 /* undocumented */
41 #define SFVM_GET_WEBVIEW_LAYOUT 82 /* undocumented */
42 #define SFVM_GET_WEBVIEW_CONTENT 83 /* undocumented */
43 #define SFVM_GET_WEBVIEW_TASKS 84 /* undocumented */
44 #define SFVM_GET_WEBVIEW_THEME 86 /* undocumented */
45 #define SFVM_GETDEFERREDVIEWSETTINGS 92 /* undocumented */
46 #endif
47 
48 #define DUM_MSG_GetWindow 400
49 #define DUM_MSG_ContextSensitiveHelp 401
50 #define DUM_MSG_InsertMenusSB 402
51 #define DUM_MSG_SetMenuSB 403
52 #define DUM_MSG_RemoveMenusSB 404
53 #define DUM_MSG_SetStatusTextSB 405
54 #define DUM_MSG_EnableModelessSB 406
55 #define DUM_MSG_TranslateAcceleratorSB 407
56 #define DUM_MSG_BrowseObject 408
57 #define DUM_MSG_GetViewStateStream 409
58 #define DUM_MSG_GetControlWindow 410
59 #define DUM_MSG_SendControlMsg 411
60 #define DUM_MSG_QueryActiveShellView 412
61 #define DUM_MSG_OnViewWindowActive 413
62 #define DUM_MSG_SetToolbarItems 414
63 
64 
65 const char* msg2str(UINT uMsg)
66 {
67  static char buf[2][50];
68  static int index = 0;
69  index ^= 1;
70 
71  switch (uMsg)
72  {
73  case SFVM_MERGEMENU: return "SFVM_MERGEMENU";
74  case SFVM_INVOKECOMMAND: return "SFVM_INVOKECOMMAND";
75  case SFVM_GETHELPTEXT: return "SFVM_GETHELPTEXT";
76  case SFVM_GETTOOLTIPTEXT: return "SFVM_GETTOOLTIPTEXT";
77  case SFVM_GETBUTTONINFO: return "SFVM_GETBUTTONINFO";
78  case SFVM_GETBUTTONS: return "SFVM_GETBUTTONS";
79  case SFVM_INITMENUPOPUP: return "SFVM_INITMENUPOPUP";
80  case SFVM_SELECTIONCHANGED: return "SFVM_SELECTIONCHANGED";
81  case SFVM_DRAWMENUITEM: return "SFVM_DRAWMENUITEM";
82  case SFVM_MEASUREMENUITEM: return "SFVM_MEASUREMENUITEM";
83  case SFVM_EXITMENULOOP: return "SFVM_EXITMENULOOP";
84  case SFVM_VIEWRELEASE: return "SFVM_VIEWRELEASE";
85  case SFVM_GETNAMELENGTH: return "SFVM_GETNAMELENGTH";
86  case SFVM_FSNOTIFY: return "SFVM_FSNOTIFY";
87  case SFVM_WINDOWCREATED: return "SFVM_WINDOWCREATED";
88  case SFVM_WINDOWCLOSING: return "SFVM_WINDOWCLOSING";
89  case SFVM_LISTREFRESHED: return "SFVM_LISTREFRESHED";
90  case SFVM_WINDOWFOCUSED: return "SFVM_WINDOWFOCUSED";
91  case SFVM_REGISTERCOPYHOOK: return "SFVM_REGISTERCOPYHOOK";
92  case SFVM_COPYHOOKCALLBACK: return "SFVM_COPYHOOKCALLBACK";
93  case SFVM_GETDETAILSOF: return "SFVM_GETDETAILSOF";
94  case SFVM_COLUMNCLICK: return "SFVM_COLUMNCLICK";
95  case SFVM_QUERYFSNOTIFY: return "SFVM_QUERYFSNOTIFY";
96  case SFVM_DEFITEMCOUNT: return "SFVM_DEFITEMCOUNT";
97  case SFVM_DEFVIEWMODE: return "SFVM_DEFVIEWMODE";
98  case SFVM_UNMERGEFROMMENU: return "SFVM_UNMERGEFROMMENU";
99  case SFVM_ADDINGOBJECT: return "SFVM_ADDINGOBJECT";
100  case SFVM_REMOVINGOBJECT: return "SFVM_REMOVINGOBJECT";
101  case SFVM_UPDATESTATUSBAR: return "SFVM_UPDATESTATUSBAR";
102  case SFVM_BACKGROUNDENUM: return "SFVM_BACKGROUNDENUM";
103  case SFVM_GETCOMMANDDIR: return "SFVM_GETCOMMANDDIR";
104  case SFVM_GETCOLUMNSTREAM: return "SFVM_GETCOLUMNSTREAM";
105  case SFVM_CANSELECTALL: return "SFVM_CANSELECTALL";
106  case SFVM_DIDDRAGDROP: return "SFVM_DIDDRAGDROP";
107  case SFVM_ISSTRICTREFRESH: return "SFVM_ISSTRICTREFRESH";
108  case SFVM_ISCHILDOBJECT: return "SFVM_ISCHILDOBJECT";
109  case SFVM_SETISFV: return "SFVM_SETISFV";
110  case SFVM_GETEXTVIEWS: return "SFVM_GETEXTVIEWS";
111  case SFVM_THISIDLIST: return "SFVM_THISIDLIST";
112  case SFVM_ADDPROPERTYPAGES: return "SFVM_ADDPROPERTYPAGES";
113  case SFVM_BACKGROUNDENUMDONE: return "SFVM_BACKGROUNDENUMDONE";
114  case SFVM_GETNOTIFY: return "SFVM_GETNOTIFY";
115  case SFVM_GETSORTDEFAULTS: return "SFVM_GETSORTDEFAULTS";
116  case SFVM_SIZE: return "SFVM_SIZE";
117  case SFVM_GETZONE: return "SFVM_GETZONE";
118  case SFVM_GETPANE: return "SFVM_GETPANE";
119  case SFVM_GETHELPTOPIC: return "SFVM_GETHELPTOPIC";
120  case SFVM_GETANIMATION: return "SFVM_GETANIMATION";
121  case SFVM_GET_CUSTOMVIEWINFO: return "SFVM_GET_CUSTOMVIEWINFO";
122  case SFVM_ENUMERATEDITEMS: return "SFVM_ENUMERATEDITEMS";
123  case SFVM_GET_VIEW_DATA: return "SFVM_GET_VIEW_DATA";
124  case SFVM_GET_WEBVIEW_LAYOUT: return "SFVM_GET_WEBVIEW_LAYOUT";
125  case SFVM_GET_WEBVIEW_CONTENT: return "SFVM_GET_WEBVIEW_CONTENT";
126  case SFVM_GET_WEBVIEW_TASKS: return "SFVM_GET_WEBVIEW_TASKS";
127  case SFVM_GET_WEBVIEW_THEME: return "SFVM_GET_WEBVIEW_THEME";
128  case SFVM_GETDEFERREDVIEWSETTINGS: return "SFVM_GET_WEBVIEW_THEME";
129 
130  case DUM_MSG_GetWindow: return "|GetWindow|";
131  case DUM_MSG_ContextSensitiveHelp: return "|ContextSensitiveHelp|";
132  case DUM_MSG_InsertMenusSB: return "|InsertMenusSB|";
133  case DUM_MSG_SetMenuSB: return "|SetMenuSB|";
134  case DUM_MSG_RemoveMenusSB: return "|RemoveMenusSB|";
135  case DUM_MSG_SetStatusTextSB: return "|SetStatusTextSB|";
136  case DUM_MSG_EnableModelessSB: return "|EnableModelessSB|";
137  case DUM_MSG_TranslateAcceleratorSB: return "|TranslateAcceleratorSB|";
138  case DUM_MSG_BrowseObject: return "|BrowseObject|";
139  case DUM_MSG_GetViewStateStream: return "|GetViewStateStream|";
140  case DUM_MSG_GetControlWindow: return "|GetControlWindow|";
141  case DUM_MSG_SendControlMsg: return "|SendControlMsg|";
142  case DUM_MSG_QueryActiveShellView: return "|QueryActiveShellView|";
143  case DUM_MSG_OnViewWindowActive: return "|OnViewWindowActive|";
144  case DUM_MSG_SetToolbarItems: return "|SetToolbarItems|";
145  default:
146  sprintf(buf[index], "[%u]", uMsg);
147  return buf[index];
148  }
149 }
150 
151 
152 #define PTR_VALUE 0xf7f7f7f7
153 
154 struct message
155 {
156  message(UINT msg, WPARAM wp, LPARAM lp) : uMsg(msg), wParam(wp), lParam(lp) { ; }
157 
161 };
162 
164 
166 {
167  g_Received.RemoveAll();
168 }
169 
171 {
172  g_Received.Add(message(uMsg, wParam, lParam));
173 }
174 
175 void print_list_(const CSimpleArray<message>& input, const char* file, int line)
176 {
177  trace_(file, line)("Got list:\n");
178  for (int n = 0; n < input.GetSize(); ++n)
179  {
180  const message& msg = input[n];
181  trace_(file, line)("msg: %d(%s), wParam:0x%x, lParam:0x%lx\n", msg.uMsg, msg2str(msg.uMsg), msg.wParam, msg.lParam);
182  }
183  trace_(file, line)("End of list.\n");
184 }
185 
186 void compare_list_(const CSimpleArray<message>& input, const message* compare, const char* file, int line)
187 {
188  int input_item = 0;
189  int compare_item = 0;
190  LONG old_failures = winetest_get_failures();
191  while (compare[compare_item].uMsg && input_item < input.GetSize())
192  {
193  const message& inp = input[input_item];
194  const message& cmp = compare[compare_item];
195  if (cmp.uMsg == inp.uMsg)
196  {
197  if (cmp.lParam != (LPARAM)PTR_VALUE)
198  {
199  ok_(file, line)(cmp.lParam == inp.lParam, "Expected lParam to be 0x%lx, was 0x%lx for %i(%s)\n",
200  cmp.lParam, inp.lParam, compare_item, msg2str(cmp.uMsg));
201  }
202  else
203  {
204  ok_(file, line)(inp.lParam != 0, "Expected lParam to be a pointer, was 0 for %i(%s)\n",
205  compare_item, msg2str(cmp.uMsg));
206  }
207  if (cmp.wParam != PTR_VALUE)
208  {
209  ok_(file, line)(cmp.wParam == inp.wParam, "Expected wParam to be 0x%x, was 0x%x for %i(%s)\n",
210  cmp.wParam, inp.wParam, compare_item, msg2str(cmp.uMsg));
211  }
212  else
213  {
214  ok_(file, line)(inp.wParam != 0, "Expected wParam to be a pointer, was 0 for %i(%s)\n",
215  compare_item, msg2str(cmp.uMsg));
216  }
217  compare_item++;
218  }
219  else
220  {
221  /* We skip unknown items for now */
222  }
223 
224  input_item++;
225  }
226 
227  while (compare[compare_item].uMsg)
228  {
229  ok_(file, line)(0, "Message %i(%s) not found\n", compare_item, msg2str(compare[compare_item].uMsg));
230  compare_item++;
231  }
232  if (old_failures != winetest_get_failures())
233  {
235  }
236 }
237 
238 #define compare_list(cmp) compare_list_(g_Received, cmp, __FILE__, __LINE__)
239 #define print_list() print_list_(g_Received, __FILE__, __LINE__)
240 
241 
244 
245 class CFolderViewCB :
246  public IShellFolderViewCB
247 {
248 public:
250  {
251  if (riid == IID_IShellFolderViewCB || riid == IID_IUnknown)
252  {
253  *ppvObject = this;
254  AddRef();
255  return S_OK;
256  }
257  return E_NOINTERFACE;
258  }
260  {
262  return 2;
263  }
265  {
267  return 1;
268  }
270  {
271  //DbgPrint("MessageSFVCB(uMsg:%s, wParam:%u, lParam:%u\n", msg2str(uMsg), wParam, lParam);
272  add_msg(uMsg, wParam, lParam);
273  return E_NOTIMPL;
274  }
275 };
276 
277 
279 {
280  if (msg == WM_DESTROY)
281  {
282  PostQuitMessage(0);
283  return 0;
284  }
285  return DefWindowProc(hwnd, msg, wParam, lParam);
286 }
287 
288 
290 {
291 public:
294  {
295  static const TCHAR* class_name = TEXT("DUMMY_TEST_CLASS");
296  WNDCLASSEX wx = {};
297  wx.cbSize = sizeof(WNDCLASSEX);
298  wx.lpfnWndProc = WndProc;
300  wx.lpszClassName = class_name;
301  wx.style = CS_DBLCLKS;
302  RegisterClassEx(&wx);
303  m_hwnd = CreateWindowEx(0, class_name, TEXT("dummy_name"), WS_OVERLAPPEDWINDOW, 0, 0, 0, 0, NULL, NULL, NULL, NULL);
305  }
306 
307  // *** IUnknown methods ***
309  {
310  if (riid == IID_IShellBrowser || riid == IID_IUnknown)
311  {
312  *ppvObject = this;
313  return S_OK;
314  }
315  return E_NOINTERFACE;
316  }
318  {
319  return 2;
320  }
322  {
323  return 1;
324  }
325 
326  // *** IOleWindow methods ***
328  {
329  //DbgPrint("%s()\n", __FUNCTION__);
330  *phwnd = m_hwnd;
332  return S_OK;
333  }
335  {
336  //DbgPrint("%s()\n", __FUNCTION__);
338  return E_NOTIMPL;
339  }
340 
341  // *** IShellBrowser methods ***
342  virtual HRESULT STDMETHODCALLTYPE InsertMenusSB(HMENU hmenuShared, LPOLEMENUGROUPWIDTHS lpMenuWidths)
343  {
344  //DbgPrint("%s()\n", __FUNCTION__);
346  return S_OK;
347  }
348  virtual HRESULT STDMETHODCALLTYPE SetMenuSB(HMENU hmenuShared, HOLEMENU holemenuRes, HWND hwndActiveObject)
349  {
350  //DbgPrint("%s()\n", __FUNCTION__);
352  return S_OK;
353  }
355  {
356  //DbgPrint("%s()\n", __FUNCTION__);
358  return E_NOTIMPL;
359  }
361  {
362  //DbgPrint("%s()\n", __FUNCTION__);
364  return E_NOTIMPL;
365  }
367  {
368  //DbgPrint("%s()\n", __FUNCTION__);
370  return E_NOTIMPL;
371  }
373  {
374  //DbgPrint("%s()\n", __FUNCTION__);
376  return E_NOTIMPL;
377  }
379  {
380  //DbgPrint("%s()\n", __FUNCTION__);
382  return E_NOTIMPL;
383  }
385  {
386  //DbgPrint("%s()\n", __FUNCTION__);
388  return E_NOTIMPL;
389  }
391  {
392  //DbgPrint("%s()\n", __FUNCTION__);
394  return E_NOTIMPL;
395  }
397  {
398  //DbgPrint("%s()\n", __FUNCTION__);
400  return E_NOTIMPL;
401  }
403  {
404  //DbgPrint("%s()\n", __FUNCTION__);
406  return E_NOTIMPL;
407  }
409  {
410  //DbgPrint("%s()\n", __FUNCTION__);
412  return E_NOTIMPL;
413  }
415  {
416  //DbgPrint("%s()\n", __FUNCTION__);
418  return E_NOTIMPL;
419  }
420 };
421 
422 
423 START_TEST(IShellFolderViewCB)
424 {
425  RTL_OSVERSIONINFOEXW rtlinfo = { sizeof(rtlinfo) };
426  void (__stdcall* pRtlGetVersion)(RTL_OSVERSIONINFOEXW*);
427  pRtlGetVersion = (void (__stdcall*)(RTL_OSVERSIONINFOEXW*))GetProcAddress(GetModuleHandleA("ntdll"), "RtlGetVersion");
428  pRtlGetVersion(&rtlinfo);
429  g_WinVersion = (rtlinfo.dwMajorVersion << 8) | rtlinfo.dwMinorVersion;
430 
433 
434  CComPtr<IShellFolder> desktop;
435 
436  HRESULT hr = SHGetDesktopFolder(&desktop);
437  ok_hex(hr, S_OK);
438  if (!desktop)
439  return;
440 
441  SFV_CREATE sfvc = { sizeof(sfvc), desktop };
442  sfvc.psfvcb = &cb;
443  IShellView* psv = NULL;
444 
445  g_AddRef = 0;
446  g_Release = 0;
447 
448  hr = SHCreateShellFolderView(&sfvc, &psv);
449  ok_hex(hr, S_OK);
450  if (!SUCCEEDED(hr))
451  return;
452 
453  ok_int(g_AddRef, 2);
454  ok_int(g_Release, 0);
455 
456  clear_list();
457 
458  HWND wnd;
459  RECT rc = { 0 };
460  FOLDERSETTINGS fs = { FVM_DETAILS, 0 };
462  hr = psv->CreateViewWindow(NULL, &fs, &dum, &rc, &wnd);
463 
464 
465  static message init_list[] =
466  {
467  /* ... */
468  message(DUM_MSG_GetWindow, 0, 0),
469  /* Some unknown messages here, and multiple SFVM_GET_WEBVIEW_THEME + SFVM_GETSORTDEFAULTS + SFVM_GETCOLUMNSTREAM */
470  message(SFVM_SIZE, 0, 0),
471  /* ... */
474  message(DUM_MSG_SetMenuSB, 0, 0),
475  /* ... */
477  /* ... */
478 
482 
483  message(0, 0, 0)
484  };
485 
486 
487  static message init_list_vista[] =
488  {
489  /* Some unknown messages here */
490  message(DUM_MSG_GetWindow, 0, 0),
491  /* Some unknown messages here, and multiple SFVM_GET_WEBVIEW_THEME + SFVM_GETSORTDEFAULTS + SFVM_GETCOLUMNSTREAM */
492  message(SFVM_SIZE, 0, 0),
494  /* Some unknown messages here */
497  message(DUM_MSG_SetMenuSB, 0, 0),
498 
499  message(0, 0, 0)
500  };
501 
503  {
504  compare_list(init_list);
505  }
506  else
507  {
508  compare_list(init_list_vista);
509  }
510  clear_list();
511 
512  hr = psv->Refresh();
513  //ok_hex(hr, S_FALSE);
514 
515  static message refresh_list[] =
516  {
518 
520  message(DUM_MSG_SetMenuSB, 0, 0),
524  message(DUM_MSG_SetMenuSB, 0, 0),
525 
526  message(0, 0, 0)
527  };
528 
529  static message refresh_list_vista[] =
530  {
532 
534  message(DUM_MSG_SetMenuSB, 0, 0),
538  message(DUM_MSG_SetMenuSB, 0, 0),
539  /* Some messages here, like SFVM_GET_WEBVIEW_THEME, SFVM_GETSORTDEFAULTS, SFVM_GETCOLUMNSTREAM */
541  message(DUM_MSG_SetMenuSB, 0, 0),
545  message(DUM_MSG_SetMenuSB, 0, 0),
546 
547  message(0, 0, 0)
548  };
549 
551  {
552  compare_list(refresh_list);
553  }
554  else
555  {
556  compare_list(refresh_list_vista);
557  }
558  clear_list();
559 
560  hr = psv->DestroyViewWindow();
561 
562  static message destroy_list[] =
563  {
565  message(DUM_MSG_SetMenuSB, 0, 0),
568 
569  message(0, 0, 0)
570  };
571 
572  compare_list(destroy_list);
573  clear_list();
574 
575  CComPtr<IShellFolderView> folderView;
576  hr = psv->QueryInterface(IID_PPV_ARG(IShellFolderView, &folderView));
577  ok_hex(hr, S_OK);
578  if (SUCCEEDED(hr))
579  {
580  IShellFolderViewCB* oldPtr;
581 
582  g_AddRef = 0;
583  g_Release = 0;
584 
585  hr = folderView->SetCallback(NULL, &oldPtr);
586  ok_int(g_AddRef, 0);
587  ok_int(g_Release, 0);
588 
589  g_AddRef = 0;
590  g_Release = 0;
591 
592  /* Last pointer is not optional! */
593  IShellFolderViewCB* oldPtr2;
594  hr = folderView->SetCallback(oldPtr, &oldPtr2);
595  ok_int(g_AddRef, 1);
596  ok_int(g_Release, 0);
597  }
598 
599 
600  ULONG refCount = psv->Release();
601  ok(refCount == 0, "refCount = %lu\n", refCount);
602 
603  static message release_list[] =
604  {
605  message(SFVM_VIEWRELEASE, 0, 0),
606 
607  message(0, 0, 0)
608  };
609 
610  /* Investigate why this fails */
611  if (refCount == 0)
612  {
613  compare_list(release_list);
614  }
615 }
#define SFVM_CANSELECTALL
virtual HRESULT STDMETHODCALLTYPE EnableModelessSB(BOOL fEnable)
Definition: bug.cpp:7
#define SFVM_GETNAMELENGTH
const DOCKBAR PVOID HWND HWND * hwnd
Definition: tooldock.h:22
UINT style
Definition: winuser.h:3176
virtual HRESULT STDMETHODCALLTYPE GetControlWindow(UINT id, HWND *phwnd)
virtual HRESULT STDMETHODCALLTYPE GetViewStateStream(DWORD grfMode, IStream **ppStrm)
LONG winetest_get_failures(void)
#define trace_(file, line,...)
Definition: kmt_test.h:221
Definition: tftpd.h:59
#define REFIID
Definition: guiddef.h:118
START_TEST(IShellFolderViewCB)
HRESULT Refresh()
#define E_NOINTERFACE
Definition: winerror.h:2364
#define DUM_MSG_SetToolbarItems
#define SFVM_GET_WEBVIEW_TASKS
#define RegisterClassEx
Definition: winuser.h:5738
struct png_info_def **typedef void(__cdecl typeof(png_destroy_read_struct))(struct png_struct_def **
Definition: typeof.h:49
HRESULT CreateViewWindow([in] IShellView *psvPrevious, [in] LPCFOLDERSETTINGS lpfs, [in] IShellBrowser *psb, [out] RECT *prcView, [out] HWND *phWnd)
virtual HRESULT STDMETHODCALLTYPE ContextSensitiveHelp(BOOL fEnterMode)
WNDPROC lpfnWndProc
Definition: winuser.h:3177
HRESULT hr
Definition: shlfolder.c:183
IShellFolderViewCB * psfvcb
Definition: shlobj.h:1276
const WCHAR * LPCWSTR
Definition: xmlstorage.h:185
#define SFVM_BACKGROUNDENUMDONE
Definition: shlobj.h:1252
virtual HRESULT STDMETHODCALLTYPE OnViewWindowActive(IShellView *pshv)
#define SFVM_GETHELPTEXT
Definition: shlobj.h:1214
LPCSTR lpszClassName
Definition: winuser.h:3185
ULONG dwMinorVersion
Definition: rtltypes.h:267
GLenum GLuint GLenum GLsizei const GLchar * buf
Definition: glext.h:7751
REFIID riid
Definition: precomp.h:44
#define SFVM_QUERYFSNOTIFY
Definition: shlobj.h:1234
virtual HRESULT STDMETHODCALLTYPE SendControlMsg(UINT id, UINT uMsg, WPARAM wParam, LPARAM lParam, LRESULT *pret)
TW_UINT32 TW_UINT16 TW_UINT16 MSG
Definition: twain.h:1827
#define SFVM_DIDDRAGDROP
Definition: shlobj.h:1245
#define SFVM_GETCOMMANDDIR
LONG g_Release
#define WINVER_VISTA
GLenum GLuint GLenum GLsizei const GLchar * message
Definition: glext.h:5579
#define CALLBACK
Definition: compat.h:27
GLdouble n
Definition: glext.h:7729
#define SFVM_ADDINGOBJECT
UINT_PTR WPARAM
Definition: windef.h:207
#define SFVM_GETPANE
Definition: shlobj.h:1257
UINT uFlags
Definition: api.c:59
BOOL WINAPI ShowWindow(_In_ HWND, _In_ int)
#define cmp(status, error)
Definition: error.c:114
virtual HRESULT STDMETHODCALLTYPE QueryInterface(REFIID riid, void **ppvObject)
Definition: fs.h:235
#define DUM_MSG_TranslateAcceleratorSB
HRESULT WINAPI SHCreateShellFolderView(const SFV_CREATE *pcsfv, IShellView **ppsv)
Definition: CDefView.cpp:3448
#define IID_PPV_ARG(Itype, ppType)
#define ok_hex(expression, result)
Definition: atltest.h:94
#define SFVM_DRAWMENUITEM
WPARAM wParam
Definition: combotst.c:138
#define SFVM_GET_CUSTOMVIEWINFO
#define SFVM_COLUMNCLICK
Definition: shlobj.h:1233
#define SFVM_SIZE
Definition: shlobj.h:1255
static DWORD g_WinVersion
#define SFVM_WINDOWCLOSING
ULONG dwMajorVersion
Definition: rtltypes.h:266
message(UINT msg, WPARAM wp, LPARAM lp)
#define SFVM_SETISFV
Definition: shlobj.h:1248
#define sprintf(buf, format,...)
Definition: sprintf.c:55
#define SFVM_COPYHOOKCALLBACK
#define SFVM_GET_VIEW_DATA
void compare_list_(const CSimpleArray< message > &input, const message *compare, const char *file, int line)
#define SFVM_ENUMERATEDITEMS
void add_msg(UINT uMsg, WPARAM wParam, LPARAM lParam)
#define DUM_MSG_InsertMenusSB
HRESULT DestroyViewWindow()
HINSTANCE hInstance
Definition: winuser.h:3180
unsigned int BOOL
Definition: ntddk_ex.h:94
long LONG
Definition: pedump.c:60
#define PTR_VALUE
#define SFVM_ISCHILDOBJECT
#define compare_list(cmp)
virtual HRESULT STDMETHODCALLTYPE SetMenuSB(HMENU hmenuShared, HOLEMENU holemenuRes, HWND hwndActiveObject)
#define SFVM_LISTREFRESHED
ULONG Release()
#define CreateWindowEx
Definition: winuser.h:5656
#define DUM_MSG_GetWindow
#define SFVM_INVOKECOMMAND
Definition: shlobj.h:1213
#define SFVM_GETBUTTONINFO
Definition: shlobj.h:1216
smooth NULL
Definition: ftsmooth.c:416
#define ok_int(expression, result)
Definition: atltest.h:134
LONG_PTR LPARAM
Definition: windef.h:208
UINT cbSize
Definition: winuser.h:3175
#define SFVM_MERGEMENU
Definition: shlobj.h:1212
Definition: parser.c:48
#define SFVM_GETANIMATION
Definition: shlobj.h:1259
CSimpleArray< message > g_Received
#define SFVM_WINDOWFOCUSED
virtual ULONG STDMETHODCALLTYPE Release(void)
GLuint index
Definition: glext.h:6031
#define SW_SHOW
Definition: winuser.h:769
#define DUM_MSG_ContextSensitiveHelp
void print_list_(const CSimpleArray< message > &input, const char *file, int line)
#define DUM_MSG_GetControlWindow
#define DefWindowProc
Definition: ros2win.h:31
#define SFVM_REMOVINGOBJECT
#define WM_DESTROY
Definition: winuser.h:1591
#define SFVM_REGISTERCOPYHOOK
char TCHAR
Definition: xmlstorage.h:189
virtual HRESULT STDMETHODCALLTYPE SetToolbarItems(LPTBBUTTONSB lpButtons, UINT nButtons, UINT uFlags)
#define SFVM_UPDATESTATUSBAR
Definition: shlobj.h:1240
HRESULT WINAPI SHGetDesktopFolder(IShellFolder **psf)
#define SFVM_BACKGROUNDENUM
Definition: shlobj.h:1241
#define SFVM_GETNOTIFY
Definition: shlobj.h:1253
static LRESULT CALLBACK WndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
LONG HRESULT
Definition: typedefs.h:77
#define SFVM_WINDOWCREATED
Definition: shlobj.h:1226
#define DUM_MSG_QueryActiveShellView
#define SFVM_GET_WEBVIEW_CONTENT
const GUID IID_IUnknown
#define SFVM_UNMERGEFROMMENU
#define SFVM_GETSORTDEFAULTS
Definition: shlobj.h:1254
#define STDMETHODCALLTYPE
Definition: bdasup.h:9
unsigned short WORD
Definition: ntddk_ex.h:93
unsigned long DWORD
Definition: ntddk_ex.h:95
#define __stdcall
Definition: typedefs.h:25
#define DUM_MSG_SendControlMsg
#define DUM_MSG_BrowseObject
#define SFVM_VIEWRELEASE
#define SFVM_GET_WEBVIEW_THEME
#define SFVM_FSNOTIFY
Definition: shlobj.h:1225
#define DUM_MSG_SetMenuSB
#define SFVM_DEFVIEWMODE
Definition: shlobj.h:1236
#define index(s, c)
Definition: various.h:29
virtual HRESULT STDMETHODCALLTYPE QueryActiveShellView(IShellView **ppshv)
virtual ULONG STDMETHODCALLTYPE Release(void)
virtual HRESULT STDMETHODCALLTYPE GetWindow(HWND *phwnd)
HMODULE WINAPI DECLSPEC_HOTPATCH GetModuleHandleA(LPCSTR lpModuleName)
Definition: loader.c:821
#define SFVM_GETHELPTOPIC
Definition: shlobj.h:1258
#define SFVM_GETZONE
Definition: shlobj.h:1256
REFIID LPVOID * ppvObject
Definition: precomp.h:44
#define CS_DBLCLKS
Definition: winuser.h:646
#define SFVM_GETDETAILSOF
Definition: shlobj.h:1232
#define SFVM_ADDPROPERTYPAGES
Definition: shlobj.h:1251
#define SFVM_DEFITEMCOUNT
Definition: shlobj.h:1235
virtual HRESULT STDMETHODCALLTYPE RemoveMenusSB(HMENU hmenuShared)
void clear_list()
#define SFVM_SELECTIONCHANGED
_In_ DWORD _Out_ _In_ WORD wFlags
Definition: wincon.h:519
#define SFVM_GETEXTVIEWS
#define S_OK
Definition: intsafe.h:59
#define TEXT(s)
Definition: k32.h:26
#define DUM_MSG_OnViewWindowActive
virtual HRESULT STDMETHODCALLTYPE BrowseObject(PCUIDLIST_RELATIVE pidl, UINT wFlags)
#define InterlockedIncrement
Definition: armddk.h:53
GLenum GLenum GLenum input
Definition: glext.h:9031
#define GetModuleHandle
Definition: winbase.h:3651
virtual HRESULT STDMETHODCALLTYPE SetStatusTextSB(LPCWSTR pszStatusText)
CDumExe dum
Definition: CComObject.cpp:71
#define SFVM_GET_WEBVIEW_LAYOUT
#define ok(value,...)
Definition: atltest.h:57
#define E_NOTIMPL
Definition: ddrawi.h:99
#define SFVM_GETCOLUMNSTREAM
#define SFVM_GETTOOLTIPTEXT
Definition: shlobj.h:1215
unsigned int UINT
Definition: ndis.h:50
virtual HRESULT STDMETHODCALLTYPE QueryInterface(REFIID riid, void **ppvObject)
#define SFVM_GETBUTTONS
Definition: shlobj.h:1217
HRESULT QueryInterface([in] REFIID riid, [out, iid_is(riid)] void **ppvObject)
virtual HRESULT STDMETHODCALLTYPE InsertMenusSB(HMENU hmenuShared, LPOLEMENUGROUPWIDTHS lpMenuWidths)
#define DUM_MSG_RemoveMenusSB
#define SFVM_ISSTRICTREFRESH
static HMODULE MODULEINFO DWORD cb
Definition: module.c:32
const ITEMIDLIST_RELATIVE UNALIGNED * PCUIDLIST_RELATIVE
Definition: shtypes.idl:57
HRESULT WINAPI CoInitialize(LPVOID lpReserved)
Definition: compobj.c:1964
#define msg(x)
Definition: auth_time.c:54
#define DUM_MSG_EnableModelessSB
#define WS_OVERLAPPEDWINDOW
Definition: pedump.c:637
#define SFVM_INITMENUPOPUP
Definition: shlobj.h:1218
unsigned int ULONG
Definition: retypes.h:1
LONG g_AddRef
#define GetProcAddress(x, y)
Definition: compat.h:410
#define SFVM_GETDEFERREDVIEWSETTINGS
WNDCLASSEXA WNDCLASSEX
Definition: winuser.h:5620
#define SFVM_EXITMENULOOP
LONG_PTR LRESULT
Definition: windef.h:209
static const CLSID *static CLSID *static const GUID VARIANT VARIANT *static IServiceProvider DWORD *static HMENU
Definition: ordinal.c:60
virtual HRESULT STDMETHODCALLTYPE TranslateAcceleratorSB(MSG *pmsg, WORD wID)
LPARAM lParam
Definition: combotst.c:139
#define SFVM_MEASUREMENUITEM
virtual ULONG STDMETHODCALLTYPE AddRef(void)
__analysis_noreturn void WINAPI PostQuitMessage(_In_ int)
#define DUM_MSG_GetViewStateStream
#define SUCCEEDED(hr)
Definition: intsafe.h:57
virtual ULONG STDMETHODCALLTYPE AddRef(void)
#define DUM_MSG_SetStatusTextSB
virtual HRESULT STDMETHODCALLTYPE MessageSFVCB(UINT uMsg, WPARAM wParam, LPARAM lParam)
#define ok_(x1, x2)
Definition: atltest.h:61
#define SFVM_THISIDLIST
Definition: shlobj.h:1250
const char * msg2str(UINT uMsg)
Definition: fci.c:126