3 * Virtual Desktop Folder
5 * Copyright 1997 Marcus Meissner
6 * Copyright 1998, 1999, 2002 Juergen Schmied
8 * This library is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Lesser General Public
10 * License as published by the Free Software Foundation; either
11 * version 2.1 of the License, or (at your option) any later version.
13 * This library is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 * Lesser General Public License for more details.
18 * You should have received a copy of the GNU Lesser General Public
19 * License along with this library; if not, write to the Free Software
20 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
24 #include "wine/port.h"
32 #define NONAMELESSUNION
33 #define NONAMELESSSTRUCT
45 #include "enumidlist.h"
47 #include "undocshell.h"
48 #include "shell32_main.h"
51 #include "shellfolder.h"
52 #include "wine/debug.h"
56 WINE_DEFAULT_DEBUG_CHANNEL (shell);
58 /***********************************************************************
59 * Desktopfolder implementation
63 IShellFolder2Vtbl *lpVtbl;
68 /* both paths are parsible from the desktop */
69 LPSTR sPathTarget; /* complete path to target used for enumeration and ChangeNotify */
70 LPITEMIDLIST pidlRoot; /* absolute pidl */
72 int dwAttributes; /* attributes returned by GetAttributesOf FIXME: use it */
74 UINT cfShellIDList; /* clipboardformat for IDropTarget */
75 BOOL fAcceptFmt; /* flag for pending Drop */
78 #define _IUnknown_(This) (IShellFolder*)&(This->lpVtbl)
79 #define _IShellFolder_(This) (IShellFolder*)&(This->lpVtbl)
81 static struct IShellFolder2Vtbl vt_MCFldr_ShellFolder2;
83 static shvheader DesktopSFHeader[] = {
84 {IDS_SHV_COLUMN1, SHCOLSTATE_TYPE_STR | SHCOLSTATE_ONBYDEFAULT, LVCFMT_RIGHT, 15},
85 {IDS_SHV_COLUMN2, SHCOLSTATE_TYPE_STR | SHCOLSTATE_ONBYDEFAULT, LVCFMT_RIGHT, 10},
86 {IDS_SHV_COLUMN3, SHCOLSTATE_TYPE_STR | SHCOLSTATE_ONBYDEFAULT, LVCFMT_RIGHT, 10},
87 {IDS_SHV_COLUMN4, SHCOLSTATE_TYPE_DATE | SHCOLSTATE_ONBYDEFAULT, LVCFMT_RIGHT, 12},
88 {IDS_SHV_COLUMN5, SHCOLSTATE_TYPE_STR | SHCOLSTATE_ONBYDEFAULT, LVCFMT_RIGHT, 5}
91 #define DESKTOPSHELLVIEWCOLUMNS 5
93 /**************************************************************************
94 * ISF_Desktop_Constructor
96 HRESULT WINAPI ISF_Desktop_Constructor (IUnknown * pUnkOuter, REFIID riid, LPVOID * ppv)
99 char szMyPath[MAX_PATH];
101 TRACE ("unkOut=%p %s\n", pUnkOuter, shdebugstr_guid (riid));
106 return CLASS_E_NOAGGREGATION;
108 if (!SHGetSpecialFolderPathA (0, szMyPath, CSIDL_DESKTOPDIRECTORY, TRUE))
111 sf = (IGenericSFImpl *) LocalAlloc (GMEM_ZEROINIT, sizeof (IGenericSFImpl));
113 return E_OUTOFMEMORY;
116 sf->lpVtbl = &vt_MCFldr_ShellFolder2;
117 sf->pidlRoot = _ILCreateDesktop (); /* my qualified pidl */
118 sf->sPathTarget = SHAlloc (strlen (szMyPath) + 1);
119 lstrcpyA (sf->sPathTarget, szMyPath);
121 if (!SUCCEEDED (IUnknown_QueryInterface (_IUnknown_ (sf), riid, ppv))) {
122 IUnknown_Release (_IUnknown_ (sf));
123 return E_NOINTERFACE;
126 TRACE ("--(%p)\n", sf);
130 /**************************************************************************
131 * ISF_Desktop_fnQueryInterface
133 * NOTES supports not IPersist/IPersistFolder
135 static HRESULT WINAPI ISF_Desktop_fnQueryInterface (IShellFolder2 * iface, REFIID riid, LPVOID * ppvObj)
137 IGenericSFImpl *This = (IGenericSFImpl *)iface;
139 TRACE ("(%p)->(%s,%p)\n", This, shdebugstr_guid (riid), ppvObj);
143 if (IsEqualIID (riid, &IID_IUnknown) || IsEqualIID (riid, &IID_IShellFolder)
144 || IsEqualIID (riid, &IID_IShellFolder2)) {
149 IUnknown_AddRef ((IUnknown *) (*ppvObj));
150 TRACE ("-- Interface: (%p)->(%p)\n", ppvObj, *ppvObj);
153 TRACE ("-- Interface: E_NOINTERFACE\n");
154 return E_NOINTERFACE;
157 static ULONG WINAPI ISF_Desktop_fnAddRef (IShellFolder2 * iface)
159 IGenericSFImpl *This = (IGenericSFImpl *)iface;
160 ULONG refCount = InterlockedIncrement(&This->ref);
162 TRACE ("(%p)->(count=%lu)\n", This, refCount - 1);
167 static ULONG WINAPI ISF_Desktop_fnRelease (IShellFolder2 * iface)
169 IGenericSFImpl *This = (IGenericSFImpl *)iface;
170 ULONG refCount = InterlockedDecrement(&This->ref);
172 TRACE ("(%p)->(count=%lu)\n", This, refCount + 1);
175 TRACE ("-- destroying IShellFolder(%p)\n", This);
177 SHFree (This->pidlRoot);
178 if (This->sPathTarget)
179 SHFree (This->sPathTarget);
180 LocalFree ((HLOCAL) This);
186 /**************************************************************************
187 * ISF_Desktop_fnParseDisplayName
190 * "::{20D04FE0-3AEA-1069-A2D8-08002B30309D}" and "" binds
193 static HRESULT WINAPI ISF_Desktop_fnParseDisplayName (IShellFolder2 * iface,
196 LPOLESTR lpszDisplayName,
197 DWORD * pchEaten, LPITEMIDLIST * ppidl, DWORD * pdwAttributes)
199 IGenericSFImpl *This = (IGenericSFImpl *)iface;
201 WCHAR szElement[MAX_PATH];
202 LPCWSTR szNext = NULL;
203 LPITEMIDLIST pidlTemp = NULL;
205 char szPath[MAX_PATH];
209 TRACE ("(%p)->(HWND=%p,%p,%p=%s,%p,pidl=%p,%p)\n",
210 This, hwndOwner, pbc, lpszDisplayName, debugstr_w (lpszDisplayName), pchEaten, ppidl, pdwAttributes);
212 if (!lpszDisplayName || !ppidl)
218 *pchEaten = 0; /* strange but like the original */
220 if (lpszDisplayName[0] == ':' && lpszDisplayName[1] == ':') {
221 szNext = GetNextElementW (lpszDisplayName, szElement, MAX_PATH);
222 TRACE ("-- element: %s\n", debugstr_w (szElement));
223 SHCLSIDFromStringW (szElement + 2, &clsid);
224 pidlTemp = _ILCreateGuid (PT_GUID, &clsid);
225 } else if (PathGetDriveNumberW (lpszDisplayName) >= 0) {
226 /* it's a filesystem path with a drive. Let MyComputer parse it */
227 pidlTemp = _ILCreateMyComputer ();
228 szNext = lpszDisplayName;
229 } else if (PathIsUNCW(lpszDisplayName)) {
230 pidlTemp = _ILCreateNetwork();
231 szNext = lpszDisplayName;
233 /* it's a filesystem path on the desktop. Let a FSFolder parse it */
235 if (*lpszDisplayName) {
236 /* build a complete path to create a simple pidl */
237 lstrcpyA(szPath, This->sPathTarget);
238 PathAddBackslashA(szPath);
239 len = lstrlenA(szPath);
240 WideCharToMultiByte(CP_ACP, 0, lpszDisplayName, -1, szPath + len, MAX_PATH - len, NULL, NULL);
241 hr = _ILCreateFromPathA(szPath, &pidlTemp);
243 pidlTemp = _ILCreateMyComputer();
249 if (SUCCEEDED(hr) && pidlTemp) {
250 if (szNext && *szNext) {
251 hr = SHELL32_ParseNextElement (iface, hwndOwner, pbc, &pidlTemp, (LPOLESTR) szNext, pchEaten, pdwAttributes);
253 if (pdwAttributes && *pdwAttributes) {
254 hr = SHELL32_GetItemAttributes (_IShellFolder_ (This), pidlTemp, pdwAttributes);
261 TRACE ("(%p)->(-- ret=0x%08lx)\n", This, hr);
266 /**************************************************************************
267 * CreateDesktopEnumList()
269 static BOOL CreateDesktopEnumList(IEnumIDList *list, DWORD dwFlags)
272 char szPath[MAX_PATH];
274 TRACE("(%p)->(flags=0x%08lx) \n",list,dwFlags);
276 /*enumerate the root folders */
277 if(dwFlags & SHCONTF_FOLDERS)
281 /*create the pidl for This item */
282 ret = AddToEnumList(list, _ILCreateMyComputer());
284 if (ret && !RegOpenKeyExA(HKEY_LOCAL_MACHINE,
285 "SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\explorer\\desktop\\NameSpace",
290 BOOL moreKeys = TRUE;
292 while (ret && moreKeys)
294 DWORD size = sizeof (iid);
295 LONG apiRet = RegEnumKeyExA(hkey, i, iid, &size, 0, NULL, NULL,
298 if (ERROR_SUCCESS == apiRet)
300 ret = AddToEnumList(list, _ILCreateGuidFromStrA(iid));
303 else if (ERROR_NO_MORE_ITEMS == apiRet)
312 /*enumerate the elements in %windir%\desktop */
313 SHGetSpecialFolderPathA(0, szPath, CSIDL_DESKTOPDIRECTORY, FALSE);
314 ret = ret && CreateFolderEnumList(list, szPath, dwFlags);
319 /**************************************************************************
320 * ISF_Desktop_fnEnumObjects
322 static HRESULT WINAPI ISF_Desktop_fnEnumObjects (IShellFolder2 * iface,
323 HWND hwndOwner, DWORD dwFlags, LPENUMIDLIST * ppEnumIDList)
325 IGenericSFImpl *This = (IGenericSFImpl *)iface;
327 TRACE ("(%p)->(HWND=%p flags=0x%08lx pplist=%p)\n", This, hwndOwner, dwFlags, ppEnumIDList);
329 *ppEnumIDList = IEnumIDList_Constructor();
331 CreateDesktopEnumList(*ppEnumIDList, dwFlags);
333 TRACE ("-- (%p)->(new ID List: %p)\n", This, *ppEnumIDList);
335 return *ppEnumIDList ? S_OK : E_OUTOFMEMORY;
338 /**************************************************************************
339 * ISF_Desktop_fnBindToObject
341 static HRESULT WINAPI ISF_Desktop_fnBindToObject (IShellFolder2 * iface,
342 LPCITEMIDLIST pidl, LPBC pbcReserved, REFIID riid, LPVOID * ppvOut)
344 IGenericSFImpl *This = (IGenericSFImpl *)iface;
346 TRACE ("(%p)->(pidl=%p,%p,%s,%p)\n", This, pidl, pbcReserved, shdebugstr_guid (riid), ppvOut);
348 return SHELL32_BindToChild (This->pidlRoot, This->sPathTarget, pidl, riid, ppvOut);
351 /**************************************************************************
352 * ISF_Desktop_fnBindToStorage
354 static HRESULT WINAPI ISF_Desktop_fnBindToStorage (IShellFolder2 * iface,
355 LPCITEMIDLIST pidl, LPBC pbcReserved, REFIID riid, LPVOID * ppvOut)
357 IGenericSFImpl *This = (IGenericSFImpl *)iface;
359 FIXME ("(%p)->(pidl=%p,%p,%s,%p) stub\n", This, pidl, pbcReserved, shdebugstr_guid (riid), ppvOut);
365 /**************************************************************************
366 * ISF_Desktop_fnCompareIDs
369 static HRESULT WINAPI ISF_Desktop_fnCompareIDs (IShellFolder2 * iface,
370 LPARAM lParam, LPCITEMIDLIST pidl1, LPCITEMIDLIST pidl2)
372 IGenericSFImpl *This = (IGenericSFImpl *)iface;
376 TRACE ("(%p)->(0x%08lx,pidl1=%p,pidl2=%p)\n", This, lParam, pidl1, pidl2);
377 nReturn = SHELL32_CompareIDs (_IShellFolder_ (This), lParam, pidl1, pidl2);
378 TRACE ("-- %i\n", nReturn);
382 /**************************************************************************
383 * ISF_Desktop_fnCreateViewObject
385 static HRESULT WINAPI ISF_Desktop_fnCreateViewObject (IShellFolder2 * iface,
386 HWND hwndOwner, REFIID riid, LPVOID * ppvOut)
388 IGenericSFImpl *This = (IGenericSFImpl *)iface;
390 LPSHELLVIEW pShellView;
391 HRESULT hr = E_INVALIDARG;
393 TRACE ("(%p)->(hwnd=%p,%s,%p)\n", This, hwndOwner, shdebugstr_guid (riid), ppvOut);
398 if (IsEqualIID (riid, &IID_IDropTarget)) {
399 WARN ("IDropTarget not implemented\n");
401 } else if (IsEqualIID (riid, &IID_IContextMenu)) {
402 WARN ("IContextMenu not implemented\n");
404 } else if (IsEqualIID (riid, &IID_IShellView)) {
405 pShellView = IShellView_Constructor ((IShellFolder *) iface);
407 hr = IShellView_QueryInterface (pShellView, riid, ppvOut);
408 IShellView_Release (pShellView);
412 TRACE ("-- (%p)->(interface=%p)\n", This, ppvOut);
416 /**************************************************************************
417 * ISF_Desktop_fnGetAttributesOf
419 static HRESULT WINAPI ISF_Desktop_fnGetAttributesOf (IShellFolder2 * iface,
420 UINT cidl, LPCITEMIDLIST * apidl, DWORD * rgfInOut)
422 IGenericSFImpl *This = (IGenericSFImpl *)iface;
426 TRACE ("(%p)->(cidl=%d apidl=%p mask=0x%08lx)\n", This, cidl, apidl, *rgfInOut);
428 if ((!cidl) || (!apidl) || (!rgfInOut))
434 while (cidl > 0 && *apidl) {
436 SHELL32_GetItemAttributes (_IShellFolder_ (This), *apidl, rgfInOut);
441 TRACE ("-- result=0x%08lx\n", *rgfInOut);
446 /**************************************************************************
447 * ISF_Desktop_fnGetUIObjectOf
450 * HWND hwndOwner, //[in ] Parent window for any output
451 * UINT cidl, //[in ] array size
452 * LPCITEMIDLIST* apidl, //[in ] simple pidl array
453 * REFIID riid, //[in ] Requested Interface
454 * UINT* prgfInOut, //[ ] reserved
455 * LPVOID* ppvObject) //[out] Resulting Interface
458 static HRESULT WINAPI ISF_Desktop_fnGetUIObjectOf (IShellFolder2 * iface,
461 LPCITEMIDLIST * apidl,
462 REFIID riid, UINT * prgfInOut, LPVOID * ppvOut)
464 IGenericSFImpl *This = (IGenericSFImpl *)iface;
467 IUnknown *pObj = NULL;
468 HRESULT hr = E_INVALIDARG;
470 TRACE ("(%p)->(%p,%u,apidl=%p,%s,%p,%p)\n",
471 This, hwndOwner, cidl, apidl, shdebugstr_guid (riid), prgfInOut, ppvOut);
476 if (IsEqualIID (riid, &IID_IContextMenu)) {
477 pObj = (LPUNKNOWN) ISvItemCm_Constructor ((IShellFolder *) iface, This->pidlRoot, apidl, cidl);
479 } else if (IsEqualIID (riid, &IID_IDataObject) && (cidl >= 1)) {
480 pObj = (LPUNKNOWN) IDataObject_Constructor (hwndOwner, This->pidlRoot, apidl, cidl);
482 } else if (IsEqualIID (riid, &IID_IExtractIconA) && (cidl == 1)) {
483 pidl = ILCombine (This->pidlRoot, apidl[0]);
484 pObj = (LPUNKNOWN) IExtractIconA_Constructor (pidl);
487 } else if (IsEqualIID (riid, &IID_IExtractIconW) && (cidl == 1)) {
488 pidl = ILCombine (This->pidlRoot, apidl[0]);
489 pObj = (LPUNKNOWN) IExtractIconW_Constructor (pidl);
492 } else if (IsEqualIID (riid, &IID_IDropTarget) && (cidl >= 1)) {
493 hr = IShellFolder_QueryInterface (iface, &IID_IDropTarget, (LPVOID *) & pObj);
494 } else if ((IsEqualIID(riid,&IID_IShellLinkW) || IsEqualIID(riid,&IID_IShellLinkA))
496 pidl = ILCombine (This->pidlRoot, apidl[0]);
497 hr = IShellLink_ConstructFromFile(NULL, riid, pidl, (LPVOID*)&pObj);
503 if (SUCCEEDED(hr) && !pObj)
508 TRACE ("(%p)->hr=0x%08lx\n", This, hr);
512 /**************************************************************************
513 * ISF_Desktop_fnGetDisplayNameOf
516 * special case: pidl = null gives desktop-name back
518 static HRESULT WINAPI ISF_Desktop_fnGetDisplayNameOf (IShellFolder2 * iface,
519 LPCITEMIDLIST pidl, DWORD dwFlags, LPSTRRET strRet)
521 IGenericSFImpl *This = (IGenericSFImpl *)iface;
523 CHAR szPath[MAX_PATH];
529 TRACE ("(%p)->(pidl=%p,0x%08lx,%p)\n", This, pidl, dwFlags, strRet);
535 if (_ILIsDesktop (pidl)) {
536 if ((GET_SHGDN_RELATION (dwFlags) == SHGDN_NORMAL) && (GET_SHGDN_FOR (dwFlags) == SHGDN_FORPARSING)) {
537 lstrcpyA (szPath, This->sPathTarget);
539 HCR_GetClassNameA(&CLSID_ShellDesktop, szPath, MAX_PATH);
541 } else if (_ILIsPidlSimple (pidl)) {
542 if ((clsid = _ILGetGUIDPointer (pidl))) {
543 if (GET_SHGDN_FOR (dwFlags) == SHGDN_FORPARSING) {
544 int bWantsForParsing;
547 * we can only get a filesystem path from a shellfolder if the value WantsFORPARSING in
548 * CLSID\\{...}\\shellfolder exists
549 * exception: the MyComputer folder has this keys not but like any filesystem backed
550 * folder it needs these behaviour
552 if (IsEqualIID (clsid, &CLSID_MyComputer)) {
553 bWantsForParsing = 1;
555 /* get the "WantsFORPARSING" flag from the registry */
558 lstrcpyA (szRegPath, "CLSID\\");
559 SHELL32_GUIDToStringA (clsid, &szRegPath[6]);
560 lstrcatA (szRegPath, "\\shellfolder");
563 SHGetValueA (HKEY_CLASSES_ROOT, szRegPath, "WantsFORPARSING", NULL, NULL, NULL));
566 if ((GET_SHGDN_RELATION (dwFlags) == SHGDN_NORMAL) && bWantsForParsing) {
567 /* we need the filesystem path to the destination folder. Only the folder itself can know it */
568 hr = SHELL32_GetDisplayNameOfChild (iface, pidl, dwFlags, szPath, MAX_PATH);
570 /* parsing name like ::{...} */
571 lstrcpyA (szPath, "::");
572 SHELL32_GUIDToStringA (clsid, &szPath[2]);
575 /* user friendly name */
576 HCR_GetClassNameA (clsid, szPath, MAX_PATH);
579 /* file system folder */
580 _ILSimpleGetText (pidl, szPath, MAX_PATH);
582 if (!_ILIsFolder(pidl))
583 SHELL_FS_ProcessDisplayFilename(szPath, dwFlags);
586 /* a complex pidl, let the subfolder do the work */
587 hr = SHELL32_GetDisplayNameOfChild (iface, pidl, dwFlags, szPath, MAX_PATH);
590 if (SUCCEEDED (hr)) {
591 strRet->uType = STRRET_CSTR;
592 lstrcpynA (strRet->u.cStr, szPath, MAX_PATH);
595 TRACE ("-- (%p)->(%s,0x%08lx)\n", This, szPath, hr);
599 /**************************************************************************
600 * ISF_Desktop_fnSetNameOf
601 * Changes the name of a file object or subfolder, possibly changing its item
602 * identifier in the process.
605 * HWND hwndOwner, //[in ] Owner window for output
606 * LPCITEMIDLIST pidl, //[in ] simple pidl of item to change
607 * LPCOLESTR lpszName, //[in ] the items new display name
608 * DWORD dwFlags, //[in ] SHGNO formatting flags
609 * LPITEMIDLIST* ppidlOut) //[out] simple pidl returned
611 static HRESULT WINAPI ISF_Desktop_fnSetNameOf (IShellFolder2 * iface, HWND hwndOwner, LPCITEMIDLIST pidl, /*simple pidl */
612 LPCOLESTR lpName, DWORD dwFlags, LPITEMIDLIST * pPidlOut)
614 IGenericSFImpl *This = (IGenericSFImpl *)iface;
616 FIXME ("(%p)->(%p,pidl=%p,%s,%lu,%p)\n", This, hwndOwner, pidl, debugstr_w (lpName), dwFlags, pPidlOut);
621 static HRESULT WINAPI ISF_Desktop_fnGetDefaultSearchGUID (IShellFolder2 * iface, GUID * pguid)
623 IGenericSFImpl *This = (IGenericSFImpl *)iface;
625 FIXME ("(%p)\n", This);
628 static HRESULT WINAPI ISF_Desktop_fnEnumSearches (IShellFolder2 * iface, IEnumExtraSearch ** ppenum)
630 IGenericSFImpl *This = (IGenericSFImpl *)iface;
631 FIXME ("(%p)\n", This);
634 static HRESULT WINAPI ISF_Desktop_fnGetDefaultColumn (IShellFolder2 * iface,
635 DWORD dwRes, ULONG * pSort, ULONG * pDisplay)
637 IGenericSFImpl *This = (IGenericSFImpl *)iface;
639 TRACE ("(%p)\n", This);
648 static HRESULT WINAPI ISF_Desktop_fnGetDefaultColumnState (IShellFolder2 * iface, UINT iColumn, DWORD * pcsFlags)
650 IGenericSFImpl *This = (IGenericSFImpl *)iface;
652 TRACE ("(%p)\n", This);
654 if (!pcsFlags || iColumn >= DESKTOPSHELLVIEWCOLUMNS)
657 *pcsFlags = DesktopSFHeader[iColumn].pcsFlags;
661 static HRESULT WINAPI ISF_Desktop_fnGetDetailsEx (IShellFolder2 * iface,
662 LPCITEMIDLIST pidl, const SHCOLUMNID * pscid, VARIANT * pv)
664 IGenericSFImpl *This = (IGenericSFImpl *)iface;
665 FIXME ("(%p)\n", This);
669 static HRESULT WINAPI ISF_Desktop_fnGetDetailsOf (IShellFolder2 * iface,
670 LPCITEMIDLIST pidl, UINT iColumn, SHELLDETAILS * psd)
672 IGenericSFImpl *This = (IGenericSFImpl *)iface;
676 TRACE ("(%p)->(%p %i %p)\n", This, pidl, iColumn, psd);
678 if (!psd || iColumn >= DESKTOPSHELLVIEWCOLUMNS)
682 psd->fmt = DesktopSFHeader[iColumn].fmt;
683 psd->cxChar = DesktopSFHeader[iColumn].cxChar;
684 psd->str.uType = STRRET_CSTR;
685 LoadStringA (shell32_hInstance, DesktopSFHeader[iColumn].colnameid, psd->str.u.cStr, MAX_PATH);
688 /* the data from the pidl */
691 hr = IShellFolder_GetDisplayNameOf (iface, pidl, SHGDN_NORMAL | SHGDN_INFOLDER, &psd->str);
694 _ILGetFileSize (pidl, psd->str.u.cStr, MAX_PATH);
697 _ILGetFileType (pidl, psd->str.u.cStr, MAX_PATH);
700 _ILGetFileDate (pidl, psd->str.u.cStr, MAX_PATH);
702 case 4: /* attributes */
703 _ILGetFileAttributes (pidl, psd->str.u.cStr, MAX_PATH);
707 psd->str.uType = STRRET_CSTR;
712 static HRESULT WINAPI ISF_Desktop_fnMapColumnToSCID (IShellFolder2 * iface, UINT column, SHCOLUMNID * pscid)
714 IGenericSFImpl *This = (IGenericSFImpl *)iface;
715 FIXME ("(%p)\n", This);
719 static IShellFolder2Vtbl vt_MCFldr_ShellFolder2 =
721 ISF_Desktop_fnQueryInterface,
722 ISF_Desktop_fnAddRef,
723 ISF_Desktop_fnRelease,
724 ISF_Desktop_fnParseDisplayName,
725 ISF_Desktop_fnEnumObjects,
726 ISF_Desktop_fnBindToObject,
727 ISF_Desktop_fnBindToStorage,
728 ISF_Desktop_fnCompareIDs,
729 ISF_Desktop_fnCreateViewObject,
730 ISF_Desktop_fnGetAttributesOf,
731 ISF_Desktop_fnGetUIObjectOf,
732 ISF_Desktop_fnGetDisplayNameOf,
733 ISF_Desktop_fnSetNameOf,
735 ISF_Desktop_fnGetDefaultSearchGUID,
736 ISF_Desktop_fnEnumSearches,
737 ISF_Desktop_fnGetDefaultColumn,
738 ISF_Desktop_fnGetDefaultColumnState,
739 ISF_Desktop_fnGetDetailsEx,
740 ISF_Desktop_fnGetDetailsOf,
741 ISF_Desktop_fnMapColumnToSCID};