ReactOS 0.4.16-dev-321-g63bb46a
CNetFolder.cpp
Go to the documentation of this file.
1/*
2 * Network Places (Neighbourhood) folder
3 *
4 * Copyright 1997 Marcus Meissner
5 * Copyright 1998, 1999, 2002 Juergen Schmied
6 * Copyright 2003 Mike McCormack for Codeweavers
7 * Copyright 2009 Andrew Hill
8 *
9 * This library is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU Lesser General Public
11 * License as published by the Free Software Foundation; either
12 * version 2.1 of the License, or (at your option) any later version.
13 *
14 * This library is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17 * Lesser General Public License for more details.
18 *
19 * You should have received a copy of the GNU Lesser General Public
20 * License along with this library; if not, write to the Free Software
21 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
22 */
23
24#include <precomp.h>
25
27
28#define HACKY_UNC_PATHS
29
30#ifdef HACKY_UNC_PATHS
32{
33 int cbData = sizeof(WORD) + sizeof(WCHAR) * (wcslen(lpNetworkPlace)+1);
34 LPITEMIDLIST pidl = (LPITEMIDLIST)SHAlloc(cbData + sizeof(WORD));
35 if (!pidl)
36 return NULL;
37
38 pidl->mkid.cb = cbData;
39 wcscpy((WCHAR*)&pidl->mkid.abID[0], lpNetworkPlace);
40 *(WORD*)((char*)pidl + cbData) = 0;
41
42 return pidl;
43}
44#endif
45
46/***********************************************************************
47* IShellFolder implementation
48*/
49
51{
52 CComPtr<IDefaultExtractIconInit> initIcon;
55 return hr;
56
57 initIcon->SetNormalIcon(swShell32Name, -IDI_SHELL_NETWORK_FOLDER);
58
59 return initIcon->QueryInterface(riid, ppvOut);
60}
61
63 HWND hwnd,
64 IDataObject *pdtobj,
65 UINT uMsg,
68{
69 return SHELL32_DefaultContextMenuCallBack(psf, pdtobj, uMsg);
70}
71
73 public CEnumIDListBase
74{
75 public:
81
83 COM_INTERFACE_ENTRY_IID(IID_IEnumIDList, IEnumIDList)
85};
86
92};
93
94#define COLUMN_NAME 0
95#define COLUMN_CATEGORY 1
96#define COLUMN_WORKGROUP 2
97#define COLUMN_NETLOCATION 3
98
99#define NETWORKPLACESSHELLVIEWCOLUMNS 4
100
102{
103}
104
106{
107}
108
110{
112 return E_FAIL;
113
114 return S_OK;
115}
116
117/**************************************************************************
118 * CDrivesFolderEnum::CreateMyCompEnumList()
119 */
120
122{
123 BOOL bRet = TRUE;
124 DWORD dRet;
125 HANDLE hEnum;
126 LPNETRESOURCE lpRes;
127 DWORD dSize = 0x1000;
128 DWORD dCount = -1;
129 LPNETRESOURCE lpCur;
130
131 dRet = WNetOpenEnum(RESOURCE_GLOBALNET, RESOURCETYPE_DISK, 0, lpNet, &hEnum);
132 if (dRet != WN_SUCCESS)
133 {
134 ERR("WNetOpenEnum() failed: %x\n", dRet);
135 return FALSE;
136 }
137
138 lpRes = (LPNETRESOURCE)CoTaskMemAlloc(dSize);
139 if (!lpRes)
140 {
141 ERR("CoTaskMemAlloc() failed\n");
142 WNetCloseEnum(hEnum);
143 return FALSE;
144 }
145
146 do
147 {
148 dSize = 0x1000;
149 dCount = -1;
150
151 memset(lpRes, 0, dSize);
152 dRet = WNetEnumResource(hEnum, &dCount, lpRes, &dSize);
153 if (dRet == WN_SUCCESS || dRet == WN_MORE_DATA)
154 {
155 lpCur = lpRes;
156 for (; dCount; dCount--)
157 {
158 TRACE("lpRemoteName: %S\n", lpCur->lpRemoteName);
159
161 {
162 TRACE("Found provider: %S\n", lpCur->lpProvider);
163 EnumerateRec(lpCur);
164 }
165 else
166 {
167 LPITEMIDLIST pidl;
168
169#ifdef HACKY_UNC_PATHS
171#endif
172 if (pidl != NULL)
173 bRet = AddToEnumList(pidl);
174 else
175 {
176 ERR("ILCreateFromPathW() failed\n");
177 bRet = FALSE;
178 break;
179 }
180 }
181
182 lpCur++;
183 }
184 }
185 } while (dRet != WN_NO_MORE_ENTRIES);
186
187 CoTaskMemFree(lpRes);
188 WNetCloseEnum(hEnum);
189
190 TRACE("Done: %u\n", bRet);
191
192 return bRet;
193}
194
196{
197 BOOL bRet = TRUE;
198
199 TRACE("(%p)->(flags=0x%08x)\n", this, dwFlags);
200
201 /* enumerate the folders */
202 if (dwFlags & SHCONTF_FOLDERS)
203 {
204 bRet = EnumerateRec(NULL);
205 }
206
207 return bRet;
208}
209
210/**************************************************************************
211 * CNetFolder background context menu
212 */
215{
216 enum { IDC_PROPERTIES };
217 if (uMsg == DFM_INVOKECOMMAND && wParam == IDC_PROPERTIES)
218 {
219 return SHELL_ExecuteControlPanelCPL(hwnd, L"ncpa.cpl") ? S_OK : E_FAIL;
220 }
221 else if (uMsg == DFM_MERGECONTEXTMENU) // TODO: DFM_MERGECONTEXTMENU_BOTTOM
222 {
223 QCMINFO *pqcminfo = (QCMINFO*)lParam;
224 HMENU hpopup = CreatePopupMenu();
226 pqcminfo->idCmdFirst = Shell_MergeMenus(pqcminfo->hmenu, hpopup, pqcminfo->indexMenu, pqcminfo->idCmdFirst, pqcminfo->idCmdLast, MM_ADDSEPARATOR);
227 DestroyMenu(hpopup);
228 return S_OK;
229 }
230 return SHELL32_DefaultContextMenuCallBack(psf, pdtobj, uMsg);
231}
232
233/**************************************************************************
234 * CNetFolder
235 */
236
238{
239 pidlRoot = NULL;
240}
241
243{
244 if (pidlRoot)
246}
247
248/**************************************************************************
249* CNetFolder::ParseDisplayName
250*/
251HRESULT WINAPI CNetFolder::ParseDisplayName(HWND hwndOwner, LPBC pbcReserved, LPOLESTR lpszDisplayName,
252 DWORD *pchEaten, PIDLIST_RELATIVE *ppidl, DWORD *pdwAttributes)
253{
255#ifdef HACKY_UNC_PATHS
256 /* FIXME: the code below is an ugly hack */
257
258 /* Can we use a CFSFolder on that path? */
259 DWORD attrs = GetFileAttributes(lpszDisplayName);
260 if ((attrs & FILE_ATTRIBUTE_DIRECTORY))
261 {
262 if (pchEaten)
263 *pchEaten = 0; /* strange but like the original */
264
265 /* YES WE CAN */
266
267 /* Create our hacky pidl */
268 LPITEMIDLIST pidl = ILCreateFromNetworkPlaceW(lpszDisplayName);
269
270 *ppidl = pidl;
271 if (pdwAttributes)
272 *pdwAttributes = SFGAO_FILESYSTEM | SFGAO_CANLINK | SFGAO_FOLDER | SFGAO_HASSUBFOLDER | SFGAO_FILESYSANCESTOR;
273 return S_OK;
274 }
275#endif
276
277 TRACE("(%p)->(HWND=%p,%p,%p=%s,%p,pidl=%p,%p)\n", this,
278 hwndOwner, pbcReserved, lpszDisplayName, debugstr_w (lpszDisplayName),
279 pchEaten, ppidl, pdwAttributes);
280
281 *ppidl = 0;
282 if (pchEaten)
283 *pchEaten = 0; /* strange but like the original */
284
285 TRACE("(%p)->(-- ret=0x%08x)\n", this, hr);
286
287 return hr;
288}
289
290/**************************************************************************
291* CNetFolder::EnumObjects
292*/
293HRESULT WINAPI CNetFolder::EnumObjects(HWND hwndOwner, DWORD dwFlags, LPENUMIDLIST *ppEnumIDList)
294{
295 return ShellObjectCreatorInit<CNetFolderEnum>(hwndOwner, dwFlags, IID_PPV_ARG(IEnumIDList, ppEnumIDList));
296}
297
298/**************************************************************************
299* CNetFolder::BindToObject
300*/
302{
303#ifdef HACKY_UNC_PATHS
304 /* Create the target folder info */
305 PERSIST_FOLDER_TARGET_INFO pfti = {0};
306 pfti.dwAttributes = -1;
307 pfti.csidl = -1;
308 StringCchCopyW(pfti.szTargetParsingName, MAX_PATH, (WCHAR*)pidl->mkid.abID);
309
310 return SHELL32_BindToSF(pidlRoot, &pfti, pidl, &CLSID_ShellFSFolder, riid, ppvOut);
311#else
312 return E_NOTIMPL;
313#endif
314}
315
316/**************************************************************************
317* CNetFolder::BindToStorage
318*/
320{
321 FIXME("(%p)->(pidl=%p,%p,%s,%p) stub\n", this,
322 pidl, pbcReserved, shdebugstr_guid (&riid), ppvOut);
323
324 *ppvOut = NULL;
325 return E_NOTIMPL;
326}
327
328/**************************************************************************
329* CNetFolder::CompareIDs
330*/
331
333{
334 return E_NOTIMPL;
335}
336
337/**************************************************************************
338* CNetFolder::CreateViewObject
339*/
341{
342 CComPtr<IShellView> pShellView;
344
345 TRACE("(%p)->(hwnd=%p,%s,%p)\n", this,
346 hwndOwner, shdebugstr_guid (&riid), ppvOut);
347
348 if (!ppvOut)
349 return hr;
350
351 *ppvOut = NULL;
352
353 if (IsEqualIID(riid, IID_IDropTarget))
354 {
355 WARN("IDropTarget not implemented\n");
356 hr = E_NOTIMPL;
357 }
358 else if (IsEqualIID(riid, IID_IContextMenu))
359 {
361 0, NULL, (IContextMenu**)ppvOut);
362 }
363 else if (IsEqualIID(riid, IID_IShellView))
364 {
365 SFV_CREATE sfvparams = {sizeof(SFV_CREATE), this};
366 hr = SHCreateShellFolderView(&sfvparams, (IShellView**)ppvOut);
367 }
368 TRACE("-- (%p)->(interface=%p)\n", this, ppvOut);
369 return hr;
370}
371
372/**************************************************************************
373* CNetFolder::GetAttributesOf
374*/
376{
377 static const DWORD dwNethoodAttributes =
378 SFGAO_STORAGE | SFGAO_HASPROPSHEET | SFGAO_STORAGEANCESTOR |
379 SFGAO_FILESYSANCESTOR | SFGAO_FOLDER | SFGAO_FILESYSTEM | SFGAO_HASSUBFOLDER | SFGAO_CANRENAME | SFGAO_CANDELETE;
380 HRESULT hr = S_OK;
381
382 TRACE("(%p)->(cidl=%d apidl=%p mask=%p (0x%08x))\n", this,
383 cidl, apidl, rgfInOut, rgfInOut ? *rgfInOut : 0);
384
385 if (!rgfInOut)
386 return E_INVALIDARG;
387 if (cidl && !apidl)
388 return E_INVALIDARG;
389
390 if (*rgfInOut == 0)
391 *rgfInOut = ~0;
392
393 if(cidl == 0)
394 *rgfInOut = dwNethoodAttributes;
395 else
396 {
397 /* FIXME: Implement when enumerating items is implemented */
398#ifdef HACKY_UNC_PATHS
399 *rgfInOut = SFGAO_FILESYSTEM | SFGAO_CANLINK | SFGAO_FOLDER | SFGAO_HASSUBFOLDER | SFGAO_FILESYSANCESTOR;
400#endif
401 }
402
403 /* make sure SFGAO_VALIDATE is cleared, some apps depend on that */
404 *rgfInOut &= ~SFGAO_VALIDATE;
405
406 TRACE("-- result=0x%08x\n", *rgfInOut);
407 return hr;
408}
409
410/**************************************************************************
411* CNetFolder::GetUIObjectOf
412*
413* PARAMETERS
414* hwndOwner [in] Parent window for any output
415* cidl [in] array size
416* apidl [in] simple pidl array
417* riid [in] Requested Interface
418* prgfInOut [ ] reserved
419* ppvObject [out] Resulting Interface
420*
421*/
423 UINT * prgfInOut, LPVOID * ppvOut)
424{
425 LPVOID pObj = NULL;
427
428 TRACE("(%p)->(%p,%u,apidl=%p,%s,%p,%p)\n", this,
429 hwndOwner, cidl, apidl, shdebugstr_guid (&riid), prgfInOut, ppvOut);
430
431 if (!ppvOut)
432 return hr;
433
434 *ppvOut = NULL;
435
436 if (IsEqualIID(riid, IID_IContextMenu) && (cidl >= 1))
437 {
438 IContextMenu * pCm = NULL;
439 HKEY hkey;
440 UINT cKeys = 0;
441 AddClassKeyToArray(L"Folder", &hkey, &cKeys);
442 hr = CDefFolderMenu_Create2(pidlRoot, hwndOwner, cidl, apidl, this, NetFolderMenuCallback, cKeys, &hkey, &pCm);
443 pObj = pCm;
444 }
445 else if (IsEqualIID(riid, IID_IDataObject) && (cidl >= 1))
446 {
447 IDataObject * pDo = NULL;
448 hr = IDataObject_Constructor (hwndOwner, pidlRoot, apidl, cidl, TRUE, &pDo);
449 pObj = pDo;
450 }
451 else if ((IsEqualIID(riid, IID_IExtractIconA) || IsEqualIID(riid, IID_IExtractIconW)) && (cidl == 1))
452 {
453 hr = CNetFolderExtractIcon_CreateInstance(apidl[0], riid, &pObj);
454 }
455 else if (IsEqualIID(riid, IID_IDropTarget) && (cidl >= 1))
456 {
457 IDropTarget * pDt = NULL;
459 pObj = pDt;
460 }
461 else
463
464 if (SUCCEEDED(hr) && !pObj)
466
467 *ppvOut = pObj;
468 TRACE("(%p)->hr=0x%08x\n", this, hr);
469 return hr;
470}
471
472/**************************************************************************
473* CNetFolder::GetDisplayNameOf
474*
475*/
477{
478 if (!strRet || !pidl || !pidl->mkid.cb)
479 return E_INVALIDARG;
480
481#ifdef HACKY_UNC_PATHS
482 return SHSetStrRet(strRet, (LPCWSTR)pidl->mkid.abID);
483#endif
484 return E_NOTIMPL;
485}
486
487/**************************************************************************
488* CNetFolder::SetNameOf
489* Changes the name of a file object or subfolder, possibly changing its item
490* identifier in the process.
491*
492* PARAMETERS
493* hwndOwner [in] Owner window for output
494* pidl [in] simple pidl of item to change
495* lpszName [in] the items new display name
496* dwFlags [in] SHGNO formatting flags
497* ppidlOut [out] simple pidl returned
498*/
499HRESULT WINAPI CNetFolder::SetNameOf(HWND hwndOwner, PCUITEMID_CHILD pidl, /*simple pidl */
500 LPCOLESTR lpName, DWORD dwFlags, PITEMID_CHILD *pPidlOut)
501{
502 FIXME("(%p)->(%p,pidl=%p,%s,%u,%p)\n", this,
503 hwndOwner, pidl, debugstr_w (lpName), dwFlags, pPidlOut);
504 return E_FAIL;
505}
506
508{
509 FIXME("(%p)\n", this);
510 return E_NOTIMPL;
511}
512
514{
515 FIXME("(%p)\n", this);
516 return E_NOTIMPL;
517}
518
520{
521 TRACE("(%p)\n", this);
522
523 if (pSort)
524 *pSort = 0;
525 if (pDisplay)
526 *pDisplay = 0;
527
528 return S_OK;
529}
530
532{
533 TRACE("(%p)\n", this);
534
535 if (!pcsFlags || iColumn >= NETWORKPLACESSHELLVIEWCOLUMNS)
536 return E_INVALIDARG;
537 *pcsFlags = NetworkPlacesSFHeader[iColumn].colstate;
538 return S_OK;
539}
540
542{
543 FIXME("(%p)\n", this);
544 return E_NOTIMPL;
545}
546
548{
549 if (iColumn >= NETWORKPLACESSHELLVIEWCOLUMNS)
550 return E_FAIL;
551
552 psd->fmt = NetworkPlacesSFHeader[iColumn].fmt;
553 psd->cxChar = NetworkPlacesSFHeader[iColumn].cxChar;
554 if (pidl == NULL)
555 return SHSetStrRet(&psd->str, NetworkPlacesSFHeader[iColumn].colnameid);
556
557 if (iColumn == COLUMN_NAME)
558 return GetDisplayNameOf(pidl, SHGDN_NORMAL, &psd->str);
559
560 FIXME("(%p)->(%p %i %p)\n", this, pidl, iColumn, psd);
561
562 return E_NOTIMPL;
563}
564
566{
567 FIXME("(%p)\n", this);
568
569 return E_NOTIMPL;
570}
571
572/************************************************************************
573 * CNetFolder::GetClassID
574 */
576{
577 TRACE("(%p)\n", this);
578
579 if (!lpClassId)
580 return E_POINTER;
581
582 *lpClassId = CLSID_NetworkPlaces;
583
584 return S_OK;
585}
586
587/************************************************************************
588 * CNetFolder::Initialize
589 *
590 * NOTES: it makes no sense to change the pidl
591 */
593{
594 if (pidlRoot)
596
597 pidlRoot = ILClone(pidl);
598 return S_OK;
599}
600
601/**************************************************************************
602 * CNetFolder::GetCurFolder
603 */
605{
606 TRACE("(%p)->(%p)\n", this, pidl);
607
608 if (!pidl)
609 return E_POINTER;
610
611 *pidl = ILClone(pidlRoot);
612
613 return S_OK;
614}
HRESULT WINAPI SHCreateShellFolderView(const SFV_CREATE *pcsfv, IShellView **ppsv)
Definition: CDefView.cpp:4663
HRESULT WINAPI CDefFolderMenu_Create2(PCIDLIST_ABSOLUTE pidlFolder, HWND hwnd, UINT cidl, PCUITEMID_CHILD_ARRAY apidl, IShellFolder *psf, LPFNDFMCALLBACK lpfn, UINT nKeys, const HKEY *ahkeyClsKeys, IContextMenu **ppcm)
HRESULT WINAPI SHCreateDefaultExtractIcon(REFIID riid, void **ppv)
HRESULT IDataObject_Constructor(HWND hwndOwner, PCIDLIST_ABSOLUTE pMyPidl, PCUIDLIST_RELATIVE_ARRAY apidl, UINT cidl, BOOL bExtendedObject, IDataObject **dataObject)
HRESULT CNetFolderExtractIcon_CreateInstance(LPCITEMIDLIST pidl, REFIID riid, LPVOID *ppvOut)
Definition: CNetFolder.cpp:50
static HRESULT CALLBACK CNetFolderBackgroundMenuCB(IShellFolder *psf, HWND hwnd, IDataObject *pdtobj, UINT uMsg, WPARAM wParam, LPARAM lParam)
Definition: CNetFolder.cpp:213
static shvheader NetworkPlacesSFHeader[]
Definition: CNetFolder.cpp:87
HRESULT CALLBACK NetFolderMenuCallback(IShellFolder *psf, HWND hwnd, IDataObject *pdtobj, UINT uMsg, WPARAM wParam, LPARAM lParam)
Definition: CNetFolder.cpp:62
LPITEMIDLIST ILCreateFromNetworkPlaceW(LPCWSTR lpNetworkPlace)
Definition: CNetFolder.cpp:31
#define NETWORKPLACESSHELLVIEWCOLUMNS
Definition: CNetFolder.cpp:99
#define WINE_DEFAULT_DEBUG_CHANNEL(t)
Definition: precomp.h:23
void shell(int argc, const char *argv[])
Definition: cmds.c:1231
#define FIXME(fmt,...)
Definition: precomp.h:53
#define WARN(fmt,...)
Definition: precomp.h:61
#define ERR(fmt,...)
Definition: precomp.h:57
#define IDS_PROPERTIES
Definition: resource.h:102
BOOL AddToEnumList(LPITEMIDLIST pidl)
BOOL EnumerateRec(LPNETRESOURCE lpNet)
Definition: CNetFolder.cpp:121
HRESULT WINAPI Initialize(HWND hwndOwner, DWORD dwFlags)
Definition: CNetFolder.cpp:109
BOOL CreateMyCompEnumList(DWORD dwFlags)
Definition: CNetFolder.cpp:195
STDMETHOD() GetDetailsOf(PCUITEMID_CHILD pidl, UINT iColumn, SHELLDETAILS *psd) override
Definition: CNetFolder.cpp:547
STDMETHOD() GetClassID(CLSID *lpClassId) override
Definition: CNetFolder.cpp:575
STDMETHOD() Initialize(PCIDLIST_ABSOLUTE pidl) override
Definition: CNetFolder.cpp:592
STDMETHOD() GetDefaultSearchGUID(GUID *pguid) override
Definition: CNetFolder.cpp:507
STDMETHOD() CreateViewObject(HWND hwndOwner, REFIID riid, LPVOID *ppvOut) override
Definition: CNetFolder.cpp:340
STDMETHOD() GetDisplayNameOf(PCUITEMID_CHILD pidl, DWORD dwFlags, LPSTRRET strRet) override
Definition: CNetFolder.cpp:476
STDMETHOD() GetDefaultColumnState(UINT iColumn, DWORD *pcsFlags) override
Definition: CNetFolder.cpp:531
STDMETHOD() ParseDisplayName(HWND hwndOwner, LPBC pbc, LPOLESTR lpszDisplayName, DWORD *pchEaten, PIDLIST_RELATIVE *ppidl, DWORD *pdwAttributes) override
Definition: CNetFolder.cpp:251
STDMETHOD() GetAttributesOf(UINT cidl, PCUITEMID_CHILD_ARRAY apidl, DWORD *rgfInOut) override
Definition: CNetFolder.cpp:375
STDMETHOD() BindToStorage(PCUIDLIST_RELATIVE pidl, LPBC pbcReserved, REFIID riid, LPVOID *ppvOut) override
Definition: CNetFolder.cpp:319
STDMETHOD() GetCurFolder(PIDLIST_ABSOLUTE *pidl) override
Definition: CNetFolder.cpp:604
STDMETHOD() GetDetailsEx(PCUITEMID_CHILD pidl, const SHCOLUMNID *pscid, VARIANT *pv) override
Definition: CNetFolder.cpp:541
STDMETHOD() SetNameOf(HWND hwndOwner, PCUITEMID_CHILD pidl, LPCOLESTR lpName, DWORD dwFlags, PITEMID_CHILD *pPidlOut) override
Definition: CNetFolder.cpp:499
STDMETHOD() BindToObject(PCUIDLIST_RELATIVE pidl, LPBC pbcReserved, REFIID riid, LPVOID *ppvOut) override
Definition: CNetFolder.cpp:301
STDMETHOD() EnumSearches(IEnumExtraSearch **ppenum) override
Definition: CNetFolder.cpp:513
STDMETHOD() GetUIObjectOf(HWND hwndOwner, UINT cidl, PCUITEMID_CHILD_ARRAY apidl, REFIID riid, UINT *prgfInOut, LPVOID *ppvOut) override
Definition: CNetFolder.cpp:422
STDMETHOD() GetDefaultColumn(DWORD dwRes, ULONG *pSort, ULONG *pDisplay) override
Definition: CNetFolder.cpp:519
STDMETHOD() EnumObjects(HWND hwndOwner, DWORD dwFlags, LPENUMIDLIST *ppEnumIDList) override
Definition: CNetFolder.cpp:293
STDMETHOD() MapColumnToSCID(UINT column, SHCOLUMNID *pscid) override
Definition: CNetFolder.cpp:565
STDMETHOD() CompareIDs(LPARAM lParam, PCUIDLIST_RELATIVE pidl1, PCUIDLIST_RELATIVE pidl2) override
Definition: CNetFolder.cpp:332
LPITEMIDLIST pidlRoot
Definition: CNetFolder.h:35
WPARAM wParam
Definition: combotst.c:138
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
const char * shdebugstr_guid(const struct _GUID *id)
Definition: debughlp.cpp:427
#define NULL
Definition: types.h:112
#define TRUE
Definition: types.h:120
#define FALSE
Definition: types.h:117
#define IDI_SHELL_NETWORK_FOLDER
Definition: resource.h:5
#define IDS_SHV_COLUMN_NAME
Definition: resource.h:74
#define IDC_PROPERTIES
Definition: resource.h:32
#define DFM_MERGECONTEXTMENU
Definition: precomp.h:44
#define DFM_INVOKECOMMAND
Definition: precomp.h:45
#define MAX_PATH
Definition: compat.h:34
#define CALLBACK
Definition: compat.h:35
#define FAILED_UNEXPECTEDLY(hr)
Definition: precomp.h:121
#define SHELL_ExecuteControlPanelCPL(hwnd, cpl)
Definition: precomp.h:185
HRESULT SHELL32_DefaultContextMenuCallBack(IShellFolder *psf, IDataObject *pdo, UINT msg)
Definition: shlfolder.cpp:525
void WINAPI SHFree(LPVOID pv)
Definition: shellole.c:326
LPVOID WINAPI SHAlloc(SIZE_T len)
Definition: shellole.c:304
unsigned int BOOL
Definition: ntddk_ex.h:94
unsigned long DWORD
Definition: ntddk_ex.h:95
unsigned short WORD
Definition: ntddk_ex.h:93
WCHAR swShell32Name[MAX_PATH]
Definition: folders.cpp:22
VOID WINAPI CoTaskMemFree(LPVOID ptr)
Definition: ifs.c:442
LPVOID WINAPI CoTaskMemAlloc(SIZE_T size)
Definition: ifs.c:426
_CRTIMP size_t __cdecl wcslen(_In_z_ const wchar_t *_Str)
REFIID riid
Definition: atlbase.h:39
HRESULT QueryInterface([in] REFIID riid, [out, iid_is(riid)] void **ppvObject)
#define S_OK
Definition: intsafe.h:52
#define SUCCEEDED(hr)
Definition: intsafe.h:50
#define debugstr_w
Definition: kernel32.h:32
#define BEGIN_COM_MAP(x)
Definition: atlcom.h:581
#define COM_INTERFACE_ENTRY_IID(iid, x)
Definition: atlcom.h:601
#define END_COM_MAP()
Definition: atlcom.h:592
static LPOLESTR
Definition: stg_prop.c:27
static const CLSID *static CLSID *static const GUID VARIANT VARIANT *static IServiceProvider DWORD *static HMENU
Definition: ordinal.c:63
unsigned int UINT
Definition: ndis.h:50
#define FILE_ATTRIBUTE_DIRECTORY
Definition: nt_native.h:705
#define L(x)
Definition: ntvdm.h:50
interface IBindCtx * LPBC
Definition: objfwd.h:18
const GUID IID_IDataObject
LPITEMIDLIST WINAPI ILClone(LPCITEMIDLIST pidl)
Definition: pidl.c:237
#define LVCFMT_RIGHT
Definition: commctrl.h:2604
#define IsEqualIID(riid1, riid2)
Definition: guiddef.h:95
#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)
#define memset(x, y, z)
Definition: compat.h:39
HRESULT SHELL32_BindToSF(LPCITEMIDLIST pidlRoot, PERSIST_FOLDER_TARGET_INFO *ppfti, LPCITEMIDLIST pidl, const GUID *clsid, REFIID riid, LPVOID *ppvOut)
Definition: shlfolder.cpp:196
LSTATUS AddClassKeyToArray(const WCHAR *szClass, HKEY *array, UINT *cKeys)
Definition: shlfolder.cpp:311
void WINAPI _InsertMenuItemW(HMENU hmenu, UINT indexMenu, BOOL fByPosition, UINT wID, UINT fType, LPCWSTR dwTypeData, UINT fState)
#define COLUMN_NAME
HRESULT hr
Definition: shlfolder.c:183
UINT WINAPI Shell_MergeMenus(HMENU hmDst, HMENU hmSrc, UINT uInsert, UINT uIDAdjust, UINT uIDAdjustMax, ULONG uFlags)
Definition: shlmenu.c:856
#define MM_ADDSEPARATOR
Definition: shlobj.h:2528
struct _SFV_CREATE SFV_CREATE
#define IDS_SHV_COLUMN_CATEGORY
Definition: shresdef.h:62
#define IDS_SHV_COLUMN_NETLOCATION
Definition: shresdef.h:64
#define IDS_SHV_COLUMN_WORKGROUP
Definition: shresdef.h:63
ITEMIDLIST UNALIGNED * LPITEMIDLIST
Definition: shtypes.idl:41
const PCUITEMID_CHILD * PCUITEMID_CHILD_ARRAY
Definition: shtypes.idl:71
const ITEMID_CHILD UNALIGNED * PCUITEMID_CHILD
Definition: shtypes.idl:70
@ SHCOLSTATE_TYPE_STR
Definition: shtypes.idl:121
@ SHCOLSTATE_ONBYDEFAULT
Definition: shtypes.idl:125
const ITEMIDLIST_RELATIVE UNALIGNED * PCUIDLIST_RELATIVE
Definition: shtypes.idl:57
const ITEMIDLIST UNALIGNED * LPCITEMIDLIST
Definition: shtypes.idl:42
DWORD SHCOLSTATEF
Definition: shtypes.idl:142
#define TRACE(s)
Definition: solgame.cpp:4
STRSAFEAPI StringCchCopyW(STRSAFE_LPWSTR pszDest, size_t cchDest, STRSAFE_LPCWSTR pszSrc)
Definition: strsafe.h:149
STRRET str
Definition: shtypes.idl:108
LPSTR lpProvider
Definition: winnetwk.h:174
LPSTR lpRemoteName
Definition: winnetwk.h:172
DWORD dwUsage
Definition: winnetwk.h:170
HMENU hmenu
Definition: shlobj.h:1390
UINT idCmdLast
Definition: shlobj.h:1393
UINT idCmdFirst
Definition: shlobj.h:1392
UINT indexMenu
Definition: shlobj.h:1391
WORD colstate
Definition: shfldr.h:31
uint32_t ULONG
Definition: typedefs.h:59
#define GetFileAttributes
Definition: winbase.h:3840
_In_ LPCSTR lpName
Definition: winbase.h:2814
_In_ PCCERT_CONTEXT _In_ DWORD dwFlags
Definition: wincrypt.h:1176
_In_ LONG _In_ HWND hwnd
Definition: winddi.h:4023
LONG_PTR LPARAM
Definition: windef.h:208
UINT_PTR WPARAM
Definition: windef.h:207
#define WINAPI
Definition: msvc.h:6
#define E_NOINTERFACE
Definition: winerror.h:2364
#define E_UNEXPECTED
Definition: winerror.h:2456
#define E_POINTER
Definition: winerror.h:2365
#define RESOURCETYPE_DISK
Definition: winnetwk.h:64
#define WN_MORE_DATA
Definition: winnetwk.h:117
#define WN_SUCCESS
Definition: winnetwk.h:111
#define WNetEnumResource
Definition: winnetwk.h:599
#define WNetOpenEnum
Definition: winnetwk.h:598
NETRESOURCEA * LPNETRESOURCE
Definition: winnetwk.h:593
#define RESOURCEUSAGE_CONTAINER
Definition: winnetwk.h:69
#define WN_NO_MORE_ENTRIES
Definition: winnetwk.h:146
#define RESOURCE_GLOBALNET
Definition: winnetwk.h:59
HMENU WINAPI CreatePopupMenu(void)
Definition: menu.c:838
#define MFS_ENABLED
Definition: winuser.h:753
BOOL WINAPI DestroyMenu(_In_ HMENU)
#define MFT_STRING
Definition: winuser.h:749
#define MAKEINTRESOURCEW(i)
Definition: winuser.h:582
DWORD WINAPI WNetCloseEnum(HANDLE hEnum)
Definition: wnet.c:1762
static void Initialize()
Definition: xlate.c:212
#define IID_PPV_ARG(Itype, ppType)
__wchar_t WCHAR
Definition: xmlstorage.h:180
const WCHAR * LPCWSTR
Definition: xmlstorage.h:185