ReactOS 0.4.15-dev-7924-g5949c20
CMergedFolder.cpp
Go to the documentation of this file.
1/*
2 * Shell Menu Site
3 *
4 * Copyright 2014 David Quintana
5 *
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public
8 * License as published by the Free Software Foundation; either
9 * version 2.1 of the License, or (at your option) any later version.
10 *
11 * This library is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Lesser General Public License for more details.
15 *
16 * You should have received a copy of the GNU Lesser General Public
17 * License along with this library; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
19 */
20#include "shellmenu.h"
21#include <atlwin.h>
22#include <shlwapi_undoc.h>
23
24#include "CMergedFolder.h"
25
27
29{
35};
36
38 public CComObjectRootEx<CComMultiThreadModelNoCS>,
39 public IEnumIDList
40{
41
42private:
43 CComPtr<IShellFolder> m_UserLocalFolder;
44 CComPtr<IShellFolder> m_AllUSersFolder;
45
48
52
53public:
55 virtual ~CEnumMergedFolder();
56
59
61 COM_INTERFACE_ENTRY_IID(IID_IEnumIDList, IEnumIDList)
63
65
66 static int CALLBACK s_DsaDeleteCallback(void *pItem, void *pData);
67
68 HRESULT SetSources(IShellFolder * userLocal, IShellFolder * allUSers);
69 HRESULT Begin(HWND hwndOwner, SHCONTF flags);
70 HRESULT FindPidlInList(HWND hwndOwner, LPCITEMIDLIST pcidl, LocalPidlInfo * pinfo);
71 HRESULT FindByName(HWND hwndOwner, LPCWSTR strParsingName, LocalPidlInfo * pinfo);
72
74 ULONG celt,
75 LPITEMIDLIST *rgelt,
76 ULONG *pceltFetched) override;
77
81};
82
87 m_Flags(0),
88 m_hDsa(NULL),
89 m_hDsaIndex(0),
91{
92}
93
95{
97}
98
100{
101 ILFree(info->pidl);
102 if (info->pidl2)
103 ILFree(info->pidl2);
104 CoTaskMemFree((LPVOID)info->parseName);
105 return 0;
106}
107
109{
111 LocalPidlInfo * item = (LocalPidlInfo*) pItem;
112 return mf->DsaDeleteCallback(item);
113}
114
116{
117 m_UserLocalFolder = userLocal;
118 m_AllUSersFolder = allUSers;
119
120 TRACE("SetSources %p %p\n", userLocal, allUSers);
121 return S_OK;
122}
123
125{
126 HRESULT hr;
127 LPITEMIDLIST pidl = NULL;
128
129 if (m_hDsa && m_HwndOwner == hwndOwner && m_Flags == flags)
130 {
131 return Reset();
132 }
133
134 TRACE("Search conditions changed, recreating list...\n");
135
136 CComPtr<IEnumIDList> userLocal;
137 CComPtr<IEnumIDList> allUsers;
138
139 hr = m_UserLocalFolder->EnumObjects(hwndOwner, flags, &userLocal);
141 return hr;
142 hr = m_AllUSersFolder->EnumObjects(hwndOwner, flags, &allUsers);
144 return hr;
145
146 if (!m_hDsa)
147 {
148 m_hDsa = DSA_Create(sizeof(LocalPidlInfo), 10);
149 }
150
153 m_hDsaCount = 0;
154
155 // The sources are not ordered so load all of the items for the user folder first
156 TRACE("Loading Local entries...\n");
157 for (;;)
158 {
159 hr = userLocal->Next(1, &pidl, NULL);
161 return hr;
162
163 if (hr == S_FALSE)
164 break;
165
166 LPWSTR name;
167 STRRET str = { STRRET_WSTR };
168 hr = m_UserLocalFolder->GetDisplayNameOf(pidl, SHGDN_FORPARSING | SHGDN_INFOLDER, &str);
169 if (FAILED(hr))
170 return hr;
171 StrRetToStrW(&str, pidl, &name);
172
174 FALSE,
176 ILClone(pidl),
177 NULL,
178 name
179 };
180
181 ILFree(pidl);
182
183 TRACE("Inserting item %d with name %S\n", m_hDsaCount, name);
185 TRACE("New index: %d\n", idx);
186
187 m_hDsaCount++;
188 }
189
190 // Then load the items for the common folder
191 TRACE("Loading Common entries...\n");
192 for (;;)
193 {
194 hr = allUsers->Next(1, &pidl, NULL);
196 return hr;
197
198 if (hr == S_FALSE)
199 break;
200
201 LPWSTR name;
202 STRRET str = { STRRET_WSTR };
203 hr = m_AllUSersFolder->GetDisplayNameOf(pidl, SHGDN_FORPARSING | SHGDN_INFOLDER, &str);
204 if (FAILED(hr))
205 return hr;
206 StrRetToStrW(&str, pidl, &name);
207
209 FALSE,
211 ILClone(pidl),
212 NULL,
213 name
214 };
215
216 ILFree(pidl);
217
218 // Try to find an existing entry with the same name, and makr it as shared.
219 // FIXME: This is sub-optimal, a hash table would be a lot more efficient.
220 BOOL bShared = FALSE;
221 for (int i = 0; i < (int)m_hDsaCount; i++)
222 {
224
226 pInfo->parseName, lstrlenW(pInfo->parseName),
227 info.parseName, lstrlenW(info.parseName));
228
229 if (order == CSTR_EQUAL)
230 {
231 TRACE("Item name already exists! Marking '%S' as shared ...\n", name);
232 bShared = TRUE;
233 pInfo->shared = TRUE;
234 pInfo->pidl2 = info.pidl;
236 break;
237 }
238 }
239
240 // If an entry was not found, add a new one for this item
241 if (!bShared)
242 {
243 TRACE("Inserting item %d with name %S\n", m_hDsaCount, name);
245 TRACE("New index: %d\n", idx);
246
247 m_hDsaCount++;
248 }
249 }
250
251 m_HwndOwner = hwndOwner;
252 m_Flags = flags;
253
254 return Reset();
255}
256
258{
259 HRESULT hr;
260
261 if (!m_hDsa)
262 {
263 Begin(hwndOwner, SHCONTF_FOLDERS | SHCONTF_NONFOLDERS);
264 }
265
266 TRACE("Searching for pidl { cb=%d } in a list of %d items\n", pcidl->mkid.cb, m_hDsaCount);
267
268 for (int i = 0; i < (int)m_hDsaCount; i++)
269 {
271 if (!pInfo)
272 return E_FAIL;
273
274 TRACE("Comparing with item at %d with parent %p and pidl { cb=%d }\n", i, pInfo->parent, pInfo->pidl->mkid.cb);
275
276 hr = pInfo->parent->CompareIDs(0, pInfo->pidl, pcidl);
278 return hr;
279
280 if (hr == S_OK)
281 {
282 *pinfo = *pInfo;
283 return S_OK;
284 }
285 else
286 {
287 TRACE("Comparison returned %d\n", (int) (short) (hr & 0xFFFF));
288 }
289 }
290
291 TRACE("Pidl not found\n");
293}
294
296{
297 if (!m_hDsa)
298 {
299 Begin(hwndOwner, SHCONTF_FOLDERS | SHCONTF_NONFOLDERS);
300 }
301
302 TRACE("Searching for '%S' in a list of %d items\n", strParsingName, m_hDsaCount);
303
304 for (int i = 0; i < (int) m_hDsaCount; i++)
305 {
307 if (!pInfo)
308 return E_FAIL;
309
311 pInfo->parseName, lstrlenW(pInfo->parseName),
312 strParsingName, lstrlenW(strParsingName));
313 switch (order)
314 {
315 case CSTR_EQUAL:
316 *pinfo = *pInfo;
317 return S_OK;
318 default:
319 continue;
320 }
321 }
322
323 TRACE("Pidl not found\n");
325}
326
328 ULONG celt,
329 LPITEMIDLIST *rgelt,
330 ULONG *pceltFetched)
331{
332 if (pceltFetched)
333 *pceltFetched = 0;
334
336 return S_FALSE;
337
338 for (int i = 0; i < (int)celt;)
339 {
341 if (!tinfo)
342 return E_FAIL;
343
344 LocalPidlInfo info = *tinfo;
345
346 TRACE("Returning next item at %d with parent %p and pidl { cb=%d }\n", m_hDsaIndex, info.parent, info.pidl->mkid.cb);
347
348 // FIXME: ILClone shouldn't be needed here! This should be causing leaks
349 if (rgelt) rgelt[i] = ILClone(info.pidl);
350 i++;
351
352 m_hDsaIndex++;
354 {
355 if (pceltFetched)
356 *pceltFetched = i;
357 return (i == (int)celt) ? S_OK : S_FALSE;
358 }
359 }
360
361 if (pceltFetched) *pceltFetched = celt;
362 return S_OK;
363}
364
366{
367 return Next(celt, NULL, NULL);
368}
369
371{
372 m_hDsaIndex = 0;
373 return S_OK;
374}
375
377 IEnumIDList **ppenum)
378{
380 return E_NOTIMPL;
381}
382
383//-----------------------------------------------------------------------------
384// CMergedFolder
385
387 m_UserLocal(NULL),
388 m_AllUsers(NULL),
389 m_EnumSource(NULL),
390 m_UserLocalPidl(NULL),
391 m_AllUsersPidl(NULL),
392 m_shellPidl(NULL)
393{
394}
395
397{
400}
401
402// IAugmentedShellFolder2
404{
405 if (lpGuid)
406 {
407 TRACE("FIXME: No idea how to handle the GUID\n");
408 return E_NOTIMPL;
409 }
410
411 TRACE("AddNameSpace %p %p\n", m_UserLocal.p, m_AllUsers.p);
412
413 // FIXME: Use a DSA to store the list of merged namespaces, together with their related info (psf, pidl, ...)
414 // For now, assume only 2 will ever be used, and ignore all the other data.
415 if (!m_UserLocal)
416 {
417 m_UserLocal = psf;
418 m_UserLocalPidl = ILClone(pcidl);
419 return S_OK;
420 }
421
422 if (m_AllUsers)
423 return E_FAIL;
424
425 m_AllUsers = psf;
426 m_AllUsersPidl = ILClone(pcidl);
427
428 m_EnumSource = new CComObject<CEnumMergedFolder>();
429 return m_EnumSource->SetSources(m_UserLocal, m_AllUsers);
430}
431
433{
435 return E_NOTIMPL;
436}
437
439{
441 return E_NOTIMPL;
442}
443
445{
447 return E_NOTIMPL;
448}
449
451{
453 return E_NOTIMPL;
454}
455
456// IShellFolder
458 HWND hwndOwner,
459 LPBC pbcReserved,
460 LPOLESTR lpszDisplayName,
461 ULONG *pchEaten,
462 LPITEMIDLIST *ppidl,
463 ULONG *pdwAttributes)
464{
465 HRESULT hr;
467
468 if (!ppidl)
469 return E_FAIL;
470
471 if (pchEaten)
472 *pchEaten = 0;
473
474 if (pdwAttributes)
475 *pdwAttributes = 0;
476
477 TRACE("ParseDisplayName name=%S\n", lpszDisplayName);
478
479 hr = m_EnumSource->FindByName(hwndOwner, lpszDisplayName, &info);
480 if (FAILED(hr))
481 {
483 }
484
485 *ppidl = ILClone(info.pidl);
486
487 if (pchEaten)
488 *pchEaten = lstrlenW(info.parseName);
489
490 if (pdwAttributes)
491 *pdwAttributes = info.parent->GetAttributesOf(1, (LPCITEMIDLIST*)ppidl, pdwAttributes);
492
493 return S_OK;
494}
495
497 HWND hwndOwner,
498 SHCONTF grfFlags,
499 IEnumIDList **ppenumIDList)
500{
501 TRACE("EnumObjects\n");
502 HRESULT hr = m_EnumSource->QueryInterface(IID_PPV_ARG(IEnumIDList, ppenumIDList));
504 return hr;
505 return m_EnumSource->Begin(hwndOwner, grfFlags);
506}
507
509 LPCITEMIDLIST pidl,
510 LPBC pbcReserved,
511 REFIID riid,
512 void **ppvOut)
513{
515 HRESULT hr;
516
517 hr = m_EnumSource->FindPidlInList(NULL, pidl, &info);
519 return hr;
520
521 TRACE("BindToObject shared = %d\n", info.shared);
522
523 if (!info.shared)
524 return info.parent->BindToObject(info.pidl, pbcReserved, riid, ppvOut);
525
526 if (riid != IID_IShellFolder)
527 return E_FAIL;
528
529 // Construct a child MergedFolder and return it
530 CComPtr<IShellFolder> fld1;
531 CComPtr<IShellFolder> fld2;
532
533 // In shared folders, the user one takes precedence over the common one, so it will always be on pidl1
534 hr = m_UserLocal->BindToObject(info.pidl, pbcReserved, IID_PPV_ARG(IShellFolder, &fld1));
536 return hr;
537
538 hr = m_AllUsers->BindToObject(info.pidl2, pbcReserved, IID_PPV_ARG(IShellFolder, &fld2));
540 return hr;
541
542 CComPtr<IAugmentedShellFolder> pasf;
543 hr = CMergedFolder_CreateInstance(IID_PPV_ARG(IAugmentedShellFolder, &pasf));
545 return hr;
546
547 hr = pasf->QueryInterface(riid, ppvOut);
549 return hr;
550
551 hr = pasf->AddNameSpace(NULL, fld1, info.pidl, 0xFF00);
553 return hr;
554
555 hr = pasf->AddNameSpace(NULL, fld2, info.pidl2, 0x0000);
557 return hr;
558
559 return hr;
560}
561
563 LPCITEMIDLIST pidl,
564 LPBC pbcReserved,
565 REFIID riid,
566 void **ppvObj)
567{
569 return E_NOTIMPL;
570}
571
574 LPCITEMIDLIST pidl1,
575 LPCITEMIDLIST pidl2)
576{
577 TRACE("CompareIDs\n");
578 return m_UserLocal->CompareIDs(lParam, pidl1, pidl2);
579}
580
582 HWND hwndOwner,
583 REFIID riid,
584 void **ppvOut)
585{
587 return E_NOTIMPL;
588}
589
591 UINT cidl,
593 SFGAOF *rgfInOut)
594{
596 HRESULT hr;
597
598 TRACE("GetAttributesOf\n");
599
600 for (int i = 0; i < (int)cidl; i++)
601 {
602 LPCITEMIDLIST pidl = apidl[i];
603
604 hr = m_EnumSource->FindPidlInList(NULL, pidl, &info);
606 return hr;
607
608 pidl = info.pidl;
609
610 SFGAOF * pinOut1 = rgfInOut ? rgfInOut + i : NULL;
611
612 hr = info.parent->GetAttributesOf(1, &pidl, pinOut1);
613
615 return hr;
616 }
617
618 return S_OK;
619}
620
622 HWND hwndOwner,
623 UINT cidl,
625 REFIID riid,
626 UINT *prgfInOut,
627 void **ppvOut)
628{
630 HRESULT hr;
631
632 TRACE("GetUIObjectOf\n");
633
634 for (int i = 0; i < (int)cidl; i++)
635 {
636 LPCITEMIDLIST pidl = apidl[i];
637
638 TRACE("Processing GetUIObjectOf item %d of %u...\n", i, cidl);
639
640 hr = m_EnumSource->FindPidlInList(hwndOwner, pidl, &info);
642 return hr;
643
644 pidl = info.pidl;
645
646 TRACE("FindPidlInList succeeded with parent %p and pidl { db=%d }\n", info.parent, info.pidl->mkid.cb);
647
648 UINT * pinOut1 = prgfInOut ? prgfInOut+i : NULL;
649 void** ppvOut1 = ppvOut ? ppvOut + i : NULL;
650
651 hr = info.parent->GetUIObjectOf(hwndOwner, 1, &pidl, riid, pinOut1, ppvOut1);
652
654 return hr;
655 }
656
657 return S_OK;
658}
659
661 LPCITEMIDLIST pidl,
663 STRRET *lpName)
664{
666 HRESULT hr;
667
668 TRACE("GetDisplayNameOf\n");
669
670 hr = m_EnumSource->FindPidlInList(NULL, pidl, &info);
672 return hr;
673
674 hr = info.parent->GetDisplayNameOf(info.pidl, uFlags, lpName);
675
677 return hr;
678 return S_OK;
679}
680
682 HWND hwnd,
683 LPCITEMIDLIST pidl,
684 LPCOLESTR lpszName,
686 LPITEMIDLIST *ppidlOut)
687{
689 return E_NOTIMPL;
690}
691
692// IPersist
694{
696 return E_NOTIMPL;
697}
698
699// IPersistFolder
701{
702 m_shellPidl = ILClone(pidl);
703 return S_OK;
704}
705
706// IPersistFolder2
708{
709 if (pidl)
710 *pidl = m_shellPidl;
711 return S_OK;
712}
713
714// IShellFolder2
716 GUID *lpguid)
717{
719 return E_NOTIMPL;
720}
721
723 IEnumExtraSearch **ppenum)
724{
726 return E_NOTIMPL;
727}
728
731 ULONG *pSort,
732 ULONG *pDisplay)
733{
735 return E_NOTIMPL;
736}
737
739 UINT iColumn,
740 SHCOLSTATEF *pcsFlags)
741{
743 return E_NOTIMPL;
744}
745
747 LPCITEMIDLIST pidl,
748 const SHCOLUMNID *pscid,
749 VARIANT *pv)
750{
752 HRESULT hr;
753
754 TRACE("GetDetailsEx\n");
755
756 hr = m_EnumSource->FindPidlInList(NULL, pidl, &info);
758 return hr;
759
760 CComPtr<IShellFolder2> parent2;
761 hr = info.parent->QueryInterface(IID_PPV_ARG(IShellFolder2, &parent2));
763 return hr;
764
765 hr = parent2->GetDetailsEx(info.pidl, pscid, pv);
767 return hr;
768 return S_OK;
769}
770
772 LPCITEMIDLIST pidl,
773 UINT iColumn,
774 SHELLDETAILS *psd)
775{
777 HRESULT hr;
778
779 TRACE("GetDetailsOf\n");
780
781 hr = m_EnumSource->FindPidlInList(NULL, pidl, &info);
783 return hr;
784
785 CComPtr<IShellFolder2> parent2;
786 hr = info.parent->QueryInterface(IID_PPV_ARG(IShellFolder2, &parent2));
788 return hr;
789
790 hr = parent2->GetDetailsOf(info.pidl, iColumn, psd);
791
793 return hr;
794 return S_OK;
795}
796
798 UINT iColumn,
799 SHCOLUMNID *pscid)
800{
802 return E_NOTIMPL;
803}
804
805// IAugmentedShellFolder3
807{
809 return E_NOTIMPL;
810}
811
812extern "C"
814{
815 return ShellObjectCreator<CMergedFolder>(riid, ppv);
816}
HRESULT WINAPI RSHELL_CMergedFolder_CreateInstance(REFIID riid, LPVOID *ppv)
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 UINT32 ACPI_STATUS const char UINT32 const char const char UINT32 const char BOOLEAN Begin
Definition: acpixf.h:1301
#define WINE_DEFAULT_DEBUG_CHANNEL(t)
Definition: precomp.h:23
#define STDMETHOD(m)
Definition: basetyps.h:62
#define STDMETHODCALLTYPE
Definition: bdasup.h:9
#define UNIMPLEMENTED
Definition: debug.h:115
STDMETHOD() Reset() override
CComPtr< IShellFolder > m_AllUSersFolder
STDMETHOD() Clone(IEnumIDList **ppenum) override
HRESULT FindByName(HWND hwndOwner, LPCWSTR strParsingName, LocalPidlInfo *pinfo)
static int CALLBACK s_DsaDeleteCallback(void *pItem, void *pData)
HRESULT Begin(HWND hwndOwner, SHCONTF flags)
HRESULT SetSources(IShellFolder *userLocal, IShellFolder *allUSers)
CComPtr< IShellFolder > m_UserLocalFolder
virtual ~CEnumMergedFolder()
STDMETHOD() Skip(ULONG celt) override
int DsaDeleteCallback(LocalPidlInfo *info)
STDMETHOD() Next(ULONG celt, LPITEMIDLIST *rgelt, ULONG *pceltFetched) override
HRESULT FindPidlInList(HWND hwndOwner, LPCITEMIDLIST pcidl, LocalPidlInfo *pinfo)
virtual ~CMergedFolder()
STDMETHOD() ParseDisplayName(HWND hwndOwner, LPBC pbcReserved, LPOLESTR lpszDisplayName, ULONG *pchEaten, LPITEMIDLIST *ppidl, ULONG *pdwAttributes) override
LPITEMIDLIST m_shellPidl
Definition: CMergedFolder.h:70
STDMETHOD() CreateViewObject(HWND hwndOwner, REFIID riid, void **ppvOut) override
STDMETHOD() GetAttributesOf(UINT cidl, PCUITEMID_CHILD_ARRAY apidl, SFGAOF *rgfInOut) override
STDMETHOD() CompareIDs(LPARAM lParam, LPCITEMIDLIST pidl1, LPCITEMIDLIST pidl2) override
CComPtr< IShellFolder > m_UserLocal
Definition: CMergedFolder.h:64
STDMETHOD() AddNameSpace(LPGUID lpGuid, IShellFolder *psf, LPCITEMIDLIST pcidl, ULONG dwUnknown) override
STDMETHOD() GetDefaultColumnState(UINT iColumn, SHCOLSTATEF *pcsFlags) override
STDMETHOD() GetDefaultColumn(DWORD dwReserved, ULONG *pSort, ULONG *pDisplay) override
STDMETHOD() GetDisplayNameOf(LPCITEMIDLIST pidl, SHGDNF uFlags, STRRET *lpName) override
STDMETHOD() GetNameSpaceID(LPCITEMIDLIST pcidl, LPGUID lpGuid) override
STDMETHOD() GetDefaultSearchGUID(GUID *lpguid) override
STDMETHOD() QueryNameSpace(ULONG dwUnknown, LPGUID lpGuid, IShellFolder **ppsf) override
STDMETHOD() GetDetailsEx(LPCITEMIDLIST pidl, const SHCOLUMNID *pscid, VARIANT *pv) override
STDMETHOD() GetDetailsOf(LPCITEMIDLIST pidl, UINT iColumn, SHELLDETAILS *psd) override
STDMETHOD() MapColumnToSCID(UINT iColumn, SHCOLUMNID *pscid) override
STDMETHOD() EnumSearches(IEnumExtraSearch **ppenum) override
STDMETHOD() EnumObjects(HWND hwndOwner, SHCONTF grfFlags, IEnumIDList **ppenumIDList) override
CComPtr< IShellFolder > m_AllUsers
Definition: CMergedFolder.h:65
LPITEMIDLIST m_AllUsersPidl
Definition: CMergedFolder.h:69
STDMETHOD() QueryNameSpace2(ULONG, QUERYNAMESPACEINFO *) override
STDMETHOD() SetNameOf(HWND hwnd, LPCITEMIDLIST pidl, LPCOLESTR lpszName, SHGDNF uFlags, LPITEMIDLIST *ppidlOut) override
STDMETHOD() GetUIObjectOf(HWND hwndOwner, UINT cidl, PCUITEMID_CHILD_ARRAY apidl, REFIID riid, UINT *prgfInOut, void **ppvOut) override
STDMETHOD() BindToObject(LPCITEMIDLIST pidl, LPBC pbcReserved, REFIID riid, void **ppvOut) override
STDMETHOD() Initialize(PCIDLIST_ABSOLUTE pidl) override
STDMETHOD() UnWrapIDList(LPCITEMIDLIST pcidl, LONG lUnknown, IShellFolder **ppsf, LPITEMIDLIST *ppidl1, LPITEMIDLIST *ppidl2, LONG *lpUnknown) override
CComPtr< CEnumMergedFolder > m_EnumSource
Definition: CMergedFolder.h:66
LPITEMIDLIST m_UserLocalPidl
Definition: CMergedFolder.h:68
STDMETHOD() BindToStorage(LPCITEMIDLIST pidl, LPBC pbcReserved, REFIID riid, void **ppvObj) override
STDMETHOD() GetClassID(CLSID *lpClassId) override
STDMETHOD() EnumNameSpace(ULONG dwUnknown, PULONG lpUnknown) override
STDMETHOD() GetCurFolder(PIDLIST_ABSOLUTE *pidl) override
LPARAM lParam
Definition: combotst.c:139
#define E_NOTIMPL
Definition: ddrawi.h:99
#define E_FAIL
Definition: ddrawi.h:102
#define NULL
Definition: types.h:112
#define TRUE
Definition: types.h:120
#define FALSE
Definition: types.h:117
unsigned int idx
Definition: utils.c:41
UINT uFlags
Definition: api.c:59
#define CALLBACK
Definition: compat.h:35
#define lstrlenW
Definition: compat.h:750
#define FAILED_UNEXPECTEDLY(hr)
Definition: precomp.h:121
HRESULT WINAPI StrRetToStrW(LPSTRRET lpStrRet, const ITEMIDLIST *pidl, LPWSTR *ppszName)
Definition: string.c:1631
unsigned int(__cdecl typeof(jpeg_read_scanlines))(struct jpeg_decompress_struct *
Definition: typeof.h:31
LPVOID WINAPI DSA_GetItemPtr(HDSA hdsa, INT nIndex)
Definition: dsa.c:162
VOID WINAPI DSA_EnumCallback(HDSA hdsa, PFNDSAENUMCALLBACK enumProc, LPVOID lParam)
Definition: dsa.c:397
BOOL WINAPI DSA_DeleteAllItems(HDSA hdsa)
Definition: dsa.c:367
void WINAPI DSA_DestroyCallback(HDSA hdsa, PFNDSAENUMCALLBACK enumProc, LPVOID lParam)
Definition: dsa.c:432
INT WINAPI DSA_InsertItem(HDSA hdsa, INT nIndex, LPVOID pSrc)
Definition: dsa.c:251
HDSA WINAPI DSA_Create(INT nSize, INT nGrow)
Definition: dsa.c:71
unsigned int BOOL
Definition: ntddk_ex.h:94
unsigned long DWORD
Definition: ntddk_ex.h:95
GLbitfield flags
Definition: glext.h:7161
GLuint GLdouble GLdouble GLint GLint order
Definition: glext.h:11194
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
VOID WINAPI CoTaskMemFree(LPVOID ptr)
Definition: ifs.c:442
REFIID riid
Definition: atlbase.h:39
REFIID LPVOID * ppv
Definition: atlbase.h:39
ULONG SFGAOF
Definition: shobjidl.idl:228
HRESULT CompareIDs([in] LPARAM lParam, [in] PCUIDLIST_RELATIVE pidl1, [in] PCUIDLIST_RELATIVE pidl2)
DWORD SHGDNF
Definition: shobjidl.idl:169
DWORD SHCONTF
Definition: shobjidl.idl:187
HRESULT QueryInterface([in] REFIID riid, [out, iid_is(riid)] void **ppvObject)
#define S_OK
Definition: intsafe.h:52
#define FAILED(hr)
Definition: intsafe.h:51
LCID WINAPI GetThreadLocale(void)
Definition: lang.c:1459
INT WINAPI CompareStringW(LCID lcid, DWORD flags, LPCWSTR str1, INT len1, LPCWSTR str2, INT len2)
Definition: lang.c:2671
#define BEGIN_COM_MAP(x)
Definition: atlcom.h:581
#define COM_INTERFACE_ENTRY_IID(iid, x)
Definition: atlcom.h:601
#define DECLARE_PROTECT_FINAL_CONSTRUCT()
Definition: atlcom.h:679
#define DECLARE_NOT_AGGREGATABLE(x)
Definition: atlcom.h:651
#define END_COM_MAP()
Definition: atlcom.h:592
#define ERROR_FILE_NOT_FOUND
Definition: disk.h:79
static HKEY override
Definition: compobj.c:81
static LPOLESTR
Definition: stg_prop.c:27
static SHCONTF
Definition: ordinal.c:64
static ATOM item
Definition: dde.c:856
_In_ HANDLE _In_ DWORD _In_ DWORD _Inout_opt_ LPOVERLAPPED _In_opt_ LPTRANSMIT_FILE_BUFFERS _In_ DWORD dwReserved
Definition: mswsock.h:95
unsigned int UINT
Definition: ndis.h:50
interface IBindCtx * LPBC
Definition: objfwd.h:18
long LONG
Definition: pedump.c:60
LPITEMIDLIST WINAPI ILClone(LPCITEMIDLIST pidl)
Definition: pidl.c:237
void WINAPI ILFree(LPITEMIDLIST pidl)
Definition: pidl.c:938
#define DSA_APPEND
Definition: commctrl.h:4787
#define REFIID
Definition: guiddef.h:118
const WCHAR * str
#define CMergedFolder_CreateInstance
Definition: shellmenu.h:93
HRESULT hr
Definition: shlfolder.c:183
ITEMIDLIST UNALIGNED * LPITEMIDLIST
Definition: shtypes.idl:41
@ STRRET_WSTR
Definition: shtypes.idl:85
const PCUITEMID_CHILD * PCUITEMID_CHILD_ARRAY
Definition: shtypes.idl:71
const ITEMIDLIST UNALIGNED * LPCITEMIDLIST
Definition: shtypes.idl:42
DWORD SHCOLSTATEF
Definition: shtypes.idl:142
#define TRACE(s)
Definition: solgame.cpp:4
LPITEMIDLIST pidl
LPITEMIDLIST pidl2
IShellFolder * parent
Definition: dsa.c:45
Definition: name.c:39
TW_UINT32 TW_UINT16 TW_UINT16 TW_MEMREF pData
Definition: twain.h:1830
uint32_t * PULONG
Definition: typedefs.h:59
uint32_t ULONG
Definition: typedefs.h:59
_In_ LPCSTR lpName
Definition: winbase.h:2789
_In_ LONG _In_ HWND hwnd
Definition: winddi.h:4023
LONG_PTR LPARAM
Definition: windef.h:208
#define WINAPI
Definition: msvc.h:6
#define S_FALSE
Definition: winerror.h:2357
#define HRESULT_FROM_WIN32(x)
Definition: winerror.h:92
#define NORM_IGNORECASE
Definition: winnls.h:176
#define CSTR_EQUAL
Definition: winnls.h:456
#define IID_PPV_ARG(Itype, ppType)
WCHAR * LPWSTR
Definition: xmlstorage.h:184
const WCHAR * LPCWSTR
Definition: xmlstorage.h:185