3 * Virtual Workplace 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"
31 #define NONAMELESSUNION
32 #define NONAMELESSSTRUCT
42 #include "undocshell.h"
43 #include "shell32_main.h"
46 #include "shellfolder.h"
47 #include "wine/debug.h"
51 WINE_DEFAULT_DEBUG_CHANNEL (shell);
53 /***********************************************************************
54 * IShellFolder implementation
58 ICOM_VFIELD (IShellFolder2);
60 ICOM_VTABLE (IPersistFolder2) * lpVtblPersistFolder2;
62 /* both paths are parsible from the desktop */
63 LPITEMIDLIST pidlRoot; /* absolute pidl */
64 int dwAttributes; /* attributes returned by GetAttributesOf FIXME: use it */
67 static struct ICOM_VTABLE (IShellFolder2) vt_ShellFolder2;
68 static struct ICOM_VTABLE (IPersistFolder2) vt_PersistFolder2;
70 #define _IPersistFolder2_Offset ((int)(&(((IGenericSFImpl*)0)->lpVtblPersistFolder2)))
71 #define _ICOM_THIS_From_IPersistFolder2(class, name) class* This = (class*)(((char*)name)-_IPersistFolder2_Offset);
74 converts This to a interface pointer
76 #define _IUnknown_(This) (IUnknown*)&(This->lpVtbl)
77 #define _IShellFolder_(This) (IShellFolder*)&(This->lpVtbl)
78 #define _IShellFolder2_(This) (IShellFolder2*)&(This->lpVtbl)
80 #define _IPersist_(This) (IPersist*)&(This->lpVtblPersistFolder2)
81 #define _IPersistFolder_(This) (IPersistFolder*)&(This->lpVtblPersistFolder2)
82 #define _IPersistFolder2_(This) (IPersistFolder2*)&(This->lpVtblPersistFolder2)
84 /***********************************************************************
85 * IShellFolder [MyComputer] implementation
88 static shvheader MyComputerSFHeader[] = {
89 {IDS_SHV_COLUMN1, SHCOLSTATE_TYPE_STR | SHCOLSTATE_ONBYDEFAULT, LVCFMT_RIGHT, 15},
90 {IDS_SHV_COLUMN3, SHCOLSTATE_TYPE_STR | SHCOLSTATE_ONBYDEFAULT, LVCFMT_RIGHT, 10},
91 {IDS_SHV_COLUMN6, SHCOLSTATE_TYPE_STR | SHCOLSTATE_ONBYDEFAULT, LVCFMT_RIGHT, 10},
92 {IDS_SHV_COLUMN7, SHCOLSTATE_TYPE_STR | SHCOLSTATE_ONBYDEFAULT, LVCFMT_RIGHT, 10},
95 #define MYCOMPUTERSHELLVIEWCOLUMNS 4
97 /**************************************************************************
98 * ISF_MyComputer_Constructor
100 HRESULT WINAPI ISF_MyComputer_Constructor (IUnknown * pUnkOuter, REFIID riid, LPVOID * ppv)
104 TRACE ("unkOut=%p %s\n", pUnkOuter, shdebugstr_guid (riid));
109 return CLASS_E_NOAGGREGATION;
111 sf = (IGenericSFImpl *) LocalAlloc (GMEM_ZEROINIT, sizeof (IGenericSFImpl));
113 return E_OUTOFMEMORY;
116 sf->lpVtbl = &vt_ShellFolder2;
117 sf->lpVtblPersistFolder2 = &vt_PersistFolder2;
118 sf->pidlRoot = _ILCreateMyComputer (); /* my qualified pidl */
120 if (!SUCCEEDED (IUnknown_QueryInterface (_IUnknown_ (sf), riid, ppv))) {
121 IUnknown_Release (_IUnknown_ (sf));
122 return E_NOINTERFACE;
125 TRACE ("--(%p)\n", sf);
129 /**************************************************************************
130 * ISF_MyComputer_fnQueryInterface
132 * NOTES supports not IPersist/IPersistFolder
134 static HRESULT WINAPI ISF_MyComputer_fnQueryInterface (IShellFolder2 * iface, REFIID riid, LPVOID * ppvObj)
136 ICOM_THIS (IGenericSFImpl, iface);
138 TRACE ("(%p)->(%s,%p)\n", This, shdebugstr_guid (riid), ppvObj);
142 if (IsEqualIID (riid, &IID_IUnknown) ||
143 IsEqualIID (riid, &IID_IShellFolder) || IsEqualIID (riid, &IID_IShellFolder2)) {
145 } else if (IsEqualIID (riid, &IID_IPersist) ||
146 IsEqualIID (riid, &IID_IPersistFolder) || IsEqualIID (riid, &IID_IPersistFolder2)) {
147 *ppvObj = _IPersistFolder2_ (This);
151 IUnknown_AddRef ((IUnknown *) (*ppvObj));
152 TRACE ("-- Interface: (%p)->(%p)\n", ppvObj, *ppvObj);
155 TRACE ("-- Interface: E_NOINTERFACE\n");
156 return E_NOINTERFACE;
159 static ULONG WINAPI ISF_MyComputer_fnAddRef (IShellFolder2 * iface)
161 ICOM_THIS (IGenericSFImpl, iface);
163 TRACE ("(%p)->(count=%lu)\n", This, This->ref);
165 return ++(This->ref);
168 static ULONG WINAPI ISF_MyComputer_fnRelease (IShellFolder2 * iface)
170 ICOM_THIS (IGenericSFImpl, iface);
172 TRACE ("(%p)->(count=%lu)\n", This, This->ref);
174 if (!--(This->ref)) {
175 TRACE ("-- destroying IShellFolder(%p)\n", This);
177 SHFree (This->pidlRoot);
178 LocalFree ((HLOCAL) This);
184 /**************************************************************************
185 * ISF_MyComputer_fnParseDisplayName
187 static HRESULT WINAPI
188 ISF_MyComputer_fnParseDisplayName (IShellFolder2 * iface,
191 LPOLESTR lpszDisplayName,
192 DWORD * pchEaten, LPITEMIDLIST * ppidl, DWORD * pdwAttributes)
194 ICOM_THIS (IGenericSFImpl, iface);
196 HRESULT hr = E_INVALIDARG;
197 LPCWSTR szNext = NULL;
198 WCHAR szElement[MAX_PATH];
199 CHAR szTempA[MAX_PATH];
200 LPITEMIDLIST pidlTemp = NULL;
203 TRACE ("(%p)->(HWND=%p,%p,%p=%s,%p,pidl=%p,%p)\n",
204 This, hwndOwner, pbc, lpszDisplayName, debugstr_w (lpszDisplayName), pchEaten, ppidl, pdwAttributes);
208 *pchEaten = 0; /* strange but like the original */
210 /* handle CLSID paths */
211 if (lpszDisplayName[0] == ':' && lpszDisplayName[1] == ':') {
212 szNext = GetNextElementW (lpszDisplayName, szElement, MAX_PATH);
213 TRACE ("-- element: %s\n", debugstr_w (szElement));
214 SHCLSIDFromStringW (szElement + 2, &clsid);
215 pidlTemp = _ILCreate (PT_MYCOMP, &clsid, sizeof (clsid));
217 /* do we have an absolute path name ? */
218 else if (PathGetDriveNumberW (lpszDisplayName) >= 0 && lpszDisplayName[2] == (WCHAR) '\\') {
219 szNext = GetNextElementW (lpszDisplayName, szElement, MAX_PATH);
220 WideCharToMultiByte (CP_ACP, 0, szElement, -1, szTempA, MAX_PATH, NULL, NULL);
221 pidlTemp = _ILCreateDrive (szTempA);
224 if (szNext && *szNext) {
225 hr = SHELL32_ParseNextElement (iface, hwndOwner, pbc, &pidlTemp, (LPOLESTR) szNext, pchEaten, pdwAttributes);
227 if (pdwAttributes && *pdwAttributes) {
228 SHELL32_GetItemAttributes (_IShellFolder_ (This), pidlTemp, pdwAttributes);
235 TRACE ("(%p)->(-- ret=0x%08lx)\n", This, hr);
240 /**************************************************************************
241 * ISF_MyComputer_fnEnumObjects
243 static HRESULT WINAPI
244 ISF_MyComputer_fnEnumObjects (IShellFolder2 * iface, HWND hwndOwner, DWORD dwFlags, LPENUMIDLIST * ppEnumIDList)
246 ICOM_THIS (IGenericSFImpl, iface);
248 TRACE ("(%p)->(HWND=%p flags=0x%08lx pplist=%p)\n", This, hwndOwner, dwFlags, ppEnumIDList);
250 *ppEnumIDList = IEnumIDList_Constructor (NULL, dwFlags, EIDL_MYCOMP);
252 TRACE ("-- (%p)->(new ID List: %p)\n", This, *ppEnumIDList);
254 return (*ppEnumIDList) ? S_OK : E_OUTOFMEMORY;
257 /**************************************************************************
258 * ISF_MyComputer_fnBindToObject
260 static HRESULT WINAPI
261 ISF_MyComputer_fnBindToObject (IShellFolder2 * iface, LPCITEMIDLIST pidl,
262 LPBC pbcReserved, REFIID riid, LPVOID * ppvOut)
264 ICOM_THIS (IGenericSFImpl, iface);
266 TRACE ("(%p)->(pidl=%p,%p,%s,%p)\n", This, pidl, pbcReserved, shdebugstr_guid (riid), ppvOut);
268 return SHELL32_BindToChild (This->pidlRoot, NULL, pidl, riid, ppvOut);
271 /**************************************************************************
272 * ISF_MyComputer_fnBindToStorage
274 static HRESULT WINAPI
275 ISF_MyComputer_fnBindToStorage (IShellFolder2 * iface,
276 LPCITEMIDLIST pidl, LPBC pbcReserved, REFIID riid, LPVOID * ppvOut)
278 ICOM_THIS (IGenericSFImpl, iface);
280 FIXME ("(%p)->(pidl=%p,%p,%s,%p) stub\n", This, pidl, pbcReserved, shdebugstr_guid (riid), ppvOut);
286 /**************************************************************************
287 * ISF_MyComputer_fnCompareIDs
290 static HRESULT WINAPI
291 ISF_MyComputer_fnCompareIDs (IShellFolder2 * iface, LPARAM lParam, LPCITEMIDLIST pidl1, LPCITEMIDLIST pidl2)
293 ICOM_THIS (IGenericSFImpl, iface);
297 TRACE ("(%p)->(0x%08lx,pidl1=%p,pidl2=%p)\n", This, lParam, pidl1, pidl2);
298 nReturn = SHELL32_CompareIDs (_IShellFolder_ (This), lParam, pidl1, pidl2);
299 TRACE ("-- %i\n", nReturn);
303 /**************************************************************************
304 * ISF_MyComputer_fnCreateViewObject
306 static HRESULT WINAPI
307 ISF_MyComputer_fnCreateViewObject (IShellFolder2 * iface, HWND hwndOwner, REFIID riid, LPVOID * ppvOut)
309 ICOM_THIS (IGenericSFImpl, iface);
311 LPSHELLVIEW pShellView;
312 HRESULT hr = E_INVALIDARG;
314 TRACE ("(%p)->(hwnd=%p,%s,%p)\n", This, hwndOwner, shdebugstr_guid (riid), ppvOut);
319 if (IsEqualIID (riid, &IID_IDropTarget)) {
320 WARN ("IDropTarget not implemented\n");
322 } else if (IsEqualIID (riid, &IID_IContextMenu)) {
323 WARN ("IContextMenu not implemented\n");
325 } else if (IsEqualIID (riid, &IID_IShellView)) {
326 pShellView = IShellView_Constructor ((IShellFolder *) iface);
328 hr = IShellView_QueryInterface (pShellView, riid, ppvOut);
329 IShellView_Release (pShellView);
333 TRACE ("-- (%p)->(interface=%p)\n", This, ppvOut);
337 /**************************************************************************
338 * ISF_MyComputer_fnGetAttributesOf
340 static HRESULT WINAPI
341 ISF_MyComputer_fnGetAttributesOf (IShellFolder2 * iface, UINT cidl, LPCITEMIDLIST * apidl, DWORD * rgfInOut)
343 ICOM_THIS (IGenericSFImpl, iface);
347 TRACE ("(%p)->(cidl=%d apidl=%p mask=0x%08lx)\n", This, cidl, apidl, *rgfInOut);
349 if ((!cidl) || (!apidl) || (!rgfInOut))
352 while (cidl > 0 && *apidl) {
354 SHELL32_GetItemAttributes (_IShellFolder_ (This), *apidl, rgfInOut);
359 TRACE ("-- result=0x%08lx\n", *rgfInOut);
363 /**************************************************************************
364 * ISF_MyComputer_fnGetUIObjectOf
367 * HWND hwndOwner, //[in ] Parent window for any output
368 * UINT cidl, //[in ] array size
369 * LPCITEMIDLIST* apidl, //[in ] simple pidl array
370 * REFIID riid, //[in ] Requested Interface
371 * UINT* prgfInOut, //[ ] reserved
372 * LPVOID* ppvObject) //[out] Resulting Interface
375 static HRESULT WINAPI
376 ISF_MyComputer_fnGetUIObjectOf (IShellFolder2 * iface,
378 UINT cidl, LPCITEMIDLIST * apidl, REFIID riid, UINT * prgfInOut, LPVOID * ppvOut)
380 ICOM_THIS (IGenericSFImpl, iface);
383 IUnknown *pObj = NULL;
384 HRESULT hr = E_INVALIDARG;
386 TRACE ("(%p)->(%p,%u,apidl=%p,%s,%p,%p)\n",
387 This, hwndOwner, cidl, apidl, shdebugstr_guid (riid), prgfInOut, ppvOut);
392 if (IsEqualIID (riid, &IID_IContextMenu) && (cidl >= 1)) {
393 pObj = (LPUNKNOWN) ISvItemCm_Constructor ((IShellFolder *) iface, This->pidlRoot, apidl, cidl);
395 } else if (IsEqualIID (riid, &IID_IDataObject) && (cidl >= 1)) {
396 pObj = (LPUNKNOWN) IDataObject_Constructor (hwndOwner, This->pidlRoot, apidl, cidl);
398 } else if (IsEqualIID (riid, &IID_IExtractIconA) && (cidl == 1)) {
399 pidl = ILCombine (This->pidlRoot, apidl[0]);
400 pObj = (LPUNKNOWN) IExtractIconA_Constructor (pidl);
403 } else if (IsEqualIID (riid, &IID_IExtractIconW) && (cidl == 1)) {
404 pidl = ILCombine (This->pidlRoot, apidl[0]);
405 pObj = (LPUNKNOWN) IExtractIconW_Constructor (pidl);
408 } else if (IsEqualIID (riid, &IID_IDropTarget) && (cidl >= 1)) {
409 hr = IShellFolder_QueryInterface (iface, &IID_IDropTarget, (LPVOID *) & pObj);
410 } else if ((IsEqualIID(riid,&IID_IShellLinkW) || IsEqualIID(riid,&IID_IShellLinkA))
412 pidl = ILCombine (This->pidlRoot, apidl[0]);
413 hr = IShellLink_ConstructFromFile(NULL, riid, pidl, (LPVOID*)&pObj);
419 if (SUCCEEDED(hr) && !pObj)
424 TRACE ("(%p)->hr=0x%08lx\n", This, hr);
428 /**************************************************************************
429 * ISF_MyComputer_fnGetDisplayNameOf
431 static HRESULT WINAPI ISF_MyComputer_fnGetDisplayNameOf (IShellFolder2 * iface, LPCITEMIDLIST pidl, DWORD dwFlags, LPSTRRET strRet)
433 ICOM_THIS (IGenericSFImpl, iface);
435 char szPath[MAX_PATH],
441 TRACE ("(%p)->(pidl=%p,0x%08lx,%p)\n", This, pidl, dwFlags, strRet);
450 bSimplePidl = _ILIsPidlSimple (pidl);
452 if (!pidl->mkid.cb) {
453 /* parsing name like ::{...} */
454 lstrcpyA (szPath, "::");
455 SHELL32_GUIDToStringA(&CLSID_MyComputer, &szPath[2]);
456 } else if (_ILIsSpecialFolder (pidl)) {
457 /* take names of special folders only if its only this folder */
461 if ((clsid = _ILGetGUIDPointer (pidl))) {
462 if (GET_SHGDN_FOR (dwFlags) == SHGDN_FORPARSING) {
463 int bWantsForParsing;
466 * we can only get a filesystem path from a shellfolder if the value WantsFORPARSING in
467 * CLSID\\{...}\\shellfolder exists
468 * exception: the MyComputer folder has this keys not but like any filesystem backed
469 * folder it needs these behaviour
471 /* get the "WantsFORPARSING" flag from the registry */
474 lstrcpyA (szRegPath, "CLSID\\");
475 SHELL32_GUIDToStringA (clsid, &szRegPath[6]);
476 lstrcatA (szRegPath, "\\shellfolder");
479 SHGetValueA (HKEY_CLASSES_ROOT, szRegPath, "WantsFORPARSING", NULL, NULL, NULL));
481 if ((GET_SHGDN_RELATION (dwFlags) == SHGDN_NORMAL) && bWantsForParsing) {
482 /* we need the filesystem path to the destination folder. Only the folder itself can know it */
483 hr = SHELL32_GetDisplayNameOfChild (iface, pidl, dwFlags, szPath, MAX_PATH);
487 /* parsing name like ::{...} */
488 p = lstrcpyA(szPath, "::") + 2;
489 p += SHELL32_GUIDToStringA(&CLSID_MyComputer, p);
493 SHELL32_GUIDToStringA(clsid, p);
496 /* user friendly name */
497 HCR_GetClassNameA (clsid, szPath, MAX_PATH);
500 _ILSimpleGetText (pidl, szPath, MAX_PATH); /* append my own path */
502 FIXME ("special folder\n");
505 if (!_ILIsDrive (pidl)) {
506 ERR ("Wrong pidl type\n");
510 _ILSimpleGetText (pidl, szPath, MAX_PATH); /* append my own path */
512 /* long view "lw_name (C:)" */
513 if (bSimplePidl && !(dwFlags & SHGDN_FORPARSING)) {
514 DWORD dwVolumeSerialNumber,
515 dwMaximumComponetLength,
518 GetVolumeInformationA (szPath, szDrive, sizeof (szDrive) - 6, &dwVolumeSerialNumber,
519 &dwMaximumComponetLength, &dwFileSystemFlags, NULL, 0);
520 strcat (szDrive, " (");
521 strncat (szDrive, szPath, 2);
522 strcat (szDrive, ")");
523 strcpy (szPath, szDrive);
527 if (!bSimplePidl) { /* go deeper if needed */
528 PathAddBackslashA (szPath);
529 len = strlen (szPath);
531 hr = SHELL32_GetDisplayNameOfChild (iface, pidl, dwFlags | SHGDN_INFOLDER, szPath + len, MAX_PATH - len);
534 if (SUCCEEDED (hr)) {
535 strRet->uType = STRRET_CSTR;
536 lstrcpynA (strRet->u.cStr, szPath, MAX_PATH);
539 TRACE ("-- (%p)->(%s)\n", This, szPath);
543 /**************************************************************************
544 * ISF_MyComputer_fnSetNameOf
545 * Changes the name of a file object or subfolder, possibly changing its item
546 * identifier in the process.
549 * HWND hwndOwner, //[in ] Owner window for output
550 * LPCITEMIDLIST pidl, //[in ] simple pidl of item to change
551 * LPCOLESTR lpszName, //[in ] the items new display name
552 * DWORD dwFlags, //[in ] SHGNO formatting flags
553 * LPITEMIDLIST* ppidlOut) //[out] simple pidl returned
555 static HRESULT WINAPI ISF_MyComputer_fnSetNameOf (IShellFolder2 * iface, HWND hwndOwner, LPCITEMIDLIST pidl, /*simple pidl */
556 LPCOLESTR lpName, DWORD dwFlags, LPITEMIDLIST * pPidlOut)
558 ICOM_THIS (IGenericSFImpl, iface);
559 FIXME ("(%p)->(%p,pidl=%p,%s,%lu,%p)\n", This, hwndOwner, pidl, debugstr_w (lpName), dwFlags, pPidlOut);
563 static HRESULT WINAPI ISF_MyComputer_fnGetDefaultSearchGUID (IShellFolder2 * iface, GUID * pguid)
565 ICOM_THIS (IGenericSFImpl, iface);
566 FIXME ("(%p)\n", This);
569 static HRESULT WINAPI ISF_MyComputer_fnEnumSearches (IShellFolder2 * iface, IEnumExtraSearch ** ppenum)
571 ICOM_THIS (IGenericSFImpl, iface);
572 FIXME ("(%p)\n", This);
575 static HRESULT WINAPI ISF_MyComputer_fnGetDefaultColumn (IShellFolder2 * iface, DWORD dwRes, ULONG * pSort, ULONG * pDisplay)
577 ICOM_THIS (IGenericSFImpl, iface);
579 TRACE ("(%p)\n", This);
581 if (pSort) *pSort = 0;
582 if (pDisplay) *pDisplay = 0;
585 static HRESULT WINAPI ISF_MyComputer_fnGetDefaultColumnState (IShellFolder2 * iface, UINT iColumn, DWORD * pcsFlags)
587 ICOM_THIS (IGenericSFImpl, iface);
589 TRACE ("(%p)\n", This);
591 if (!pcsFlags || iColumn >= MYCOMPUTERSHELLVIEWCOLUMNS) return E_INVALIDARG;
592 *pcsFlags = MyComputerSFHeader[iColumn].pcsFlags;
595 static HRESULT WINAPI ISF_MyComputer_fnGetDetailsEx (IShellFolder2 * iface, LPCITEMIDLIST pidl, const SHCOLUMNID * pscid, VARIANT * pv)
597 ICOM_THIS (IGenericSFImpl, iface);
598 FIXME ("(%p)\n", This);
602 /* FIXME: drive size >4GB is rolling over */
603 static HRESULT WINAPI ISF_MyComputer_fnGetDetailsOf (IShellFolder2 * iface, LPCITEMIDLIST pidl, UINT iColumn, SHELLDETAILS * psd)
605 ICOM_THIS (IGenericSFImpl, iface);
608 TRACE ("(%p)->(%p %i %p)\n", This, pidl, iColumn, psd);
610 if (!psd || iColumn >= MYCOMPUTERSHELLVIEWCOLUMNS)
614 psd->fmt = MyComputerSFHeader[iColumn].fmt;
615 psd->cxChar = MyComputerSFHeader[iColumn].cxChar;
616 psd->str.uType = STRRET_CSTR;
617 LoadStringA (shell32_hInstance, MyComputerSFHeader[iColumn].colnameid, psd->str.u.cStr, MAX_PATH);
620 char szPath[MAX_PATH];
621 ULARGE_INTEGER ulBytes;
623 psd->str.u.cStr[0] = 0x00;
624 psd->str.uType = STRRET_CSTR;
627 hr = IShellFolder_GetDisplayNameOf (iface, pidl, SHGDN_NORMAL | SHGDN_INFOLDER, &psd->str);
630 _ILGetFileType (pidl, psd->str.u.cStr, MAX_PATH);
632 case 2: /* total size */
633 if (_ILIsDrive (pidl)) {
634 _ILSimpleGetText (pidl, szPath, MAX_PATH);
635 GetDiskFreeSpaceExA (szPath, NULL, &ulBytes, NULL);
636 StrFormatByteSizeA (ulBytes.u.LowPart, psd->str.u.cStr, MAX_PATH);
639 case 3: /* free size */
640 if (_ILIsDrive (pidl)) {
641 _ILSimpleGetText (pidl, szPath, MAX_PATH);
642 GetDiskFreeSpaceExA (szPath, &ulBytes, NULL, NULL);
643 StrFormatByteSizeA (ulBytes.u.LowPart, psd->str.u.cStr, MAX_PATH);
652 static HRESULT WINAPI ISF_MyComputer_fnMapColumnToSCID (IShellFolder2 * iface, UINT column, SHCOLUMNID * pscid)
654 ICOM_THIS (IGenericSFImpl, iface);
655 FIXME ("(%p)\n", This);
659 static ICOM_VTABLE (IShellFolder2) vt_ShellFolder2 =
661 ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE
662 ISF_MyComputer_fnQueryInterface,
663 ISF_MyComputer_fnAddRef,
664 ISF_MyComputer_fnRelease,
665 ISF_MyComputer_fnParseDisplayName,
666 ISF_MyComputer_fnEnumObjects,
667 ISF_MyComputer_fnBindToObject,
668 ISF_MyComputer_fnBindToStorage,
669 ISF_MyComputer_fnCompareIDs,
670 ISF_MyComputer_fnCreateViewObject,
671 ISF_MyComputer_fnGetAttributesOf,
672 ISF_MyComputer_fnGetUIObjectOf,
673 ISF_MyComputer_fnGetDisplayNameOf,
674 ISF_MyComputer_fnSetNameOf,
676 ISF_MyComputer_fnGetDefaultSearchGUID,
677 ISF_MyComputer_fnEnumSearches,
678 ISF_MyComputer_fnGetDefaultColumn,
679 ISF_MyComputer_fnGetDefaultColumnState,
680 ISF_MyComputer_fnGetDetailsEx,
681 ISF_MyComputer_fnGetDetailsOf,
682 ISF_MyComputer_fnMapColumnToSCID
685 /************************************************************************
686 * IMCFldr_PersistFolder2_QueryInterface
688 static HRESULT WINAPI IMCFldr_PersistFolder2_QueryInterface (IPersistFolder2 * iface, REFIID iid, LPVOID * ppvObj)
690 _ICOM_THIS_From_IPersistFolder2 (IGenericSFImpl, iface);
692 TRACE ("(%p)\n", This);
694 return IUnknown_QueryInterface (_IUnknown_ (This), iid, ppvObj);
697 /************************************************************************
698 * IMCFldr_PersistFolder2_AddRef
700 static ULONG WINAPI IMCFldr_PersistFolder2_AddRef (IPersistFolder2 * iface)
702 _ICOM_THIS_From_IPersistFolder2 (IGenericSFImpl, iface);
704 TRACE ("(%p)->(count=%lu)\n", This, This->ref);
706 return IUnknown_AddRef (_IUnknown_ (This));
709 /************************************************************************
710 * ISFPersistFolder_Release
712 static ULONG WINAPI IMCFldr_PersistFolder2_Release (IPersistFolder2 * iface)
714 _ICOM_THIS_From_IPersistFolder2 (IGenericSFImpl, iface);
716 TRACE ("(%p)->(count=%lu)\n", This, This->ref);
718 return IUnknown_Release (_IUnknown_ (This));
721 /************************************************************************
722 * IMCFldr_PersistFolder2_GetClassID
724 static HRESULT WINAPI IMCFldr_PersistFolder2_GetClassID (IPersistFolder2 * iface, CLSID * lpClassId)
726 _ICOM_THIS_From_IPersistFolder2 (IGenericSFImpl, iface);
728 TRACE ("(%p)\n", This);
732 *lpClassId = CLSID_MyComputer;
737 /************************************************************************
738 * IMCFldr_PersistFolder2_Initialize
740 * NOTES: it makes no sense to change the pidl
742 static HRESULT WINAPI IMCFldr_PersistFolder2_Initialize (IPersistFolder2 * iface, LPCITEMIDLIST pidl)
744 _ICOM_THIS_From_IPersistFolder2 (IGenericSFImpl, iface);
745 TRACE ("(%p)->(%p)\n", This, pidl);
749 /**************************************************************************
750 * IPersistFolder2_fnGetCurFolder
752 static HRESULT WINAPI IMCFldr_PersistFolder2_GetCurFolder (IPersistFolder2 * iface, LPITEMIDLIST * pidl)
754 _ICOM_THIS_From_IPersistFolder2 (IGenericSFImpl, iface);
756 TRACE ("(%p)->(%p)\n", This, pidl);
760 *pidl = ILClone (This->pidlRoot);
764 static ICOM_VTABLE (IPersistFolder2) vt_PersistFolder2 =
766 ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE
767 IMCFldr_PersistFolder2_QueryInterface,
768 IMCFldr_PersistFolder2_AddRef,
769 IMCFldr_PersistFolder2_Release,
770 IMCFldr_PersistFolder2_GetClassID,
771 IMCFldr_PersistFolder2_Initialize,
772 IMCFldr_PersistFolder2_GetCurFolder