ReactOS  0.4.14-dev-114-gc8cbd56
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,
66  WPARAM wParam,
67  LPARAM lParam)
68 {
69  switch (uMsg)
70  {
72  return S_OK;
73  case DFM_INVOKECOMMAND:
75  case DFM_GETDEFSTATICID: // Required for Windows 7 to pick a default
76  return S_FALSE;
77  }
78  return E_NOTIMPL;
79 }
80 
82  public CEnumIDListBase
83 {
84  public:
90 
92  COM_INTERFACE_ENTRY_IID(IID_IEnumIDList, IEnumIDList)
93  END_COM_MAP()
94 };
95 
101 };
102 
103 #define COLUMN_NAME 0
104 #define COLUMN_CATEGORY 1
105 #define COLUMN_WORKGROUP 2
106 #define COLUMN_NETLOCATION 3
107 
108 #define NETWORKPLACESSHELLVIEWCOLUMNS 4
109 
111 {
112 }
113 
115 {
116 }
117 
119 {
121  return E_FAIL;
122 
123  return S_OK;
124 }
125 
126 /**************************************************************************
127  * CDrivesFolderEnum::CreateMyCompEnumList()
128  */
129 
131 {
132  BOOL bRet = TRUE;
133  DWORD dRet;
134  HANDLE hEnum;
135  LPNETRESOURCE lpRes;
136  DWORD dSize = 0x1000;
137  DWORD dCount = -1;
138  LPNETRESOURCE lpCur;
139 
140  dRet = WNetOpenEnum(RESOURCE_GLOBALNET, RESOURCETYPE_DISK, 0, lpNet, &hEnum);
141  if (dRet != WN_SUCCESS)
142  {
143  ERR("WNetOpenEnum() failed: %x\n", dRet);
144  return FALSE;
145  }
146 
147  lpRes = (LPNETRESOURCE)CoTaskMemAlloc(dSize);
148  if (!lpRes)
149  {
150  ERR("CoTaskMemAlloc() failed\n");
151  WNetCloseEnum(hEnum);
152  return FALSE;
153  }
154 
155  do
156  {
157  dSize = 0x1000;
158  dCount = -1;
159 
160  memset(lpRes, 0, dSize);
161  dRet = WNetEnumResource(hEnum, &dCount, lpRes, &dSize);
162  if (dRet == WN_SUCCESS || dRet == WN_MORE_DATA)
163  {
164  lpCur = lpRes;
165  for (; dCount; dCount--)
166  {
167  TRACE("lpRemoteName: %S\n", lpCur->lpRemoteName);
168 
170  {
171  TRACE("Found provider: %S\n", lpCur->lpProvider);
172  EnumerateRec(lpCur);
173  }
174  else
175  {
176  LPITEMIDLIST pidl;
177 
178 #ifdef HACKY_UNC_PATHS
180 #endif
181  if (pidl != NULL)
182  bRet = AddToEnumList(pidl);
183  else
184  {
185  ERR("ILCreateFromPathW() failed\n");
186  bRet = FALSE;
187  break;
188  }
189  }
190 
191  lpCur++;
192  }
193  }
194  } while (dRet != WN_NO_MORE_ENTRIES);
195 
196  CoTaskMemFree(lpRes);
197  WNetCloseEnum(hEnum);
198 
199  TRACE("Done: %u\n", bRet);
200 
201  return bRet;
202 }
203 
205 {
206  BOOL bRet = TRUE;
207 
208  TRACE("(%p)->(flags=0x%08x)\n", this, dwFlags);
209 
210  /* enumerate the folders */
211  if (dwFlags & SHCONTF_FOLDERS)
212  {
213  bRet = EnumerateRec(NULL);
214  }
215 
216  return bRet;
217 }
218 
220 {
221  pidlRoot = NULL;
222 }
223 
225 {
226  if (pidlRoot)
227  SHFree(pidlRoot);
228 }
229 
230 /**************************************************************************
231 * CNetFolder::ParseDisplayName
232 */
233 HRESULT WINAPI CNetFolder::ParseDisplayName(HWND hwndOwner, LPBC pbcReserved, LPOLESTR lpszDisplayName,
234  DWORD *pchEaten, PIDLIST_RELATIVE *ppidl, DWORD *pdwAttributes)
235 {
237 #ifdef HACKY_UNC_PATHS
238  /* FIXME: the code below is an ugly hack */
239 
240  /* Can we use a CFSFolder on that path? */
241  DWORD attrs = GetFileAttributes(lpszDisplayName);
242  if ((attrs & FILE_ATTRIBUTE_DIRECTORY))
243  {
244  if (pchEaten)
245  *pchEaten = 0; /* strange but like the original */
246 
247  /* YES WE CAN */
248 
249  /* Create our hacky pidl */
250  LPITEMIDLIST pidl = ILCreateFromNetworkPlaceW(lpszDisplayName);
251 
252  *ppidl = pidl;
253  if (pdwAttributes)
254  *pdwAttributes = SFGAO_FILESYSTEM | SFGAO_CANLINK | SFGAO_FOLDER | SFGAO_HASSUBFOLDER | SFGAO_FILESYSANCESTOR;
255  return S_OK;
256  }
257 #endif
258 
259  TRACE("(%p)->(HWND=%p,%p,%p=%s,%p,pidl=%p,%p)\n", this,
260  hwndOwner, pbcReserved, lpszDisplayName, debugstr_w (lpszDisplayName),
261  pchEaten, ppidl, pdwAttributes);
262 
263  *ppidl = 0;
264  if (pchEaten)
265  *pchEaten = 0; /* strange but like the original */
266 
267  TRACE("(%p)->(-- ret=0x%08x)\n", this, hr);
268 
269  return hr;
270 }
271 
272 /**************************************************************************
273 * CNetFolder::EnumObjects
274 */
275 HRESULT WINAPI CNetFolder::EnumObjects(HWND hwndOwner, DWORD dwFlags, LPENUMIDLIST *ppEnumIDList)
276 {
277  return ShellObjectCreatorInit<CNetFolderEnum>(hwndOwner, dwFlags, IID_PPV_ARG(IEnumIDList, ppEnumIDList));
278 }
279 
280 /**************************************************************************
281 * CNetFolder::BindToObject
282 */
284 {
285 #ifdef HACKY_UNC_PATHS
286  /* Create the target folder info */
287  PERSIST_FOLDER_TARGET_INFO pfti = {0};
288  pfti.dwAttributes = -1;
289  pfti.csidl = -1;
290  StringCchCopyW(pfti.szTargetParsingName, MAX_PATH, (WCHAR*)pidl->mkid.abID);
291 
292  return SHELL32_BindToSF(pidlRoot, &pfti, pidl, &CLSID_ShellFSFolder, riid, ppvOut);
293 #else
294  return E_NOTIMPL;
295 #endif
296 }
297 
298 /**************************************************************************
299 * CNetFolder::BindToStorage
300 */
302 {
303  FIXME("(%p)->(pidl=%p,%p,%s,%p) stub\n", this,
304  pidl, pbcReserved, shdebugstr_guid (&riid), ppvOut);
305 
306  *ppvOut = NULL;
307  return E_NOTIMPL;
308 }
309 
310 /**************************************************************************
311 * CNetFolder::CompareIDs
312 */
313 
315 {
316  return E_NOTIMPL;
317 }
318 
319 /**************************************************************************
320 * CNetFolder::CreateViewObject
321 */
323 {
324  CComPtr<IShellView> pShellView;
326 
327  TRACE("(%p)->(hwnd=%p,%s,%p)\n", this,
328  hwndOwner, shdebugstr_guid (&riid), ppvOut);
329 
330  if (!ppvOut)
331  return hr;
332 
333  *ppvOut = NULL;
334 
335  if (IsEqualIID(riid, IID_IDropTarget))
336  {
337  WARN("IDropTarget not implemented\n");
338  hr = E_NOTIMPL;
339  }
340  else if (IsEqualIID(riid, IID_IContextMenu))
341  {
342  WARN("IContextMenu not implemented\n");
343  hr = E_NOTIMPL;
344  }
345  else if (IsEqualIID(riid, IID_IShellView))
346  {
347  SFV_CREATE sfvparams = {sizeof(SFV_CREATE), this};
348  hr = SHCreateShellFolderView(&sfvparams, (IShellView**)ppvOut);
349  }
350  TRACE("-- (%p)->(interface=%p)\n", this, ppvOut);
351  return hr;
352 }
353 
354 /**************************************************************************
355 * CNetFolder::GetAttributesOf
356 */
358 {
359  static const DWORD dwNethoodAttributes =
360  SFGAO_STORAGE | SFGAO_HASPROPSHEET | SFGAO_STORAGEANCESTOR |
361  SFGAO_FILESYSANCESTOR | SFGAO_FOLDER | SFGAO_FILESYSTEM | SFGAO_HASSUBFOLDER | SFGAO_CANRENAME | SFGAO_CANDELETE;
362  HRESULT hr = S_OK;
363 
364  TRACE("(%p)->(cidl=%d apidl=%p mask=%p (0x%08x))\n", this,
365  cidl, apidl, rgfInOut, rgfInOut ? *rgfInOut : 0);
366 
367  if (!rgfInOut)
368  return E_INVALIDARG;
369  if (cidl && !apidl)
370  return E_INVALIDARG;
371 
372  if (*rgfInOut == 0)
373  *rgfInOut = ~0;
374 
375  if(cidl == 0)
376  *rgfInOut = dwNethoodAttributes;
377  else
378  {
379  /* FIXME: Implement when enumerating items is implemented */
380 #ifdef HACKY_UNC_PATHS
381  *rgfInOut = SFGAO_FILESYSTEM | SFGAO_CANLINK | SFGAO_FOLDER | SFGAO_HASSUBFOLDER | SFGAO_FILESYSANCESTOR;
382 #endif
383  }
384 
385  /* make sure SFGAO_VALIDATE is cleared, some apps depend on that */
386  *rgfInOut &= ~SFGAO_VALIDATE;
387 
388  TRACE("-- result=0x%08x\n", *rgfInOut);
389  return hr;
390 }
391 
392 /**************************************************************************
393 * CNetFolder::GetUIObjectOf
394 *
395 * PARAMETERS
396 * hwndOwner [in] Parent window for any output
397 * cidl [in] array size
398 * apidl [in] simple pidl array
399 * riid [in] Requested Interface
400 * prgfInOut [ ] reserved
401 * ppvObject [out] Resulting Interface
402 *
403 */
405  UINT * prgfInOut, LPVOID * ppvOut)
406 {
407  LPVOID pObj = NULL;
409 
410  TRACE("(%p)->(%p,%u,apidl=%p,%s,%p,%p)\n", this,
411  hwndOwner, cidl, apidl, shdebugstr_guid (&riid), prgfInOut, ppvOut);
412 
413  if (!ppvOut)
414  return hr;
415 
416  *ppvOut = NULL;
417 
418  if (IsEqualIID(riid, IID_IContextMenu) && (cidl >= 1))
419  {
420  IContextMenu * pCm = NULL;
421  HKEY hkey;
422  UINT cKeys = 0;
423  AddClassKeyToArray(L"Folder", &hkey, &cKeys);
424  hr = CDefFolderMenu_Create2(pidlRoot, hwndOwner, cidl, apidl, this, NetFolderMenuCallback, cKeys, &hkey, &pCm);
425  pObj = pCm;
426  }
427  else if (IsEqualIID(riid, IID_IDataObject) && (cidl >= 1))
428  {
429  IDataObject * pDo = NULL;
430  hr = IDataObject_Constructor (hwndOwner, pidlRoot, apidl, cidl, TRUE, &pDo);
431  pObj = pDo;
432  }
433  else if ((IsEqualIID(riid, IID_IExtractIconA) || IsEqualIID(riid, IID_IExtractIconW)) && (cidl == 1))
434  {
435  hr = CNetFolderExtractIcon_CreateInstance(apidl[0], riid, &pObj);
436  }
437  else if (IsEqualIID(riid, IID_IDropTarget) && (cidl >= 1))
438  {
439  IDropTarget * pDt = NULL;
440  hr = this->QueryInterface(IID_PPV_ARG(IDropTarget, &pDt));
441  pObj = pDt;
442  }
443  else
444  hr = E_NOINTERFACE;
445 
446  if (SUCCEEDED(hr) && !pObj)
447  hr = E_OUTOFMEMORY;
448 
449  *ppvOut = pObj;
450  TRACE("(%p)->hr=0x%08x\n", this, hr);
451  return hr;
452 }
453 
454 /**************************************************************************
455 * CNetFolder::GetDisplayNameOf
456 *
457 */
459 {
460  if (!strRet || !pidl || !pidl->mkid.cb)
461  return E_INVALIDARG;
462 
463 #ifdef HACKY_UNC_PATHS
464  return SHSetStrRet(strRet, (LPCWSTR)pidl->mkid.abID);
465 #endif
466  return E_NOTIMPL;
467 }
468 
469 /**************************************************************************
470 * CNetFolder::SetNameOf
471 * Changes the name of a file object or subfolder, possibly changing its item
472 * identifier in the process.
473 *
474 * PARAMETERS
475 * hwndOwner [in] Owner window for output
476 * pidl [in] simple pidl of item to change
477 * lpszName [in] the items new display name
478 * dwFlags [in] SHGNO formatting flags
479 * ppidlOut [out] simple pidl returned
480 */
481 HRESULT WINAPI CNetFolder::SetNameOf(HWND hwndOwner, PCUITEMID_CHILD pidl, /*simple pidl */
482  LPCOLESTR lpName, DWORD dwFlags, PITEMID_CHILD *pPidlOut)
483 {
484  FIXME("(%p)->(%p,pidl=%p,%s,%u,%p)\n", this,
485  hwndOwner, pidl, debugstr_w (lpName), dwFlags, pPidlOut);
486  return E_FAIL;
487 }
488 
490 {
491  FIXME("(%p)\n", this);
492  return E_NOTIMPL;
493 }
494 
496 {
497  FIXME("(%p)\n", this);
498  return E_NOTIMPL;
499 }
500 
502 {
503  TRACE("(%p)\n", this);
504 
505  if (pSort)
506  *pSort = 0;
507  if (pDisplay)
508  *pDisplay = 0;
509 
510  return S_OK;
511 }
512 
514 {
515  TRACE("(%p)\n", this);
516 
517  if (!pcsFlags || iColumn >= NETWORKPLACESSHELLVIEWCOLUMNS)
518  return E_INVALIDARG;
519  *pcsFlags = NetworkPlacesSFHeader[iColumn].pcsFlags;
520  return S_OK;
521 }
522 
524 {
525  FIXME("(%p)\n", this);
526  return E_NOTIMPL;
527 }
528 
530 {
531  if (iColumn >= NETWORKPLACESSHELLVIEWCOLUMNS)
532  return E_FAIL;
533 
534  psd->fmt = NetworkPlacesSFHeader[iColumn].fmt;
535  psd->cxChar = NetworkPlacesSFHeader[iColumn].cxChar;
536  if (pidl == NULL)
537  return SHSetStrRet(&psd->str, NetworkPlacesSFHeader[iColumn].colnameid);
538 
539  if (iColumn == COLUMN_NAME)
540  return GetDisplayNameOf(pidl, SHGDN_NORMAL, &psd->str);
541 
542  FIXME("(%p)->(%p %i %p)\n", this, pidl, iColumn, psd);
543 
544  return E_NOTIMPL;
545 }
546 
548 {
549  FIXME("(%p)\n", this);
550 
551  return E_NOTIMPL;
552 }
553 
554 /************************************************************************
555  * CNetFolder::GetClassID
556  */
558 {
559  TRACE("(%p)\n", this);
560 
561  if (!lpClassId)
562  return E_POINTER;
563 
564  *lpClassId = CLSID_NetworkPlaces;
565 
566  return S_OK;
567 }
568 
569 /************************************************************************
570  * CNetFolder::Initialize
571  *
572  * NOTES: it makes no sense to change the pidl
573  */
575 {
576  if (pidlRoot)
578 
579  pidlRoot = ILClone(pidl);
580  return S_OK;
581 }
582 
583 /**************************************************************************
584  * CNetFolder::GetCurFolder
585  */
587 {
588  TRACE("(%p)->(%p)\n", this, pidl);
589 
590  if (!pidl)
591  return E_POINTER;
592 
593  *pidl = ILClone(pidlRoot);
594 
595  return S_OK;
596 }
HRESULT CNetFolderExtractIcon_CreateInstance(LPCITEMIDLIST pidl, REFIID riid, LPVOID *ppvOut)
Definition: CNetFolder.cpp:50
const DOCKBAR PVOID HWND HWND * hwnd
Definition: tooldock.h:22
#define REFIID
Definition: guiddef.h:118
#define TRUE
Definition: types.h:120
virtual HRESULT WINAPI BindToObject(PCUIDLIST_RELATIVE pidl, LPBC pbcReserved, REFIID riid, LPVOID *ppvOut)
Definition: CNetFolder.cpp:283
#define E_NOINTERFACE
Definition: winerror.h:2364
VOID WINAPI CoTaskMemFree(LPVOID ptr)
Definition: ifs.c:422
virtual HRESULT WINAPI MapColumnToSCID(UINT column, SHCOLUMNID *pscid)
Definition: CNetFolder.cpp:547
HRESULT hr
Definition: shlfolder.c:183
const WCHAR * LPCWSTR
Definition: xmlstorage.h:185
virtual HRESULT WINAPI EnumSearches(IEnumExtraSearch **ppenum)
Definition: CNetFolder.cpp:495
virtual HRESULT WINAPI Initialize(PCIDLIST_ABSOLUTE pidl)
Definition: CNetFolder.cpp:574
interface IBindCtx * LPBC
Definition: objfwd.h:18
virtual HRESULT WINAPI GetDetailsOf(PCUITEMID_CHILD pidl, UINT iColumn, SHELLDETAILS *psd)
Definition: CNetFolder.cpp:529
virtual HRESULT WINAPI SetNameOf(HWND hwndOwner, PCUITEMID_CHILD pidl, LPCOLESTR lpName, DWORD dwFlags, PITEMID_CHILD *pPidlOut)
Definition: CNetFolder.cpp:481
#define WN_SUCCESS
Definition: winnetwk.h:111
REFIID riid
Definition: precomp.h:44
BOOL AddToEnumList(LPITEMIDLIST pidl)
#define IDS_SHV_COLUMN_CATEGORY
Definition: shresdef.h:56
#define WARN(fmt,...)
Definition: debug.h:111
void AddClassKeyToArray(const WCHAR *szClass, HKEY *array, UINT *cKeys)
Definition: shlfolder.cpp:267
#define LVCFMT_RIGHT
Definition: commctrl.h:2571
const ITEMIDLIST UNALIGNED * LPCITEMIDLIST
Definition: shtypes.idl:42
#define CALLBACK
Definition: compat.h:27
_In_ LPCSTR lpName
Definition: winbase.h:2736
const char * shdebugstr_guid(const struct _GUID *id)
Definition: debughlp.cpp:414
WCHAR swShell32Name[MAX_PATH]
Definition: folders.cpp:22
const ITEMID_CHILD UNALIGNED * PCUITEMID_CHILD
Definition: shtypes.idl:70
virtual HRESULT WINAPI BindToStorage(PCUIDLIST_RELATIVE pidl, LPBC pbcReserved, REFIID riid, LPVOID *ppvOut)
Definition: CNetFolder.cpp:301
HRESULT CALLBACK NetFolderMenuCallback(IShellFolder *psf, HWND hwnd, IDataObject *pdtobj, UINT uMsg, WPARAM wParam, LPARAM lParam)
Definition: CNetFolder.cpp:62
const GUID IID_IDataObject
UINT_PTR WPARAM
Definition: windef.h:207
LPITEMIDLIST ILCreateFromNetworkPlaceW(LPCWSTR lpNetworkPlace)
Definition: CNetFolder.cpp:31
static LPOLESTR
Definition: stg_prop.c:27
HRESULT SHELL32_BindToSF(LPCITEMIDLIST pidlRoot, PERSIST_FOLDER_TARGET_INFO *ppfti, LPCITEMIDLIST pidl, const GUID *clsid, REFIID riid, LPVOID *ppvOut)
Definition: shlfolder.cpp:159
HRESULT WINAPI SHCreateShellFolderView(const SFV_CREATE *pcsfv, IShellView **ppsv)
Definition: CDefView.cpp:3448
#define IID_PPV_ARG(Itype, ppType)
#define E_FAIL
Definition: ddrawi.h:102
STRRET str
Definition: shtypes.idl:108
WPARAM wParam
Definition: combotst.c:138
virtual HRESULT WINAPI GetClassID(CLSID *lpClassId)
Definition: CNetFolder.cpp:557
virtual HRESULT WINAPI ParseDisplayName(HWND hwndOwner, LPBC pbc, LPOLESTR lpszDisplayName, DWORD *pchEaten, PIDLIST_RELATIVE *ppidl, DWORD *pdwAttributes)
Definition: CNetFolder.cpp:233
#define IDS_SHV_COLUMN_NETLOCATION
Definition: shresdef.h:58
#define RESOURCEUSAGE_CONTAINER
Definition: winnetwk.h:69
#define RESOURCE_GLOBALNET
Definition: winnetwk.h:59
#define E_OUTOFMEMORY
Definition: ddrawi.h:100
const PCUITEMID_CHILD * PCUITEMID_CHILD_ARRAY
Definition: shtypes.idl:71
virtual HRESULT WINAPI EnumObjects(HWND hwndOwner, DWORD dwFlags, LPENUMIDLIST *ppEnumIDList)
Definition: CNetFolder.cpp:275
unsigned int BOOL
Definition: ntddk_ex.h:94
STRSAFEAPI StringCchCopyW(STRSAFE_LPWSTR pszDest, size_t cchDest, STRSAFE_LPCWSTR pszSrc)
Definition: strsafe.h:149
#define debugstr_w
Definition: kernel32.h:32
#define FIXME(fmt,...)
Definition: debug.h:110
#define S_FALSE
Definition: winerror.h:2357
#define E_INVALIDARG
Definition: ddrawi.h:101
#define DFM_INVOKECOMMAND
Definition: precomp.h:45
smooth NULL
Definition: ftsmooth.c:416
virtual HRESULT WINAPI GetDisplayNameOf(PCUITEMID_CHILD pidl, DWORD dwFlags, LPSTRRET strRet)
Definition: CNetFolder.cpp:458
virtual HRESULT WINAPI GetDefaultColumnState(UINT iColumn, DWORD *pcsFlags)
Definition: CNetFolder.cpp:513
HRESULT IDataObject_Constructor(HWND hwndOwner, PCIDLIST_ABSOLUTE pMyPidl, PCUIDLIST_RELATIVE_ARRAY apidl, UINT cidl, BOOL bExtendedObject, IDataObject **dataObject)
LONG_PTR LPARAM
Definition: windef.h:208
#define NETWORKPLACESSHELLVIEWCOLUMNS
Definition: CNetFolder.cpp:108
struct _SFV_CREATE SFV_CREATE
NETRESOURCEA * LPNETRESOURCE
Definition: winnetwk.h:593
virtual HRESULT WINAPI GetCurFolder(PIDLIST_ABSOLUTE *pidl)
Definition: CNetFolder.cpp:586
LPSTR lpProvider
Definition: winnetwk.h:174
#define WNetOpenEnum
Definition: winnetwk.h:598
static shvheader NetworkPlacesSFHeader[]
Definition: CNetFolder.cpp:96
#define FILE_ATTRIBUTE_DIRECTORY
Definition: nt_native.h:705
virtual HRESULT WINAPI GetDetailsEx(PCUITEMID_CHILD pidl, const SHCOLUMNID *pscid, VARIANT *pv)
Definition: CNetFolder.cpp:523
#define BEGIN_COM_MAP(x)
Definition: atlcom.h:541
#define IDI_SHELL_NETWORK_FOLDER
Definition: resource.h:5
#define TRACE(s)
Definition: solgame.cpp:4
__wchar_t WCHAR
Definition: xmlstorage.h:180
#define DFM_GETDEFSTATICID
Definition: precomp.h:47
LONG HRESULT
Definition: typedefs.h:77
#define FAILED_UNEXPECTEDLY(hr)
Definition: shellutils.h:71
#define MAX_PATH
Definition: compat.h:26
#define WINAPI
Definition: msvc.h:8
#define DFM_MERGECONTEXTMENU
Definition: precomp.h:44
WINE_DEFAULT_DEBUG_CHANNEL(shell)
unsigned short WORD
Definition: ntddk_ex.h:93
unsigned long DWORD
Definition: ntddk_ex.h:95
virtual HRESULT WINAPI GetUIObjectOf(HWND hwndOwner, UINT cidl, PCUITEMID_CHILD_ARRAY apidl, REFIID riid, UINT *prgfInOut, LPVOID *ppvOut)
Definition: CNetFolder.cpp:404
HRESULT WINAPI Initialize(HWND hwndOwner, DWORD dwFlags)
Definition: CNetFolder.cpp:118
virtual HRESULT WINAPI GetAttributesOf(UINT cidl, PCUITEMID_CHILD_ARRAY apidl, DWORD *rgfInOut)
Definition: CNetFolder.cpp:357
_CRTIMP wchar_t *__cdecl wcscpy(_Out_writes_z_(_String_length_(_Source)+1) wchar_t *_Dest, _In_z_ const wchar_t *_Source)
DWORD dwUsage
Definition: winnetwk.h:170
static const WCHAR L[]
Definition: oid.c:1250
_In_ PCCERT_CONTEXT _In_ DWORD dwFlags
Definition: wincrypt.h:1175
DWORD WINAPI WNetCloseEnum(HANDLE hEnum)
Definition: wnet.c:1621
BOOL EnumerateRec(LPNETRESOURCE lpNet)
Definition: CNetFolder.cpp:130
#define GetFileAttributes
Definition: winbase.h:3639
#define WNetEnumResource
Definition: winnetwk.h:599
HRESULT WINAPI SHCreateDefaultExtractIcon(REFIID riid, void **ppv)
#define RESOURCETYPE_DISK
Definition: winnetwk.h:64
#define ERR(fmt,...)
Definition: debug.h:109
virtual HRESULT WINAPI GetDefaultColumn(DWORD dwRes, ULONG *pSort, ULONG *pDisplay)
Definition: CNetFolder.cpp:501
virtual HRESULT WINAPI CreateViewObject(HWND hwndOwner, REFIID riid, LPVOID *ppvOut)
Definition: CNetFolder.cpp:322
#define S_OK
Definition: intsafe.h:59
LPITEMIDLIST pidlRoot
Definition: CNetFolder.h:35
void shell(int argc, const char *argv[])
Definition: cmds.c:1231
LPITEMIDLIST WINAPI ILClone(LPCITEMIDLIST pidl)
Definition: pidl.c:228
virtual HRESULT WINAPI CompareIDs(LPARAM lParam, PCUIDLIST_RELATIVE pidl1, PCUIDLIST_RELATIVE pidl2)
Definition: CNetFolder.cpp:314
#define COM_INTERFACE_ENTRY_IID(iid, x)
Definition: atlcom.h:561
#define E_NOTIMPL
Definition: ddrawi.h:99
unsigned int UINT
Definition: ndis.h:50
BOOL CreateMyCompEnumList(DWORD dwFlags)
Definition: CNetFolder.cpp:204
#define WN_NO_MORE_ENTRIES
Definition: winnetwk.h:146
LPSTR lpRemoteName
Definition: winnetwk.h:172
#define E_UNEXPECTED
Definition: winerror.h:2456
#define COLUMN_NAME
Definition: CNetFolder.cpp:103
HRESULT QueryInterface([in] REFIID riid, [out, iid_is(riid)] void **ppvObject)
void WINAPI SHFree(LPVOID pv)
Definition: shellole.c:331
const ITEMIDLIST_RELATIVE UNALIGNED * PCUIDLIST_RELATIVE
Definition: shtypes.idl:57
#define WN_MORE_DATA
Definition: winnetwk.h:117
unsigned int ULONG
Definition: retypes.h:1
#define DFM_INVOKECOMMANDEX
Definition: precomp.h:46
#define IDS_SHV_COLUMN_WORKGROUP
Definition: shresdef.h:57
#define END_COM_MAP()
Definition: atlcom.h:552
#define IDS_SHV_COLUMN_NAME
Definition: resource.h:74
virtual HRESULT WINAPI GetDefaultSearchGUID(GUID *pguid)
Definition: CNetFolder.cpp:489
#define E_POINTER
Definition: winerror.h:2365
#define memset(x, y, z)
Definition: compat.h:39
ITEMIDLIST UNALIGNED * LPITEMIDLIST
Definition: shtypes.idl:41
LPVOID WINAPI CoTaskMemAlloc(SIZE_T size)
Definition: ifs.c:406
LPARAM lParam
Definition: combotst.c:139
LPVOID WINAPI SHAlloc(SIZE_T len)
Definition: shellole.c:309
size_t __cdecl wcslen(_In_z_ const wchar_t *_Str)
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)
#define IsEqualIID(riid1, riid2)
Definition: guiddef.h:95
#define SUCCEEDED(hr)
Definition: intsafe.h:57