ReactOS  0.4.15-dev-1184-g23e04ae
CIDLData.cpp
Go to the documentation of this file.
1 /*
2  * PROJECT: ReactOS api tests
3  * LICENSE: GPL-2.0-or-later (https://spdx.org/licenses/GPL-2.0-or-later)
4  * PURPOSE: Test for CIDLDataObj
5  * COPYRIGHT: Copyright 2019 Mark Jansen (mark.jansen@reactos.org)
6  */
7 
8 #include "shelltest.h"
9 #include <ndk/rtlfuncs.h>
10 #include <stdio.h>
11 #include <shellutils.h>
12 #include <shlwapi.h>
13 
15 
16 
18 {
19  CComPtr<IDataObject> spDataObj;
20  HRESULT hr = CIDLData_CreateFromIDArray(pidlFolder, cidl, apidl, &spDataObj);
21 
22  ok_hex(hr, S_OK);
23  if (!SUCCEEDED(hr))
24  return;
25 
26  hr = spDataObj->DAdvise(NULL, 0, NULL, NULL);
28 
29  hr = spDataObj->DUnadvise(0);
31 
32  hr = spDataObj->EnumDAdvise(NULL);
34 
35 
36  FORMATETC in = {1, (DVTARGETDEVICE*)2, 3, 4, 5};
37  FORMATETC out = {6, (DVTARGETDEVICE*)7, 8, 9, 10};
38 
39  hr = spDataObj->GetCanonicalFormatEtc(&in, &out);
41 
43  {
44  ok_int(out.cfFormat, 6);
45  ok_ptr(out.ptd, (void*)7);
46  ok_int(out.dwAspect, 8);
47  ok_int(out.lindex, 9);
48  ok_int(out.tymed, 10);
49  trace("out unmodified\n");
50  }
51  else
52  {
53  ok_int(out.cfFormat, in.cfFormat);
54  ok_ptr(out.ptd, NULL);
55  ok_int(out.dwAspect, (int)in.dwAspect);
56  ok_int(out.lindex, in.lindex);
57  ok_int(out.tymed, (int)in.tymed);
58  trace("in copied to out\n");
59  }
60 }
61 
62 
63 #define ok_wstri(x, y) \
64  ok(wcsicmp(x, y) == 0, "Wrong string. Expected '%S', got '%S'\n", y, x)
65 
66 static void TestHIDA(PVOID pData, SIZE_T Size, LPCWSTR ExpectRoot, LPCWSTR ExpectPath1, LPCWSTR ExpectPath2)
67 {
68  LPIDA pida = (LPIDA)pData;
69 
70  ok_int(pida->cidl, 2);
71  if (pida->cidl != 2)
72  return;
73 
74  WCHAR FolderPath[MAX_PATH], Item1[MAX_PATH], Item2[MAX_PATH];
75  BOOL bRet = SHGetPathFromIDListW(HIDA_GetPIDLFolder(pida), FolderPath);
76  ok_int(bRet, TRUE);
77  if (!bRet)
78  return;
79  ok_wstri(FolderPath, ExpectRoot);
80 
81  CComHeapPtr<ITEMIDLIST_ABSOLUTE> pidl1(ILCombine(HIDA_GetPIDLFolder(pida), HIDA_GetPIDLItem(pida, 0)));
82  CComHeapPtr<ITEMIDLIST_ABSOLUTE> pidl2(ILCombine(HIDA_GetPIDLFolder(pida), HIDA_GetPIDLItem(pida, 1)));
83 
84  bRet = SHGetPathFromIDListW(pidl1, Item1);
85  ok_int(bRet, TRUE);
86  if (!bRet)
87  return;
88  ok_wstri(Item1, ExpectPath1);
89 
90  bRet = SHGetPathFromIDListW(pidl2, Item2);
91  ok_int(bRet, TRUE);
92  if (!bRet)
93  return;
94  ok_wstri(Item2, ExpectPath2);
95 }
96 
97 static void TestHDROP(PVOID pData, SIZE_T Size, LPCWSTR ExpectRoot, LPCWSTR ExpectPath1, LPCWSTR ExpectPath2)
98 {
99  DROPFILES* pDropFiles = (DROPFILES*)pData;
100  ok_int(pDropFiles->fWide, TRUE);
101 
102  LPCWSTR Expected[2] = { ExpectPath1, ExpectPath2 };
103 
104  SIZE_T offset = pDropFiles->pFiles;
105  UINT Count = 0;
106  for (;;Count++)
107  {
108  LPCWSTR ptr = (LPCWSTR)(((BYTE*)pDropFiles) + offset);
109  if (!*ptr)
110  break;
111 
112  if (Count < _countof(Expected))
114 
115  offset += (wcslen(ptr) + 1) * sizeof(WCHAR);
116  }
117  ok_int(Count, 2);
118 }
119 
120 static void TestFilenameA(PVOID pData, SIZE_T Size, LPCWSTR ExpectRoot, LPCWSTR ExpectPath1, LPCWSTR ExpectPath2)
121 {
122  LPCSTR FirstFile = (LPCSTR)pData;
123  LPWSTR FirstFileW;
124 
125  HRESULT hr = SHStrDupA(FirstFile, &FirstFileW);
126  ok_hex(hr, S_OK);
127  if (!SUCCEEDED(hr))
128  return;
129 
130  ok_wstri(ExpectPath1, FirstFileW);
131  CoTaskMemFree(FirstFileW);
132 }
133 
134 static void TestFilenameW(PVOID pData, SIZE_T Size, LPCWSTR ExpectRoot, LPCWSTR ExpectPath1, LPCWSTR ExpectPath2)
135 {
136  LPCWSTR FirstFile = (LPCWSTR)pData;
137  ok_wstri(ExpectPath1, FirstFile);
138 }
139 
140 
142 {
143  CComPtr<IDataObject> spDataObj;
144  HRESULT hr = CIDLData_CreateFromIDArray(pidlFolder, cidl, apidl, &spDataObj);
145 
146  ok_hex(hr, S_OK);
147  if (!SUCCEEDED(hr))
148  return;
149 
150  CComPtr<IEnumFORMATETC> pEnumFmt;
151  hr = spDataObj->EnumFormatEtc(DATADIR_GET, &pEnumFmt);
152 
153  ok_hex(hr, S_OK);
154  if (!SUCCEEDED(hr))
155  return;
156 
157  UINT Expected[4] = {
159  CF_HDROP,
161  RegisterClipboardFormatA("FileNameW"),
162  };
163 
164  UINT Count = 0;
165  FORMATETC fmt;
166  while (S_OK == (hr=pEnumFmt->Next(1, &fmt, NULL)))
167  {
168  char szGot[512], szExpected[512];
169  GetClipboardFormatNameA(fmt.cfFormat, szGot, sizeof(szGot));
170  ok(Count < _countof(Expected), "%u\n", Count);
171  if (Count < _countof(Expected))
172  {
173  GetClipboardFormatNameA(Expected[Count], szExpected, sizeof(szExpected));
174  ok(fmt.cfFormat == Expected[Count], "Got 0x%x(%s), expected 0x%x(%s) for %u\n",
175  fmt.cfFormat, szGot, Expected[Count], szExpected, Count);
176  }
177 
178  ok(fmt.ptd == NULL, "Got 0x%p, expected 0x%p for [%u].ptd\n", fmt.ptd, (void*)NULL, Count);
179  ok(fmt.dwAspect == DVASPECT_CONTENT, "Got 0x%lu, expected 0x%d for [%u].dwAspect\n", fmt.dwAspect, DVASPECT_CONTENT, Count);
180  ok(fmt.lindex == -1, "Got 0x%lx, expected 0x%x for [%u].lindex\n", fmt.lindex, -1, Count);
181  ok(fmt.tymed == TYMED_HGLOBAL, "Got 0x%lu, expected 0x%d for [%u].tymed\n", fmt.tymed, TYMED_HGLOBAL, Count);
182 
183  Count++;
184  }
185  trace("Got %u formats\n", Count);
186  ULONG ExpectedCount = (g_WinVersion < _WIN32_WINNT_WIN8) ? 1 : 4;
187  ok_int(Count, (int)ExpectedCount);
188  ok_hex(hr, S_FALSE);
189 
190  typedef void (*TestFunction)(PVOID pData, SIZE_T Size, LPCWSTR ExpectRoot, LPCWSTR ExpectPath1, LPCWSTR ExpectPath2);
191  TestFunction TestFormats[] = {
192  TestHIDA,
193  TestHDROP,
196  };
197 
198  WCHAR ExpectRoot[MAX_PATH], ExpectItem1[MAX_PATH], ExpectItem2[MAX_PATH];
199 
200  hr = SHGetFolderPathW(NULL, CSIDL_WINDOWS, NULL, 0, ExpectRoot);
201  ok_hex(hr, S_OK);
202  if (!SUCCEEDED(hr))
203  return;
204 
205  hr = SHGetFolderPathW(NULL, CSIDL_SYSTEM, NULL, 0, ExpectItem1);
206  ok_hex(hr, S_OK);
207  if (!SUCCEEDED(hr))
208  return;
209 
210  hr = SHGetFolderPathW(NULL, CSIDL_RESOURCES, NULL, 0, ExpectItem2);
211  ok_hex(hr, S_OK);
212  if (!SUCCEEDED(hr))
213  return;
214 
215 
216  /* The formats are not synthesized on request */
217  for (Count = 0; Count < _countof(Expected); ++Count)
218  {
219  STGMEDIUM medium = {0};
220  FORMATETC etc = { (CLIPFORMAT)Expected[Count], NULL, DVASPECT_CONTENT, -1, TYMED_HGLOBAL };
221  char szExpected[512];
222 
223  GetClipboardFormatNameA(etc.cfFormat, szExpected, sizeof(szExpected));
224  hr = spDataObj->GetData(&etc, &medium);
225  HRESULT hr2 = spDataObj->QueryGetData(&etc);
226  ok_hex(hr2, SUCCEEDED(hr) ? S_OK : S_FALSE);
227 
228  if (Count < ExpectedCount)
229  {
230  ok(hr == S_OK, "0x%x (0x%x(%s))\n", (unsigned int)hr, Expected[Count], szExpected);
231  ok(medium.tymed == TYMED_HGLOBAL, "0x%lx (0x%x(%s))\n", medium.tymed, Expected[Count], szExpected);
232  if (hr == S_OK && medium.tymed == TYMED_HGLOBAL)
233  {
234  PVOID pData = GlobalLock(medium.hGlobal);
235  SIZE_T Size = GlobalSize(medium.hGlobal);
236  TestFormats[Count](pData, Size, ExpectRoot, ExpectItem1, ExpectItem2);
237  GlobalUnlock(medium.hGlobal);
238  }
239  }
240  else
241  {
243  ok(hr == E_INVALIDARG, "0x%x (0x%x(%s))\n", (unsigned int)hr, Expected[Count], szExpected);
244  else
245  ok(hr == DV_E_FORMATETC, "0x%x (0x%x(%s))\n", (unsigned int)hr, Expected[Count], szExpected);
246  }
247 
248  if (SUCCEEDED(hr))
249  ReleaseStgMedium(&medium);
250  }
251 
252  // Not registered
254  FORMATETC formatetc = { Format, NULL, DVASPECT_CONTENT, -1, TYMED_HGLOBAL };
255  STGMEDIUM medium;
256 
257  hr = spDataObj->GetData(&formatetc, &medium);
260  else
262 }
263 
264 
266 {
267  CComPtr<IDataObject> spDataObj;
268  HRESULT hr = CIDLData_CreateFromIDArray(pidlFolder, cidl, apidl, &spDataObj);
269 
270  ok_hex(hr, S_OK);
271  if (!SUCCEEDED(hr))
272  return;
273 
274  STGMEDIUM medium = {0};
275  medium.tymed = TYMED_HGLOBAL;
276  medium.hGlobal = GlobalAlloc(GHND, sizeof(DWORD));
277  ok(medium.hGlobal != NULL, "Download more ram\n");
278  PDWORD data = (PDWORD)GlobalLock(medium.hGlobal);
279  *data = 12345;
280  GlobalUnlock(medium.hGlobal);
281 
282  UINT flags = GlobalFlags(medium.hGlobal);
283  SIZE_T size = GlobalSize(medium.hGlobal);
284  ok_hex(flags, 0);
285  ok_size_t(size, sizeof(DWORD));
286 
287  FORMATETC etc = { (CLIPFORMAT)RegisterClipboardFormatA(CFSTR_INDRAGLOOPA), NULL, DVASPECT_CONTENT, -1, TYMED_HGLOBAL };
288  FORMATETC etc2 = etc;
289 
290  /* Not supported! */
291  hr = spDataObj->SetData(&etc, &medium, FALSE);
294  else
295  ok_hex(hr, E_NOTIMPL);
296 
297  /* Object takes ownership! */
298  hr = spDataObj->SetData(&etc, &medium, TRUE);
299  ok_hex(hr, S_OK);
300  if (!SUCCEEDED(hr))
301  return;
302 
303  /* Does not touch the hGlobal! */
304  flags = GlobalFlags(medium.hGlobal);
305  size = GlobalSize(medium.hGlobal);
306  ok_hex(flags, 0);
307  ok_size_t(size, sizeof(DWORD));
308 
309  STGMEDIUM medium2 = {0};
310 
311  /* No conversion */
312  etc2.dwAspect = DVASPECT_DOCPRINT;
313  hr = spDataObj->GetData(&etc2, &medium2);
314  HRESULT hr2 = spDataObj->QueryGetData(&etc2);
315  ok_hex(hr2, SUCCEEDED(hr) ? S_OK : S_FALSE);
318  else
320 
321  etc2.dwAspect = DVASPECT_CONTENT;
322  etc2.tymed = TYMED_NULL;
323  hr = spDataObj->GetData(&etc2, &medium2);
324  hr2 = spDataObj->QueryGetData(&etc2);
325  ok_hex(hr2, SUCCEEDED(hr) ? S_OK : S_FALSE);
328  else
330  etc2.tymed = TYMED_HGLOBAL;
331 
332  ok_ptr(medium2.pUnkForRelease, NULL);
333  hr = spDataObj->GetData(&etc2, &medium2);
334  hr2 = spDataObj->QueryGetData(&etc2);
335  ok_hex(hr2, SUCCEEDED(hr) ? S_OK : S_FALSE);
336  ok_hex(hr, S_OK);
337  if (hr == S_OK)
338  {
339  ok_hex(medium2.tymed, TYMED_HGLOBAL);
341  {
342  /* The IDataObject is set as pUnkForRelease */
343  ok(medium2.pUnkForRelease == (IUnknown*)spDataObj, "Expected the data object (0x%p), got 0x%p\n",
344  (IUnknown*)spDataObj, medium2.pUnkForRelease);
345  ok(medium.hGlobal == medium2.hGlobal, "Pointers are not the same!, got 0x%p and 0x%p\n", medium.hGlobal, medium2.hGlobal);
346  }
347  else
348  {
349  ok_ptr(medium2.pUnkForRelease, NULL);
350  ok(medium.hGlobal != medium2.hGlobal, "Pointers are the same!\n");
351  }
352 
353  flags = GlobalFlags(medium2.hGlobal);
354  size = GlobalSize(medium2.hGlobal);
355  ok_hex(flags, 0);
356  ok_size_t(size, sizeof(DWORD));
357 
358  data = (PDWORD)GlobalLock(medium2.hGlobal);
359  if (data)
360  ok_int(*data, 12345);
361  else
362  ok(0, "GlobalLock: %lu\n", GetLastError());
363  GlobalUnlock(medium2.hGlobal);
364 
365  HGLOBAL backup = medium2.hGlobal;
366  ReleaseStgMedium(&medium2);
367 
371  {
372  /* Same object! just the pUnkForRelease was set, so original hGlobal is still valid */
373  ok_hex(flags, 0);
374  ok_size_t(size, sizeof(DWORD));
375  }
376  else
377  {
379  ok_size_t(size, 0);
380  }
381 
382  /* Original is still intact (but no longer ours!) */
383  flags = GlobalFlags(medium.hGlobal);
384  size = GlobalSize(medium.hGlobal);
385  ok_hex(flags, 0);
386  ok_size_t(size, sizeof(DWORD));
387  }
388 
389  HGLOBAL backup = medium.hGlobal;
390  spDataObj.Release();
391 
392  /* Now our hGlobal is deleted */
396  ok_size_t(size, 0);
397 }
398 
399 START_TEST(CIDLData)
400 {
401  HRESULT hr;
402 
404 
405  RTL_OSVERSIONINFOEXW rtlinfo = {0};
406 
407  rtlinfo.dwOSVersionInfoSize = sizeof(rtlinfo);
409  g_WinVersion = (rtlinfo.dwMajorVersion << 8) | rtlinfo.dwMinorVersion;
410 
411  CComHeapPtr<ITEMIDLIST_ABSOLUTE> pidlWindows;
412  CComHeapPtr<ITEMIDLIST_ABSOLUTE> pidlSystem32;
413  CComHeapPtr<ITEMIDLIST_ABSOLUTE> pidlResources;
414 
415  hr = SHGetFolderLocation(NULL, CSIDL_WINDOWS, NULL, 0, &pidlWindows);
416  ok_hex(hr, S_OK);
417  if (!SUCCEEDED(hr))
418  return;
419 
420  hr = SHGetFolderLocation(NULL, CSIDL_SYSTEM, NULL, 0, &pidlSystem32);
421  ok_hex(hr, S_OK);
422  if (!SUCCEEDED(hr))
423  return;
424 
425  hr = SHGetFolderLocation(NULL, CSIDL_RESOURCES, NULL, 0, &pidlResources);
426  ok_hex(hr, S_OK);
427  if (!SUCCEEDED(hr))
428  return;
429 
430  CComPtr<IShellFolder> shellFolder;
431  PCUITEMID_CHILD child1;
432  hr = SHBindToParent(pidlSystem32, IID_PPV_ARG(IShellFolder, &shellFolder), &child1);
433  ok_hex(hr, S_OK);
434  if (!SUCCEEDED(hr))
435  return;
436 
437  PCUITEMID_CHILD child2 = ILFindLastID(pidlResources);
438 
439  UINT cidl = 2;
440  PCUIDLIST_RELATIVE apidl[2] = {
441  child1, child2
442  };
443 
444  TestAdviseAndCanonical(pidlWindows, cidl, apidl);
445  TestDefaultFormat(pidlWindows, cidl, apidl);
446  TestSetAndGetExtraFormat(pidlWindows, cidl, apidl);
447 }
#define ok_wstri(x, y)
Definition: CIDLData.cpp:63
ULONG dwOSVersionInfoSize
Definition: rtltypes.h:269
const PCUIDLIST_RELATIVE * PCUIDLIST_RELATIVE_ARRAY
Definition: shtypes.idl:58
static long backup()
Definition: maze.c:403
HGLOBAL NTAPI GlobalAlloc(UINT uFlags, SIZE_T dwBytes)
Definition: heapmem.c:368
struct png_info_def **typedef void(__cdecl typeof(png_destroy_read_struct))(struct png_struct_def **
Definition: typeof.h:49
VOID WINAPI CoTaskMemFree(LPVOID ptr)
Definition: ifs.c:442
NTSTATUS NTAPI RtlGetVersion(IN OUT PRTL_OSVERSIONINFOW lpVersionInformation)
Definition: version.c:158
HRESULT hr
Definition: shlfolder.c:183
#define DATA_S_SAMEFORMATETC
Definition: winerror.h:2674
const WCHAR * LPCWSTR
Definition: xmlstorage.h:185
void WINAPI ReleaseStgMedium(STGMEDIUM *pmedium)
Definition: ole2.c:2033
#define TRUE
Definition: types.h:120
UINT WINAPI RegisterClipboardFormatW(_In_ LPCWSTR)
UINT NTAPI GlobalFlags(HGLOBAL hMem)
Definition: heapmem.c:520
#define CFSTR_INDRAGLOOPA
Definition: shlobj.h:360
LPITEMIDLIST WINAPI ILCombine(LPCITEMIDLIST pidl1, LPCITEMIDLIST pidl2)
Definition: pidl.c:699
BOOL WINAPI SHGetPathFromIDListW(LPCITEMIDLIST pidl, LPWSTR pszPath)
Definition: pidl.c:1294
GLintptr offset
Definition: glext.h:5920
const char * fmt
Definition: wsprintf.c:30
static PCUIDLIST_RELATIVE HIDA_GetPIDLItem(CIDA const *pida, SIZE_T i)
Definition: shellutils.h:543
#define GMEM_INVALID_HANDLE
Definition: winbase.h:305
const ITEMID_CHILD UNALIGNED * PCUITEMID_CHILD
Definition: shtypes.idl:70
DWORD WINAPI GetLastError(VOID)
Definition: except.c:1044
_Inout_ __drv_aliasesMem PSLIST_ENTRY _Inout_ PSLIST_ENTRY _In_ ULONG Count
Definition: exfuncs.h:1223
#define ok_ptr(expression, result)
Definition: atltest.h:108
#define IID_PPV_ARG(Itype, ppType)
#define ok_hex(expression, result)
Definition: atltest.h:94
HRESULT WINAPI SHStrDupA(LPCSTR lpszStr, LPWSTR *lppszDest)
Definition: string.c:1946
SIZE_T NTAPI GlobalSize(HGLOBAL hMem)
Definition: heapmem.c:1090
#define GHND
Definition: winbase.h:294
#define _WIN32_WINNT_VISTA
Definition: sdkddkver.h:25
#define FALSE
Definition: types.h:117
unsigned int BOOL
Definition: ntddk_ex.h:94
static PVOID ptr
Definition: dispmode.c:27
#define S_FALSE
Definition: winerror.h:2357
#define E_INVALIDARG
Definition: ddrawi.h:101
smooth NULL
Definition: ftsmooth.c:416
#define ok_int(expression, result)
Definition: atltest.h:134
#define CF_HDROP
Definition: constants.h:410
LPITEMIDLIST WINAPI ILFindLastID(LPCITEMIDLIST pidl)
Definition: pidl.c:189
#define CSIDL_WINDOWS
Definition: shlobj.h:2047
const char * LPCSTR
Definition: xmlstorage.h:183
static void TestDefaultFormat(PCIDLIST_ABSOLUTE pidlFolder, UINT cidl, PCUIDLIST_RELATIVE_ARRAY apidl)
Definition: CIDLData.cpp:141
#define _WIN32_WINNT_WIN8
Definition: sdkddkver.h:29
GLsizeiptr size
Definition: glext.h:5919
ULONG dwMajorVersion
Definition: rtltypes.h:247
#define DV_E_FORMATETC
Definition: winerror.h:2633
#define trace
Definition: atltest.h:70
__wchar_t WCHAR
Definition: xmlstorage.h:180
LONG HRESULT
Definition: typedefs.h:79
static DWORD g_WinVersion
Definition: CIDLData.cpp:14
#define _countof(array)
Definition: sndvol32.h:68
static void TestHDROP(PVOID pData, SIZE_T Size, LPCWSTR ExpectRoot, LPCWSTR ExpectPath1, LPCWSTR ExpectPath2)
Definition: CIDLData.cpp:97
#define MAX_PATH
Definition: compat.h:34
BOOL fWide
Definition: shlobj.h:2127
struct CIDA * LPIDA
static FILE * out
Definition: regtests2xml.c:44
UINT cidl
Definition: shlobj.h:499
unsigned long DWORD
Definition: ntddk_ex.h:95
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
Definition: gl.h:1950
GLbitfield flags
Definition: glext.h:7161
static const WCHAR CFSTR_PREFERREDDROPEFFECTW[]
Definition: shlobj.h:453
#define ok_size_t(expression, result)
Definition: atltest.h:115
START_TEST(CIDLData)
Definition: CIDLData.cpp:399
LPVOID NTAPI GlobalLock(HGLOBAL hMem)
Definition: heapmem.c:755
static void TestSetAndGetExtraFormat(PCIDLIST_ABSOLUTE pidlFolder, UINT cidl, PCUIDLIST_RELATIVE_ARRAY apidl)
Definition: CIDLData.cpp:265
static PCUIDLIST_ABSOLUTE HIDA_GetPIDLFolder(CIDA const *pida)
Definition: shellutils.h:538
IN PVOID IN PVOID IN USHORT IN USHORT Size
Definition: pci.h:361
unsigned char BYTE
Definition: xxhash.c:193
UINT WINAPI RegisterClipboardFormatA(_In_ LPCSTR)
#define OLE_E_ADVISENOTSUPPORTED
Definition: winerror.h:2617
ULONG_PTR SIZE_T
Definition: typedefs.h:80
static void TestFilenameW(PVOID pData, SIZE_T Size, LPCWSTR ExpectRoot, LPCWSTR ExpectPath1, LPCWSTR ExpectPath2)
Definition: CIDLData.cpp:134
#define S_OK
Definition: intsafe.h:51
#define CSIDL_RESOURCES
Definition: shlobj.h:2064
GLuint in
Definition: glext.h:9616
HRESULT WINAPI SHBindToParent(LPCITEMIDLIST pidl, REFIID riid, LPVOID *ppv, LPCITEMIDLIST *ppidlLast)
Definition: pidl.c:1337
#define ok(value,...)
Definition: atltest.h:57
#define E_NOTIMPL
Definition: ddrawi.h:99
HRESULT WINAPI DECLSPEC_HOTPATCH CoInitializeEx(LPVOID lpReserved, DWORD dwCoInit)
Definition: compobj.c:2002
unsigned int UINT
Definition: ndis.h:50
BOOL NTAPI GlobalUnlock(HGLOBAL hMem)
Definition: heapmem.c:1190
DWORD * PDWORD
Definition: pedump.c:68
const ITEMIDLIST_RELATIVE UNALIGNED * PCUIDLIST_RELATIVE
Definition: shtypes.idl:57
ULONG dwMinorVersion
Definition: rtltypes.h:248
HRESULT WINAPI SHGetFolderPathW(HWND hwndOwner, int nFolder, HANDLE hToken, DWORD dwFlags, LPWSTR pszPath)
Definition: shellpath.c:2208
unsigned int ULONG
Definition: retypes.h:1
#define CFSTR_SHELLIDLISTA
Definition: shlobj.h:345
HRESULT WINAPI SHGetFolderLocation(HWND hwndOwner, int nFolder, HANDLE hToken, DWORD dwReserved, LPITEMIDLIST *ppidl)
Definition: shellpath.c:2741
#define CFSTR_FILENAMEA
Definition: shlobj.h:352
#define CSIDL_SYSTEM
Definition: shlobj.h:2048
HRESULT WINAPI CIDLData_CreateFromIDArray(PCIDLIST_ABSOLUTE pidlFolder, UINT cpidlFiles, PCUIDLIST_RELATIVE_ARRAY lppidlFiles, LPDATAOBJECT *ppdataObject)
Definition: shellord.c:2185
static void TestHIDA(PVOID pData, SIZE_T Size, LPCWSTR ExpectRoot, LPCWSTR ExpectPath1, LPCWSTR ExpectPath2)
Definition: CIDLData.cpp:66
WCHAR * LPWSTR
Definition: xmlstorage.h:184
BOOLEAN Expected
TW_UINT32 TW_UINT16 TW_UINT16 TW_MEMREF pData
Definition: twain.h:1827
DWORD pFiles
Definition: shlobj.h:2124
Definition: dsound.c:943
static void TestAdviseAndCanonical(PCIDLIST_ABSOLUTE pidlFolder, UINT cidl, PCUIDLIST_RELATIVE_ARRAY apidl)
Definition: CIDLData.cpp:17
size_t __cdecl wcslen(_In_z_ const wchar_t *_Str)
int WINAPI GetClipboardFormatNameA(_In_ UINT format, _Out_writes_(cchMaxCount) LPSTR lpszFormatName, _In_ int cchMaxCount)
#define SUCCEEDED(hr)
Definition: intsafe.h:49
Definition: shlobj.h:498
ACPI_BUFFER *RetBuffer ACPI_BUFFER *RetBuffer char ACPI_WALK_RESOURCE_CALLBACK void *Context ACPI_BUFFER *RetBuffer UINT16 ACPI_RESOURCE **ResourcePtr ACPI_GENERIC_ADDRESS *Reg UINT32 *ReturnValue UINT8 UINT8 *Slp_TypB ACPI_PHYSICAL_ADDRESS PhysicalAddress64 UINT32 UINT32 *TimeElapsed UINT32 ACPI_STATUS const char * Format
Definition: acpixf.h:1216
static void TestFilenameA(PVOID pData, SIZE_T Size, LPCWSTR ExpectRoot, LPCWSTR ExpectPath1, LPCWSTR ExpectPath2)
Definition: CIDLData.cpp:120