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"
38 #include "wine/obj_base.h"
39 #include "wine/obj_dragdrop.h"
40 #include "wine/obj_shellfolder.h"
41 #include "undocshell.h"
42 #include "shell32_main.h"
45 #include "shellfolder.h"
46 #include "wine/debug.h"
50 WINE_DEFAULT_DEBUG_CHANNEL (shell
);
52 /***********************************************************************
53 * IShellFolder implementation
57 ICOM_VFIELD (IShellFolder2
);
59 ICOM_VTABLE (IPersistFolder2
) * lpVtblPersistFolder2
;
61 /* both paths are parsible from the desktop */
62 LPITEMIDLIST pidlRoot
; /* absolute pidl */
63 int dwAttributes
; /* attributes returned by GetAttributesOf FIXME: use it */
66 static struct ICOM_VTABLE (IShellFolder2
) vt_ShellFolder2
;
67 static struct ICOM_VTABLE (IPersistFolder2
) vt_PersistFolder2
;
69 HRESULT WINAPI
ISF_MyComputer_Constructor (IUnknown
* pUnkOuter
, REFIID riid
, LPVOID
* ppv
);
71 #define _IPersistFolder2_Offset ((int)(&(((IGenericSFImpl*)0)->lpVtblPersistFolder2)))
72 #define _ICOM_THIS_From_IPersistFolder2(class, name) class* This = (class*)(((char*)name)-_IPersistFolder2_Offset);
75 converts This to a interface pointer
77 #define _IUnknown_(This) (IUnknown*)&(This->lpVtbl)
78 #define _IShellFolder_(This) (IShellFolder*)&(This->lpVtbl)
79 #define _IShellFolder2_(This) (IShellFolder2*)&(This->lpVtbl)
81 #define _IPersist_(This) (IPersist*)&(This->lpVtblPersistFolder2)
82 #define _IPersistFolder_(This) (IPersistFolder*)&(This->lpVtblPersistFolder2)
83 #define _IPersistFolder2_(This) (IPersistFolder2*)&(This->lpVtblPersistFolder2)
85 /***********************************************************************
86 * IShellFolder [MyComputer] implementation
89 static shvheader MyComputerSFHeader
[] = {
90 {IDS_SHV_COLUMN1
, SHCOLSTATE_TYPE_STR
| SHCOLSTATE_ONBYDEFAULT
, LVCFMT_RIGHT
, 15},
91 {IDS_SHV_COLUMN3
, SHCOLSTATE_TYPE_STR
| SHCOLSTATE_ONBYDEFAULT
, LVCFMT_RIGHT
, 10},
92 {IDS_SHV_COLUMN6
, SHCOLSTATE_TYPE_STR
| SHCOLSTATE_ONBYDEFAULT
, LVCFMT_RIGHT
, 10},
93 {IDS_SHV_COLUMN7
, SHCOLSTATE_TYPE_STR
| SHCOLSTATE_ONBYDEFAULT
, LVCFMT_RIGHT
, 10},
96 #define MYCOMPUTERSHELLVIEWCOLUMNS 4
98 /**************************************************************************
99 * ISF_MyComputer_Constructor
101 HRESULT WINAPI
ISF_MyComputer_Constructor (IUnknown
* pUnkOuter
, REFIID riid
, LPVOID
* ppv
)
105 TRACE ("unkOut=%p %s\n", pUnkOuter
, shdebugstr_guid (riid
));
110 return CLASS_E_NOAGGREGATION
;
112 sf
= (IGenericSFImpl
*) LocalAlloc (GMEM_ZEROINIT
, sizeof (IGenericSFImpl
));
114 return E_OUTOFMEMORY
;
117 ICOM_VTBL (sf
) = &vt_ShellFolder2
;
118 sf
->lpVtblPersistFolder2
= &vt_PersistFolder2
;
119 sf
->pidlRoot
= _ILCreateMyComputer (); /* my qualified pidl */
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_MyComputer_fnQueryInterface
133 * NOTES supports not IPersist/IPersistFolder
135 static HRESULT WINAPI
ISF_MyComputer_fnQueryInterface (IShellFolder2
* iface
, REFIID riid
, LPVOID
* ppvObj
)
137 ICOM_THIS (IGenericSFImpl
, iface
);
139 TRACE ("(%p)->(%s,%p)\n", This
, shdebugstr_guid (riid
), ppvObj
);
143 if (IsEqualIID (riid
, &IID_IUnknown
) ||
144 IsEqualIID (riid
, &IID_IShellFolder
) || IsEqualIID (riid
, &IID_IShellFolder2
)) {
146 } else if (IsEqualIID (riid
, &IID_IPersist
) ||
147 IsEqualIID (riid
, &IID_IPersistFolder
) || IsEqualIID (riid
, &IID_IPersistFolder2
)) {
148 *ppvObj
= _IPersistFolder2_ (This
);
152 IUnknown_AddRef ((IUnknown
*) (*ppvObj
));
153 TRACE ("-- Interface: (%p)->(%p)\n", ppvObj
, *ppvObj
);
156 TRACE ("-- Interface: E_NOINTERFACE\n");
157 return E_NOINTERFACE
;
160 static ULONG WINAPI
ISF_MyComputer_fnAddRef (IShellFolder2
* iface
)
162 ICOM_THIS (IGenericSFImpl
, iface
);
164 TRACE ("(%p)->(count=%lu)\n", This
, This
->ref
);
166 return ++(This
->ref
);
169 static ULONG WINAPI
ISF_MyComputer_fnRelease (IShellFolder2
* iface
)
171 ICOM_THIS (IGenericSFImpl
, iface
);
173 TRACE ("(%p)->(count=%lu)\n", This
, This
->ref
);
175 if (!--(This
->ref
)) {
176 TRACE ("-- destroying IShellFolder(%p)\n", This
);
178 SHFree (This
->pidlRoot
);
179 LocalFree ((HLOCAL
) This
);
185 /**************************************************************************
186 * ISF_MyComputer_fnParseDisplayName
188 static HRESULT WINAPI
189 ISF_MyComputer_fnParseDisplayName (IShellFolder2
* iface
,
192 LPOLESTR lpszDisplayName
,
193 DWORD
* pchEaten
, LPITEMIDLIST
* ppidl
, DWORD
* pdwAttributes
)
195 ICOM_THIS (IGenericSFImpl
, iface
);
197 HRESULT hr
= E_OUTOFMEMORY
;
198 LPCWSTR szNext
= NULL
;
199 WCHAR szElement
[MAX_PATH
];
200 CHAR szTempA
[MAX_PATH
];
201 LPITEMIDLIST pidlTemp
;
203 TRACE ("(%p)->(HWND=0x%08x,%p,%p=%s,%p,pidl=%p,%p)\n",
204 This
, hwndOwner
, pbcReserved
, lpszDisplayName
, debugstr_w (lpszDisplayName
), pchEaten
, ppidl
, pdwAttributes
);
208 *pchEaten
= 0; /* strange but like the original */
210 /* do we have an absolute path name ? */
211 if (PathGetDriveNumberW (lpszDisplayName
) >= 0 && lpszDisplayName
[2] == (WCHAR
) '\\') {
212 szNext
= GetNextElementW (lpszDisplayName
, szElement
, MAX_PATH
);
213 WideCharToMultiByte (CP_ACP
, 0, szElement
, -1, szTempA
, MAX_PATH
, NULL
, NULL
);
214 pidlTemp
= _ILCreateDrive (szTempA
);
216 if (szNext
&& *szNext
) {
217 hr
= SHELL32_ParseNextElement (hwndOwner
, iface
, &pidlTemp
, (LPOLESTR
) szNext
, pchEaten
, pdwAttributes
);
219 if (pdwAttributes
&& *pdwAttributes
) {
220 SHELL32_GetItemAttributes (_IShellFolder_ (This
), pidlTemp
, pdwAttributes
);
227 TRACE ("(%p)->(-- ret=0x%08lx)\n", This
, hr
);
232 /**************************************************************************
233 * ISF_MyComputer_fnEnumObjects
235 static HRESULT WINAPI
236 ISF_MyComputer_fnEnumObjects (IShellFolder2
* iface
, HWND hwndOwner
, DWORD dwFlags
, LPENUMIDLIST
* ppEnumIDList
)
238 ICOM_THIS (IGenericSFImpl
, iface
);
240 TRACE ("(%p)->(HWND=0x%08x flags=0x%08lx pplist=%p)\n", This
, hwndOwner
, dwFlags
, ppEnumIDList
);
242 *ppEnumIDList
= IEnumIDList_Constructor (NULL
, dwFlags
, EIDL_MYCOMP
);
244 TRACE ("-- (%p)->(new ID List: %p)\n", This
, *ppEnumIDList
);
246 return (*ppEnumIDList
) ? S_OK
: E_OUTOFMEMORY
;
249 /**************************************************************************
250 * ISF_MyComputer_fnBindToObject
252 static HRESULT WINAPI
253 ISF_MyComputer_fnBindToObject (IShellFolder2
* iface
, LPCITEMIDLIST pidl
,
254 LPBC pbcReserved
, REFIID riid
, LPVOID
* ppvOut
)
256 ICOM_THIS (IGenericSFImpl
, iface
);
258 TRACE ("(%p)->(pidl=%p,%p,%s,%p)\n", This
, pidl
, pbcReserved
, shdebugstr_guid (riid
), ppvOut
);
260 return SHELL32_BindToChild (This
->pidlRoot
, NULL
, pidl
, riid
, ppvOut
);
263 /**************************************************************************
264 * ISF_MyComputer_fnBindToStorage
266 static HRESULT WINAPI
267 ISF_MyComputer_fnBindToStorage (IShellFolder2
* iface
,
268 LPCITEMIDLIST pidl
, LPBC pbcReserved
, REFIID riid
, LPVOID
* ppvOut
)
270 ICOM_THIS (IGenericSFImpl
, iface
);
272 FIXME ("(%p)->(pidl=%p,%p,%s,%p) stub\n", This
, pidl
, pbcReserved
, shdebugstr_guid (riid
), ppvOut
);
278 /**************************************************************************
279 * ISF_MyComputer_fnCompareIDs
282 static HRESULT WINAPI
283 ISF_MyComputer_fnCompareIDs (IShellFolder2
* iface
, LPARAM lParam
, LPCITEMIDLIST pidl1
, LPCITEMIDLIST pidl2
)
285 ICOM_THIS (IGenericSFImpl
, iface
);
289 TRACE ("(%p)->(0x%08lx,pidl1=%p,pidl2=%p)\n", This
, lParam
, pidl1
, pidl2
);
290 nReturn
= SHELL32_CompareIDs (_IShellFolder_ (This
), lParam
, pidl1
, pidl2
);
291 TRACE ("-- %i\n", nReturn
);
295 /**************************************************************************
296 * ISF_MyComputer_fnCreateViewObject
298 static HRESULT WINAPI
299 ISF_MyComputer_fnCreateViewObject (IShellFolder2
* iface
, HWND hwndOwner
, REFIID riid
, LPVOID
* ppvOut
)
301 ICOM_THIS (IGenericSFImpl
, iface
);
303 LPSHELLVIEW pShellView
;
304 HRESULT hr
= E_INVALIDARG
;
306 TRACE ("(%p)->(hwnd=0x%x,%s,%p)\n", This
, hwndOwner
, shdebugstr_guid (riid
), ppvOut
);
311 if (IsEqualIID (riid
, &IID_IDropTarget
)) {
312 WARN ("IDropTarget not implemented\n");
314 } else if (IsEqualIID (riid
, &IID_IContextMenu
)) {
315 WARN ("IContextMenu not implemented\n");
317 } else if (IsEqualIID (riid
, &IID_IShellView
)) {
318 pShellView
= IShellView_Constructor ((IShellFolder
*) iface
);
320 hr
= IShellView_QueryInterface (pShellView
, riid
, ppvOut
);
321 IShellView_Release (pShellView
);
325 TRACE ("-- (%p)->(interface=%p)\n", This
, ppvOut
);
329 /**************************************************************************
330 * ISF_MyComputer_fnGetAttributesOf
332 static HRESULT WINAPI
333 ISF_MyComputer_fnGetAttributesOf (IShellFolder2
* iface
, UINT cidl
, LPCITEMIDLIST
* apidl
, DWORD
* rgfInOut
)
335 ICOM_THIS (IGenericSFImpl
, iface
);
339 TRACE ("(%p)->(cidl=%d apidl=%p mask=0x%08lx)\n", This
, cidl
, apidl
, *rgfInOut
);
341 if ((!cidl
) || (!apidl
) || (!rgfInOut
))
344 while (cidl
> 0 && *apidl
) {
346 SHELL32_GetItemAttributes (_IShellFolder_ (This
), *apidl
, rgfInOut
);
351 TRACE ("-- result=0x%08lx\n", *rgfInOut
);
355 /**************************************************************************
356 * ISF_MyComputer_fnGetUIObjectOf
359 * HWND hwndOwner, //[in ] Parent window for any output
360 * UINT cidl, //[in ] array size
361 * LPCITEMIDLIST* apidl, //[in ] simple pidl array
362 * REFIID riid, //[in ] Requested Interface
363 * UINT* prgfInOut, //[ ] reserved
364 * LPVOID* ppvObject) //[out] Resulting Interface
367 static HRESULT WINAPI
368 ISF_MyComputer_fnGetUIObjectOf (IShellFolder2
* iface
,
370 UINT cidl
, LPCITEMIDLIST
* apidl
, REFIID riid
, UINT
* prgfInOut
, LPVOID
* ppvOut
)
372 ICOM_THIS (IGenericSFImpl
, iface
);
375 IUnknown
*pObj
= NULL
;
376 HRESULT hr
= E_INVALIDARG
;
378 TRACE ("(%p)->(0x%04x,%u,apidl=%p,%s,%p,%p)\n",
379 This
, hwndOwner
, cidl
, apidl
, shdebugstr_guid (riid
), prgfInOut
, ppvOut
);
384 if (IsEqualIID (riid
, &IID_IContextMenu
) && (cidl
>= 1)) {
385 pObj
= (LPUNKNOWN
) ISvItemCm_Constructor ((IShellFolder
*) iface
, This
->pidlRoot
, apidl
, cidl
);
387 } else if (IsEqualIID (riid
, &IID_IDataObject
) && (cidl
>= 1)) {
388 pObj
= (LPUNKNOWN
) IDataObject_Constructor (hwndOwner
, This
->pidlRoot
, apidl
, cidl
);
390 } else if (IsEqualIID (riid
, &IID_IExtractIconA
) && (cidl
== 1)) {
391 pidl
= ILCombine (This
->pidlRoot
, apidl
[0]);
392 pObj
= (LPUNKNOWN
) IExtractIconA_Constructor (pidl
);
395 } else if (IsEqualIID (riid
, &IID_IDropTarget
) && (cidl
>= 1)) {
396 hr
= IShellFolder_QueryInterface (iface
, &IID_IDropTarget
, (LPVOID
*) & pObj
);
406 TRACE ("(%p)->hr=0x%08lx\n", This
, hr
);
410 /**************************************************************************
411 * ISF_MyComputer_fnGetDisplayNameOf
414 * The desktopfolder creates only complete paths (SHGDN_FORPARSING).
415 * SHGDN_INFOLDER makes no sense.
417 static HRESULT WINAPI
ISF_MyComputer_fnGetDisplayNameOf (IShellFolder2
* iface
, LPCITEMIDLIST pidl
, DWORD dwFlags
, LPSTRRET strRet
)
419 ICOM_THIS (IGenericSFImpl
, iface
);
421 char szPath
[MAX_PATH
],
426 TRACE ("(%p)->(pidl=%p,0x%08lx,%p)\n", This
, pidl
, dwFlags
, strRet
);
435 bSimplePidl
= _ILIsPidlSimple (pidl
);
437 if (_ILIsSpecialFolder (pidl
)) {
438 /* take names of special folders only if its only this folder */
440 _ILSimpleGetText (pidl
, szPath
, MAX_PATH
); /* append my own path */
442 FIXME ("special folder\n");
445 if (!_ILIsDrive (pidl
)) {
446 ERR ("Wrong pidl type\n");
450 _ILSimpleGetText (pidl
, szPath
, MAX_PATH
); /* append my own path */
452 /* long view "lw_name (C:)" */
453 if (bSimplePidl
&& !(dwFlags
& SHGDN_FORPARSING
)) {
454 DWORD dwVolumeSerialNumber
,
455 dwMaximumComponetLength
,
458 GetVolumeInformationA (szPath
, szDrive
, sizeof (szDrive
) - 6, &dwVolumeSerialNumber
,
459 &dwMaximumComponetLength
, &dwFileSystemFlags
, NULL
, 0);
460 strcat (szDrive
, " (");
461 strncat (szDrive
, szPath
, 2);
462 strcat (szDrive
, ")");
463 strcpy (szPath
, szDrive
);
467 if (!bSimplePidl
) { /* go deeper if needed */
468 PathAddBackslashA (szPath
);
469 len
= strlen (szPath
);
472 (SHELL32_GetDisplayNameOfChild (iface
, pidl
, dwFlags
| SHGDN_INFOLDER
, szPath
+ len
, MAX_PATH
- len
)))
473 return E_OUTOFMEMORY
;
475 strRet
->uType
= STRRET_CSTR
;
476 lstrcpynA (strRet
->u
.cStr
, szPath
, MAX_PATH
);
478 TRACE ("-- (%p)->(%s)\n", This
, szPath
);
482 /**************************************************************************
483 * ISF_MyComputer_fnSetNameOf
484 * Changes the name of a file object or subfolder, possibly changing its item
485 * identifier in the process.
488 * HWND hwndOwner, //[in ] Owner window for output
489 * LPCITEMIDLIST pidl, //[in ] simple pidl of item to change
490 * LPCOLESTR lpszName, //[in ] the items new display name
491 * DWORD dwFlags, //[in ] SHGNO formatting flags
492 * LPITEMIDLIST* ppidlOut) //[out] simple pidl returned
494 static HRESULT WINAPI
ISF_MyComputer_fnSetNameOf (IShellFolder2
* iface
, HWND hwndOwner
, LPCITEMIDLIST pidl
, /*simple pidl */
495 LPCOLESTR lpName
, DWORD dwFlags
, LPITEMIDLIST
* pPidlOut
)
497 ICOM_THIS (IGenericSFImpl
, iface
);
498 FIXME ("(%p)->(%u,pidl=%p,%s,%lu,%p)\n", This
, hwndOwner
, pidl
, debugstr_w (lpName
), dwFlags
, pPidlOut
);
502 static HRESULT WINAPI
ISF_MyComputer_fnGetDefaultSearchGUID (IShellFolder2
* iface
, GUID
* pguid
)
504 ICOM_THIS (IGenericSFImpl
, iface
);
505 FIXME ("(%p)\n", This
);
508 static HRESULT WINAPI
ISF_MyComputer_fnEnumSearches (IShellFolder2
* iface
, IEnumExtraSearch
** ppenum
)
510 ICOM_THIS (IGenericSFImpl
, iface
);
511 FIXME ("(%p)\n", This
);
514 static HRESULT WINAPI
ISF_MyComputer_fnGetDefaultColumn (IShellFolder2
* iface
, DWORD dwRes
, ULONG
* pSort
, ULONG
* pDisplay
)
516 ICOM_THIS (IGenericSFImpl
, iface
);
518 TRACE ("(%p)\n", This
);
520 if (pSort
) *pSort
= 0;
521 if (pDisplay
) *pDisplay
= 0;
524 static HRESULT WINAPI
ISF_MyComputer_fnGetDefaultColumnState (IShellFolder2
* iface
, UINT iColumn
, DWORD
* pcsFlags
)
526 ICOM_THIS (IGenericSFImpl
, iface
);
528 TRACE ("(%p)\n", This
);
530 if (!pcsFlags
|| iColumn
>= MYCOMPUTERSHELLVIEWCOLUMNS
) return E_INVALIDARG
;
531 *pcsFlags
= MyComputerSFHeader
[iColumn
].pcsFlags
;
534 static HRESULT WINAPI
ISF_MyComputer_fnGetDetailsEx (IShellFolder2
* iface
, LPCITEMIDLIST pidl
, const SHCOLUMNID
* pscid
, VARIANT
* pv
)
536 ICOM_THIS (IGenericSFImpl
, iface
);
537 FIXME ("(%p)\n", This
);
541 /* FIXME: drive size >4GB is rolling over */
542 static HRESULT WINAPI
ISF_MyComputer_fnGetDetailsOf (IShellFolder2
* iface
, LPCITEMIDLIST pidl
, UINT iColumn
, SHELLDETAILS
* psd
)
544 ICOM_THIS (IGenericSFImpl
, iface
);
547 TRACE ("(%p)->(%p %i %p)\n", This
, pidl
, iColumn
, psd
);
549 if (!psd
|| iColumn
>= MYCOMPUTERSHELLVIEWCOLUMNS
)
553 psd
->fmt
= MyComputerSFHeader
[iColumn
].fmt
;
554 psd
->cxChar
= MyComputerSFHeader
[iColumn
].cxChar
;
555 psd
->str
.uType
= STRRET_CSTR
;
556 LoadStringA (shell32_hInstance
, MyComputerSFHeader
[iColumn
].colnameid
, psd
->str
.u
.cStr
, MAX_PATH
);
559 char szPath
[MAX_PATH
];
560 ULARGE_INTEGER ulBytes
;
562 psd
->str
.u
.cStr
[0] = 0x00;
563 psd
->str
.uType
= STRRET_CSTR
;
566 hr
= IShellFolder_GetDisplayNameOf (iface
, pidl
, SHGDN_NORMAL
| SHGDN_INFOLDER
, &psd
->str
);
569 _ILGetFileType (pidl
, psd
->str
.u
.cStr
, MAX_PATH
);
571 case 2: /* total size */
572 if (_ILIsDrive (pidl
)) {
573 _ILSimpleGetText (pidl
, szPath
, MAX_PATH
);
574 GetDiskFreeSpaceExA (szPath
, NULL
, &ulBytes
, NULL
);
575 StrFormatByteSizeA (ulBytes
.s
.LowPart
, psd
->str
.u
.cStr
, MAX_PATH
);
578 case 3: /* free size */
579 if (_ILIsDrive (pidl
)) {
580 _ILSimpleGetText (pidl
, szPath
, MAX_PATH
);
581 GetDiskFreeSpaceExA (szPath
, &ulBytes
, NULL
, NULL
);
582 StrFormatByteSizeA (ulBytes
.s
.LowPart
, psd
->str
.u
.cStr
, MAX_PATH
);
591 static HRESULT WINAPI
ISF_MyComputer_fnMapNameToSCID (IShellFolder2
* iface
, LPCWSTR pwszName
, SHCOLUMNID
* pscid
)
593 ICOM_THIS (IGenericSFImpl
, iface
);
594 FIXME ("(%p)\n", This
);
598 static ICOM_VTABLE (IShellFolder2
) vt_ShellFolder2
=
600 ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE
601 ISF_MyComputer_fnQueryInterface
,
602 ISF_MyComputer_fnAddRef
,
603 ISF_MyComputer_fnRelease
,
604 ISF_MyComputer_fnParseDisplayName
,
605 ISF_MyComputer_fnEnumObjects
,
606 ISF_MyComputer_fnBindToObject
,
607 ISF_MyComputer_fnBindToStorage
,
608 ISF_MyComputer_fnCompareIDs
,
609 ISF_MyComputer_fnCreateViewObject
,
610 ISF_MyComputer_fnGetAttributesOf
,
611 ISF_MyComputer_fnGetUIObjectOf
,
612 ISF_MyComputer_fnGetDisplayNameOf
,
613 ISF_MyComputer_fnSetNameOf
,
615 ISF_MyComputer_fnGetDefaultSearchGUID
,
616 ISF_MyComputer_fnEnumSearches
,
617 ISF_MyComputer_fnGetDefaultColumn
,
618 ISF_MyComputer_fnGetDefaultColumnState
,
619 ISF_MyComputer_fnGetDetailsEx
,
620 ISF_MyComputer_fnGetDetailsOf
,
621 ISF_MyComputer_fnMapNameToSCID
624 /************************************************************************
625 * IMCFldr_PersistFolder2_QueryInterface
627 static HRESULT WINAPI
IMCFldr_PersistFolder2_QueryInterface (IPersistFolder2
* iface
, REFIID iid
, LPVOID
* ppvObj
)
629 _ICOM_THIS_From_IPersistFolder2 (IGenericSFImpl
, iface
);
631 TRACE ("(%p)\n", This
);
633 return IUnknown_QueryInterface (_IUnknown_ (This
), iid
, ppvObj
);
636 /************************************************************************
637 * IMCFldr_PersistFolder2_AddRef
639 static ULONG WINAPI
IMCFldr_PersistFolder2_AddRef (IPersistFolder2
* iface
)
641 _ICOM_THIS_From_IPersistFolder2 (IGenericSFImpl
, iface
);
643 TRACE ("(%p)->(count=%lu)\n", This
, This
->ref
);
645 return IUnknown_AddRef (_IUnknown_ (This
));
648 /************************************************************************
649 * ISFPersistFolder_Release
651 static ULONG WINAPI
IMCFldr_PersistFolder2_Release (IPersistFolder2
* iface
)
653 _ICOM_THIS_From_IPersistFolder2 (IGenericSFImpl
, iface
);
655 TRACE ("(%p)->(count=%lu)\n", This
, This
->ref
);
657 return IUnknown_Release (_IUnknown_ (This
));
660 /************************************************************************
661 * IMCFldr_PersistFolder2_GetClassID
663 static HRESULT WINAPI
IMCFldr_PersistFolder2_GetClassID (IPersistFolder2
* iface
, CLSID
* lpClassId
)
665 _ICOM_THIS_From_IPersistFolder2 (IGenericSFImpl
, iface
);
667 TRACE ("(%p)\n", This
);
671 *lpClassId
= CLSID_MyComputer
;
676 /************************************************************************
677 * IMCFldr_PersistFolder2_Initialize
679 * NOTES: it makes no sense to change the pidl
681 static HRESULT WINAPI
IMCFldr_PersistFolder2_Initialize (IPersistFolder2
* iface
, LPCITEMIDLIST pidl
)
683 _ICOM_THIS_From_IPersistFolder2 (IGenericSFImpl
, iface
);
684 TRACE ("(%p)->(%p)\n", This
, pidl
);
688 /**************************************************************************
689 * IPersistFolder2_fnGetCurFolder
691 static HRESULT WINAPI
IMCFldr_PersistFolder2_GetCurFolder (IPersistFolder2
* iface
, LPITEMIDLIST
* pidl
)
693 _ICOM_THIS_From_IPersistFolder2 (IGenericSFImpl
, iface
);
695 TRACE ("(%p)->(%p)\n", This
, pidl
);
699 *pidl
= ILClone (This
->pidlRoot
);
703 static ICOM_VTABLE (IPersistFolder2
) vt_PersistFolder2
=
705 ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE
706 IMCFldr_PersistFolder2_QueryInterface
,
707 IMCFldr_PersistFolder2_AddRef
,
708 IMCFldr_PersistFolder2_Release
,
709 IMCFldr_PersistFolder2_GetClassID
,
710 IMCFldr_PersistFolder2_Initialize
,
711 IMCFldr_PersistFolder2_GetCurFolder