ReactOS 0.4.15-dev-5664-g3bf4ef6
shlfolder.cpp
Go to the documentation of this file.
1/*
2 * Shell Folder stuff
3 *
4 * Copyright 1997 Marcus Meissner
5 * Copyright 1998, 1999, 2002 Juergen Schmied
6 * Copyright 2018 Katayama Hirofumi MZ
7 *
8 * IShellFolder2 and related interfaces
9 *
10 * This library is free software; you can redistribute it and/or
11 * modify it under the terms of the GNU Lesser General Public
12 * License as published by the Free Software Foundation; either
13 * version 2.1 of the License, or (at your option) any later version.
14 *
15 * This library is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
18 * Lesser General Public License for more details.
19 *
20 * You should have received a copy of the GNU Lesser General Public
21 * License along with this library; if not, write to the Free Software
22 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
23 */
24
25#include "precomp.h"
26
28
29
30/***************************************************************************
31 * GetNextElement (internal function)
32 *
33 * Gets a part of a string till the first backslash.
34 *
35 * PARAMETERS
36 * pszNext [IN] string to get the element from
37 * pszOut [IN] pointer to buffer which receives string
38 * dwOut [IN] length of pszOut
39 *
40 * RETURNS
41 * LPSTR pointer to first, not yet parsed char
42 */
43
44LPCWSTR GetNextElementW (LPCWSTR pszNext, LPWSTR pszOut, DWORD dwOut)
45{
46 LPCWSTR pszTail = pszNext;
47 DWORD dwCopy;
48
49 TRACE ("(%s %p 0x%08x)\n", debugstr_w (pszNext), pszOut, dwOut);
50
51 *pszOut = 0x0000;
52
53 if (!pszNext || !*pszNext)
54 return NULL;
55
56 while (*pszTail && (*pszTail != (WCHAR) '\\'))
57 pszTail++;
58
59 dwCopy = pszTail - pszNext + 1;
60 lstrcpynW (pszOut, pszNext, (dwOut < dwCopy) ? dwOut : dwCopy);
61
62 if (*pszTail)
63 pszTail++;
64 else
65 pszTail = NULL;
66
67 TRACE ("--(%s %s 0x%08x %p)\n", debugstr_w (pszNext), debugstr_w (pszOut), dwOut, pszTail);
68 return pszTail;
69}
70
72 LPITEMIDLIST * pidlInOut, LPOLESTR szNext, DWORD * pEaten, DWORD * pdwAttributes)
73{
75 LPITEMIDLIST pidlIn = pidlInOut ? *pidlInOut : NULL;
76 LPITEMIDLIST pidlOut = NULL;
77 LPITEMIDLIST pidlTemp = NULL;
78 CComPtr<IShellFolder> psfChild;
79
80 TRACE ("(%p, %p, %p, %s)\n", psf, pbc, pidlIn, debugstr_w (szNext));
81
82 /* get the shellfolder for the child pidl and let it analyse further */
83 hr = psf->BindToObject(pidlIn, pbc, IID_PPV_ARG(IShellFolder, &psfChild));
84 if (FAILED(hr))
85 return hr;
86
87 hr = psfChild->ParseDisplayName(hwndOwner, pbc, szNext, pEaten, &pidlOut, pdwAttributes);
88 if (FAILED(hr))
89 return hr;
90
91 pidlTemp = ILCombine (pidlIn, pidlOut);
92 if (!pidlTemp)
93 {
95 if (pidlOut)
96 ILFree(pidlOut);
97 return hr;
98 }
99
100 if (pidlOut)
101 ILFree (pidlOut);
102
103 if (pidlIn)
104 ILFree (pidlIn);
105
106 *pidlInOut = pidlTemp;
107
108 TRACE ("-- pidl=%p ret=0x%08x\n", pidlInOut ? *pidlInOut : NULL, hr);
109 return S_OK;
110}
111
112/***********************************************************************
113 * SHELL32_CoCreateInitSF
114 *
115 * Creates a shell folder and initializes it with a pidl and a root folder
116 * via IPersistFolder3 or IPersistFolder.
117 *
118 * NOTES
119 * pathRoot can be NULL for Folders being a drive.
120 * In this case the absolute path is built from pidlChild (eg. C:)
121 */
122HRESULT SHELL32_CoCreateInitSF (LPCITEMIDLIST pidlRoot, PERSIST_FOLDER_TARGET_INFO* ppfti,
123 LPCITEMIDLIST pidlChild, const GUID* clsid, REFIID riid, LPVOID *ppvOut)
124{
125 HRESULT hr;
126 CComPtr<IShellFolder> pShellFolder;
127
129 if (FAILED(hr))
130 return hr;
131
132 LPITEMIDLIST pidlAbsolute = ILCombine (pidlRoot, pidlChild);
135
136 if (ppfti && SUCCEEDED(pShellFolder->QueryInterface(IID_PPV_ARG(IPersistFolder3, &ppf3))))
137 {
138 ppf3->InitializeEx(NULL, pidlAbsolute, ppfti);
139 }
140 else if (SUCCEEDED(pShellFolder->QueryInterface(IID_PPV_ARG(IPersistFolder, &ppf))))
141 {
142 ppf->Initialize(pidlAbsolute);
143 }
144 ILFree (pidlAbsolute);
145
146 return pShellFolder->QueryInterface(riid, ppvOut);
147}
148
150 int csidl, REFIID riid, LPVOID *ppvOut)
151{
152 /* fill the PERSIST_FOLDER_TARGET_INFO */
153 PERSIST_FOLDER_TARGET_INFO pfti = {0};
154 pfti.dwAttributes = -1;
155 pfti.csidl = csidl;
156
157 return SHELL32_CoCreateInitSF(pidlRoot, &pfti, NULL, clsid, riid, ppvOut);
158}
159
160HRESULT SHELL32_BindToSF (LPCITEMIDLIST pidlRoot, PERSIST_FOLDER_TARGET_INFO* ppfti,
161 LPCITEMIDLIST pidl, const GUID* clsid, REFIID riid, LPVOID *ppvOut)
162{
163 PITEMID_CHILD pidlChild = ILCloneFirst (pidl);
164 if (!pidlChild)
165 return E_FAIL;
166
169 ppfti,
170 pidlChild,
171 clsid,
173 ILFree(pidlChild);
174
176 return hr;
177
178 if (_ILIsPidlSimple (pidl))
179 return psf->QueryInterface(riid, ppvOut);
180 else
181 return psf->BindToObject(ILGetNext (pidl), NULL, riid, ppvOut);
182}
183
184/***********************************************************************
185 * SHELL32_GetDisplayNameOfChild
186 *
187 * Retrieves the display name of a child object of a shellfolder.
188 *
189 * For a pidl eg. [subpidl1][subpidl2][subpidl3]:
190 * - it binds to the child shellfolder [subpidl1]
191 * - asks it for the displayname of [subpidl2][subpidl3]
192 *
193 * Is possible the pidl is a simple pidl. In this case it asks the
194 * subfolder for the displayname of an empty pidl. The subfolder
195 * returns the own displayname eg. "::{guid}". This is used for
196 * virtual folders with the registry key WantsFORPARSING set.
197 */
199 LPCITEMIDLIST pidl, DWORD dwFlags, LPSTRRET strRet)
200{
201 LPITEMIDLIST pidlFirst = ILCloneFirst(pidl);
202 if (!pidlFirst)
203 return E_OUTOFMEMORY;
204
205 CComPtr<IShellFolder> psfChild;
206 HRESULT hr = psf->BindToObject(pidlFirst, NULL, IID_PPV_ARG(IShellFolder, &psfChild));
207 if (SUCCEEDED (hr))
208 {
209 hr = psfChild->GetDisplayNameOf(ILGetNext (pidl), dwFlags, strRet);
210 }
211 ILFree (pidlFirst);
212
213 return hr;
214}
215
217{
218 PUIDLIST_RELATIVE nextpidl1 = ILGetNext (pidl1);
219 PUIDLIST_RELATIVE nextpidl2 = ILGetNext (pidl2);
220
221 bool isEmpty1 = _ILIsDesktop(nextpidl1);
222 bool isEmpty2 = _ILIsDesktop(nextpidl2);
223 if (isEmpty1 || isEmpty2)
224 return MAKE_COMPARE_HRESULT(isEmpty2 - isEmpty1);
225
226 PITEMID_CHILD firstpidl = ILCloneFirst (pidl1);
227 if (!firstpidl)
228 return E_OUTOFMEMORY;
229
231 HRESULT hr = psf->BindToObject(firstpidl, 0, IID_PPV_ARG(IShellFolder, &psf2));
232 ILFree(firstpidl);
233 if (FAILED(hr))
234 return MAKE_COMPARE_HRESULT(0);
235
236 return psf2->CompareIDs(lParam, nextpidl1, nextpidl2);
237}
238
240{
242 WCHAR wszItem1[MAX_PATH], wszItem2[MAX_PATH];
244
245 hres = isf->GetDetailsOf(pidl1, lParam, &sd);
246 if (FAILED(hres))
247 return MAKE_COMPARE_HRESULT(1);
248
249 hres = StrRetToBufW(&sd.str, pidl1, wszItem1, MAX_PATH);
250 if (FAILED(hres))
251 return MAKE_COMPARE_HRESULT(1);
252
253 hres = isf->GetDetailsOf(pidl2, lParam, &sd);
254 if (FAILED(hres))
255 return MAKE_COMPARE_HRESULT(1);
256
257 hres = StrRetToBufW(&sd.str, pidl2, wszItem2, MAX_PATH);
258 if (FAILED(hres))
259 return MAKE_COMPARE_HRESULT(1);
260
261 int ret = wcsicmp(wszItem1, wszItem2);
262 if (ret == 0)
263 return SHELL32_CompareChildren(isf, lParam, pidl1, pidl2);
264
266}
267
268void AddClassKeyToArray(const WCHAR * szClass, HKEY* array, UINT* cKeys)
269{
270 if (*cKeys >= 16)
271 return;
272
273 HKEY hkey;
275 if (result != ERROR_SUCCESS)
276 return;
277
278 array[*cKeys] = hkey;
279 *cKeys += 1;
280}
281
283{
284 if (_ILIsValue(pidl))
285 {
286 FileStructW* pFileData = _ILGetFileStructW(pidl);
287 LPWSTR extension = PathFindExtension(pFileData->wszName);
288
289 if (extension)
290 {
291 AddClassKeyToArray(extension, array, cKeys);
292
293 WCHAR wszClass[MAX_PATH], wszClass2[MAX_PATH];
294 DWORD dwSize = sizeof(wszClass);
295 if (RegGetValueW(HKEY_CLASSES_ROOT, extension, NULL, RRF_RT_REG_SZ, NULL, wszClass, &dwSize) == ERROR_SUCCESS)
296 {
297 swprintf(wszClass2, L"%s//%s", extension, wszClass);
298
299 AddClassKeyToArray(wszClass, array, cKeys);
300 AddClassKeyToArray(wszClass2, array, cKeys);
301 }
302
303 swprintf(wszClass2, L"SystemFileAssociations//%s", extension);
304 AddClassKeyToArray(wszClass2, array, cKeys);
305
306 if (RegGetValueW(HKEY_CLASSES_ROOT, extension, L"PerceivedType ", RRF_RT_REG_SZ, NULL, wszClass, &dwSize) == ERROR_SUCCESS)
307 {
308 swprintf(wszClass2, L"SystemFileAssociations//%s", wszClass);
309 AddClassKeyToArray(wszClass2, array, cKeys);
310 }
311 }
312
313 AddClassKeyToArray(L"AllFilesystemObjects", array, cKeys);
314 AddClassKeyToArray(L"*", array, cKeys);
315 }
316 else if (_ILIsFolder(pidl))
317 {
318 AddClassKeyToArray(L"AllFilesystemObjects", array, cKeys);
319 AddClassKeyToArray(L"Directory", array, cKeys);
320 AddClassKeyToArray(L"Folder", array, cKeys);
321 }
322 else
323 {
324 ERR("Got non FS pidl\n");
325 }
326}
327
328HRESULT SH_GetApidlFromDataObject(IDataObject *pDataObject, PIDLIST_ABSOLUTE* ppidlfolder, PUITEMID_CHILD **apidlItems, UINT *pcidl)
329{
330 CDataObjectHIDA cida(pDataObject);
331
332 if (FAILED_UNEXPECTEDLY(cida.hr()))
333 return cida.hr();
334
335 /* convert the data into pidl */
336 LPITEMIDLIST pidl;
337 LPITEMIDLIST *apidl = _ILCopyCidaToaPidl(&pidl, cida);
338 if (!apidl)
339 {
340 return E_OUTOFMEMORY;
341 }
342
343 *ppidlfolder = pidl;
344 *apidlItems = apidl;
345 *pcidl = cida->cidl;
346
347 return S_OK;
348}
349
350/***********************************************************************
351 * SHCreateLinks
352 *
353 * Undocumented.
354 */
356 UINT uFlags, LPITEMIDLIST *lppidlLinks)
357{
358 FIXME("%p %s %p %08x %p\n", hWnd, lpszDir, lpDataObject, uFlags, lppidlLinks);
359 return E_NOTIMPL;
360}
361
362/***********************************************************************
363 * SHOpenFolderAndSelectItems
364 *
365 * Unimplemented.
366 */
368WINAPI
370 UINT cidl,
373{
374 ERR("SHOpenFolderAndSelectItems() is hackplemented\n");
375 PCIDLIST_ABSOLUTE pidlItem;
376 if (cidl)
377 {
378 /* Firefox sends a full pidl here dispite the fact it is a PCUITEMID_CHILD_ARRAY -_- */
379 if (ILGetNext(apidl[0]) != NULL)
380 {
381 pidlItem = apidl[0];
382 }
383 else
384 {
385 pidlItem = ILCombine(pidlFolder, apidl[0]);
386 }
387 }
388 else
389 {
390 pidlItem = pidlFolder;
391 }
392
393 CComPtr<IShellFolder> psfDesktop;
394
395 HRESULT hr = SHGetDesktopFolder(&psfDesktop);
397 return hr;
398
399 STRRET strret;
400 hr = psfDesktop->GetDisplayNameOf(pidlItem, SHGDN_FORPARSING, &strret);
402 return hr;
403
404 WCHAR wszBuf[MAX_PATH];
405 hr = StrRetToBufW(&strret, pidlItem, wszBuf, _countof(wszBuf));
407 return hr;
408
409 WCHAR wszParams[MAX_PATH];
410 wcscpy(wszParams, L"/select,");
411 wcscat(wszParams, wszBuf);
412
414 memset(&sei, 0, sizeof sei);
415 sei.cbSize = sizeof sei;
417 sei.lpFile = L"explorer.exe";
418 sei.lpParameters = wszParams;
419
420 if (ShellExecuteExW(&sei))
421 return S_OK;
422 else
423 return E_FAIL;
424}
425
426
427
428static
431{
432 CComPtr<IDataObject> pDataObject;
433 pDataObject.Attach((IDataObject*)lpParameter);
434
435 CDataObjectHIDA cida(pDataObject);
436
437 if (FAILED_UNEXPECTEDLY(cida.hr()))
438 return cida.hr();
439
440 if (cida->cidl > 1)
441 {
442 ERR("SHMultiFileProperties is not yet implemented\n");
443 return E_FAIL;
444 }
445
447 CComHeapPtr<WCHAR> wszName;
448 if (FAILED_UNEXPECTEDLY(SHGetNameFromIDList(completePidl, SIGDN_PARENTRELATIVEPARSING, &wszName)))
449 return 0;
450
451 BOOL bSuccess = SH_ShowPropertiesDialog(wszName, pDataObject);
452 if (!bSuccess)
453 ERR("SH_ShowPropertiesDialog failed\n");
454
455 return 0;
456}
457
458/*
459 * for internal use
460 */
463{
464 pdtobj->AddRef();
466 {
467 pdtobj->Release();
469 }
470 else
471 {
472 return S_OK;
473 }
474}
BOOL _ILIsDesktop(LPCITEMIDLIST pidl)
Definition: CBandSite.h:24
HRESULT WINAPI SHGetDesktopFolder(IShellFolder **psf)
HWND hWnd
Definition: settings.c:17
#define WINE_DEFAULT_DEBUG_CHANNEL(t)
Definition: precomp.h:23
void shell(int argc, const char *argv[])
Definition: cmds.c:1231
#define EXTERN_C
Definition: basetyps.h:12
#define FIXME(fmt,...)
Definition: debug.h:111
#define ERR(fmt,...)
Definition: debug.h:110
void Attach(T *lp)
Definition: atlcomcli.h:156
LPARAM lParam
Definition: combotst.c:139
#define E_OUTOFMEMORY
Definition: ddrawi.h:100
#define E_INVALIDARG
Definition: ddrawi.h:101
#define E_NOTIMPL
Definition: ddrawi.h:99
#define E_FAIL
Definition: ddrawi.h:102
#define ERROR_SUCCESS
Definition: deptool.c:10
static LSTATUS(WINAPI *pRegDeleteTreeW)(HKEY
#define NULL
Definition: types.h:112
LONG WINAPI RegOpenKeyExW(HKEY hKey, LPCWSTR lpSubKey, DWORD ulOptions, REGSAM samDesired, PHKEY phkResult)
Definition: reg.c:3356
LSTATUS WINAPI RegGetValueW(HKEY hKey, LPCWSTR pszSubKey, LPCWSTR pszValue, DWORD dwFlags, LPDWORD pdwType, PVOID pvData, LPDWORD pcbData)
Definition: reg.c:1965
UINT uFlags
Definition: api.c:59
BOOL WINAPI _ILIsPidlSimple(LPCITEMIDLIST pidl)
#define MAX_PATH
Definition: compat.h:34
#define wcsicmp
Definition: compat.h:15
#define lstrcpynW
Definition: compat.h:738
#define RRF_RT_REG_SZ
Definition: driver.c:575
HRESULT WINAPI SHCoCreateInstance(LPCWSTR aclsid, const CLSID *clsid, LPUNKNOWN pUnkOuter, REFIID refiid, LPVOID *ppv)
Definition: shellole.c:105
HRESULT WINAPI StrRetToBufW(LPSTRRET src, const ITEMIDLIST *pidl, LPWSTR dest, UINT len)
Definition: string.c:1522
BOOL WINAPI SHCreateThread(LPTHREAD_START_ROUTINE pfnThreadProc, VOID *pData, DWORD dwFlags, LPTHREAD_START_ROUTINE pfnCallback)
Definition: thread.c:356
#define swprintf
Definition: precomp.h:40
static BOOLEAN bSuccess
Definition: drive.cpp:433
unsigned int BOOL
Definition: ntddk_ex.h:94
unsigned long DWORD
Definition: ntddk_ex.h:95
BOOL SH_ShowPropertiesDialog(LPCWSTR pwszPath, IDataObject *pDataObj)
Definition: fprop.cpp:83
GLuint64EXT * result
Definition: glext.h:11304
REFIID riid
Definition: atlbase.h:39
HRESULT GetDetailsOf([in] PCUITEMID_CHILD pidl, [in] UINT iColumn, [out] SHELLDETAILS *psd)
HRESULT BindToObject([in] PCUIDLIST_RELATIVE pidl, [in] LPBC pbcReserved, [in] REFIID riid, [out, iid_is(riid)] void **ppvOut)
ULONG AddRef()
ULONG Release()
#define S_OK
Definition: intsafe.h:52
#define SUCCEEDED(hr)
Definition: intsafe.h:50
#define FAILED(hr)
Definition: intsafe.h:51
#define debugstr_w
Definition: kernel32.h:32
PSDBQUERYRESULT_VISTA PVOID DWORD * dwSize
Definition: env.c:56
HRESULT hres
Definition: protocol.c:465
static const WCHAR sd[]
Definition: suminfo.c:286
static LPOLESTR
Definition: stg_prop.c:27
REFCLSID clsid
Definition: msctf.c:82
unsigned int UINT
Definition: ndis.h:50
#define KEY_READ
Definition: nt_native.h:1023
#define KEY_QUERY_VALUE
Definition: nt_native.h:1016
#define L(x)
Definition: ntvdm.h:50
interface IBindCtx * LPBC
Definition: objfwd.h:18
void WINAPI ILFree(LPITEMIDLIST pidl)
Definition: pidl.c:925
LPITEMIDLIST * _ILCopyCidaToaPidl(LPITEMIDLIST *pidl, const CIDA *cida)
Definition: pidl.c:2684
HRESULT WINAPI SHGetNameFromIDList(PCIDLIST_ABSOLUTE pidl, SIGDN sigdnName, PWSTR *ppszName)
Definition: pidl.c:1423
LPITEMIDLIST WINAPI ILCombine(LPCITEMIDLIST pidl1, LPCITEMIDLIST pidl2)
Definition: pidl.c:699
LPITEMIDLIST WINAPI ILCloneFirst(LPCITEMIDLIST pidl)
Definition: pidl.c:253
FileStructW * _ILGetFileStructW(LPCITEMIDLIST pidl)
Definition: pidl.c:2361
BOOL _ILIsFolder(LPCITEMIDLIST pidl)
Definition: pidl.c:1976
LPITEMIDLIST WINAPI ILGetNext(LPCITEMIDLIST pidl)
Definition: pidl.c:851
BOOL _ILIsValue(LPCITEMIDLIST pidl)
Definition: pidl.c:1985
#define REFIID
Definition: guiddef.h:118
_CRTIMP wchar_t *__cdecl wcscpy(_Out_writes_z_(_String_length_(_Source)+1) wchar_t *_Dest, _In_z_ const wchar_t *_Source)
_CRTIMP wchar_t *__cdecl wcscat(_Inout_updates_z_(_String_length_(_Dest)+_String_length_(_Source)+1) wchar_t *_Dest, _In_z_ const wchar_t *_Source)
#define memset(x, y, z)
Definition: compat.h:39
#define SEE_MASK_WAITFORINPUTIDLE
Definition: shellapi.h:56
static PCUIDLIST_RELATIVE HIDA_GetPIDLItem(CIDA const *pida, SIZE_T i)
Definition: shellutils.h:569
#define FAILED_UNEXPECTEDLY(hr)
Definition: shellutils.h:82
static PCUIDLIST_ABSOLUTE HIDA_GetPIDLFolder(CIDA const *pida)
Definition: shellutils.h:564
#define MAKE_COMPARE_HRESULT(x)
Definition: shellutils.h:561
BOOL WINAPI DECLSPEC_HOTPATCH ShellExecuteExW(LPSHELLEXECUTEINFOW sei)
Definition: shlexec.cpp:2335
HRESULT hr
Definition: shlfolder.c:183
HRESULT SHELL32_CoCreateInitSF(LPCITEMIDLIST pidlRoot, PERSIST_FOLDER_TARGET_INFO *ppfti, LPCITEMIDLIST pidlChild, const GUID *clsid, REFIID riid, LPVOID *ppvOut)
Definition: shlfolder.cpp:122
HRESULT SHELL32_BindToSF(LPCITEMIDLIST pidlRoot, PERSIST_FOLDER_TARGET_INFO *ppfti, LPCITEMIDLIST pidl, const GUID *clsid, REFIID riid, LPVOID *ppvOut)
Definition: shlfolder.cpp:160
static DWORD WINAPI _ShowPropertiesDialogThread(LPVOID lpParameter)
Definition: shlfolder.cpp:430
HRESULT SHELL32_GetDisplayNameOfChild(IShellFolder2 *psf, LPCITEMIDLIST pidl, DWORD dwFlags, LPSTRRET strRet)
Definition: shlfolder.cpp:198
HRESULT SHELL32_CompareChildren(IShellFolder2 *psf, LPARAM lParam, LPCITEMIDLIST pidl1, LPCITEMIDLIST pidl2)
Definition: shlfolder.cpp:216
HRESULT WINAPI Shell_DefaultContextMenuCallBack(IShellFolder *psf, IDataObject *pdtobj)
Definition: shlfolder.cpp:462
void AddClassKeyToArray(const WCHAR *szClass, HKEY *array, UINT *cKeys)
Definition: shlfolder.cpp:268
HRESULT SHELL32_CompareDetails(IShellFolder2 *isf, LPARAM lParam, LPCITEMIDLIST pidl1, LPCITEMIDLIST pidl2)
Definition: shlfolder.cpp:239
HRESULT SH_GetApidlFromDataObject(IDataObject *pDataObject, PIDLIST_ABSOLUTE *ppidlfolder, PUITEMID_CHILD **apidlItems, UINT *pcidl)
Definition: shlfolder.cpp:328
EXTERN_C HRESULT WINAPI SHOpenFolderAndSelectItems(PCIDLIST_ABSOLUTE pidlFolder, UINT cidl, PCUITEMID_CHILD_ARRAY apidl, DWORD dwFlags)
Definition: shlfolder.cpp:369
HRESULT SHELL32_ParseNextElement(IShellFolder2 *psf, HWND hwndOwner, LPBC pbc, LPITEMIDLIST *pidlInOut, LPOLESTR szNext, DWORD *pEaten, DWORD *pdwAttributes)
Definition: shlfolder.cpp:71
HRESULT WINAPI SHCreateLinks(HWND hWnd, LPCSTR lpszDir, IDataObject *lpDataObject, UINT uFlags, LPITEMIDLIST *lppidlLinks)
Definition: shlfolder.cpp:355
void AddFSClassKeysToArray(PCUITEMID_CHILD pidl, HKEY *array, UINT *cKeys)
Definition: shlfolder.cpp:282
LPCWSTR GetNextElementW(LPCWSTR pszNext, LPWSTR pszOut, DWORD dwOut)
Definition: shlfolder.cpp:44
#define PathFindExtension
Definition: shlwapi.h:907
#define CTF_COINIT
Definition: shlwapi.h:1936
#define CTF_INSIST
Definition: shlwapi.h:1933
ITEMIDLIST UNALIGNED * LPITEMIDLIST
Definition: shtypes.idl:41
ITEMID_CHILD UNALIGNED * PUITEMID_CHILD
Definition: shtypes.idl:68
const PCUITEMID_CHILD * PCUITEMID_CHILD_ARRAY
Definition: shtypes.idl:71
const ITEMID_CHILD UNALIGNED * PCUITEMID_CHILD
Definition: shtypes.idl:70
const ITEMIDLIST UNALIGNED * LPCITEMIDLIST
Definition: shtypes.idl:42
ITEMIDLIST_RELATIVE UNALIGNED * PUIDLIST_RELATIVE
Definition: shtypes.idl:55
#define _countof(array)
Definition: sndvol32.h:68
#define TRACE(s)
Definition: solgame.cpp:4
WCHAR wszName[1]
Definition: shlfolder.c:1555
LPCWSTR lpParameters
Definition: shellapi.h:330
int ret
DWORD WINAPI GetLastError(void)
Definition: except.c:1040
_In_ PCCERT_CONTEXT _In_ DWORD dwFlags
Definition: wincrypt.h:1176
LONG_PTR LPARAM
Definition: windef.h:208
#define WINAPI
Definition: msvc.h:6
#define HRESULT_FROM_WIN32(x)
Definition: winerror.h:92
#define HKEY_CLASSES_ROOT
Definition: winreg.h:10
#define IID_PPV_ARG(Itype, ppType)
const char * LPCSTR
Definition: xmlstorage.h:183
__wchar_t WCHAR
Definition: xmlstorage.h:180
WCHAR * LPWSTR
Definition: xmlstorage.h:184
const WCHAR * LPCWSTR
Definition: xmlstorage.h:185