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 HRESULT WINAPI
ISF_MyComputer_Constructor (IUnknown
* pUnkOuter
, REFIID riid
, LPVOID
* ppv
);
72 #define _IPersistFolder2_Offset ((int)(&(((IGenericSFImpl*)0)->lpVtblPersistFolder2)))
73 #define _ICOM_THIS_From_IPersistFolder2(class, name) class* This = (class*)(((char*)name)-_IPersistFolder2_Offset);
76 converts This to a interface pointer
78 #define _IUnknown_(This) (IUnknown*)&(This->lpVtbl)
79 #define _IShellFolder_(This) (IShellFolder*)&(This->lpVtbl)
80 #define _IShellFolder2_(This) (IShellFolder2*)&(This->lpVtbl)
82 #define _IPersist_(This) (IPersist*)&(This->lpVtblPersistFolder2)
83 #define _IPersistFolder_(This) (IPersistFolder*)&(This->lpVtblPersistFolder2)
84 #define _IPersistFolder2_(This) (IPersistFolder2*)&(This->lpVtblPersistFolder2)
86 /***********************************************************************
87 * IShellFolder [MyComputer] implementation
90 static shvheader MyComputerSFHeader
[] = {
91 {IDS_SHV_COLUMN1
, SHCOLSTATE_TYPE_STR
| SHCOLSTATE_ONBYDEFAULT
, LVCFMT_RIGHT
, 15},
92 {IDS_SHV_COLUMN3
, SHCOLSTATE_TYPE_STR
| SHCOLSTATE_ONBYDEFAULT
, LVCFMT_RIGHT
, 10},
93 {IDS_SHV_COLUMN6
, SHCOLSTATE_TYPE_STR
| SHCOLSTATE_ONBYDEFAULT
, LVCFMT_RIGHT
, 10},
94 {IDS_SHV_COLUMN7
, SHCOLSTATE_TYPE_STR
| SHCOLSTATE_ONBYDEFAULT
, LVCFMT_RIGHT
, 10},
97 #define MYCOMPUTERSHELLVIEWCOLUMNS 4
99 /**************************************************************************
100 * ISF_MyComputer_Constructor
102 HRESULT WINAPI
ISF_MyComputer_Constructor (IUnknown
* pUnkOuter
, REFIID riid
, LPVOID
* ppv
)
106 TRACE ("unkOut=%p %s\n", pUnkOuter
, shdebugstr_guid (riid
));
111 return CLASS_E_NOAGGREGATION
;
113 sf
= (IGenericSFImpl
*) LocalAlloc (GMEM_ZEROINIT
, sizeof (IGenericSFImpl
));
115 return E_OUTOFMEMORY
;
118 sf
->lpVtbl
= &vt_ShellFolder2
;
119 sf
->lpVtblPersistFolder2
= &vt_PersistFolder2
;
120 sf
->pidlRoot
= _ILCreateMyComputer (); /* my qualified pidl */
122 if (!SUCCEEDED (IUnknown_QueryInterface (_IUnknown_ (sf
), riid
, ppv
))) {
123 IUnknown_Release (_IUnknown_ (sf
));
124 return E_NOINTERFACE
;
127 TRACE ("--(%p)\n", sf
);
131 /**************************************************************************
132 * ISF_MyComputer_fnQueryInterface
134 * NOTES supports not IPersist/IPersistFolder
136 static HRESULT WINAPI
ISF_MyComputer_fnQueryInterface (IShellFolder2
* iface
, REFIID riid
, LPVOID
* ppvObj
)
138 ICOM_THIS (IGenericSFImpl
, iface
);
140 TRACE ("(%p)->(%s,%p)\n", This
, shdebugstr_guid (riid
), ppvObj
);
144 if (IsEqualIID (riid
, &IID_IUnknown
) ||
145 IsEqualIID (riid
, &IID_IShellFolder
) || IsEqualIID (riid
, &IID_IShellFolder2
)) {
147 } else if (IsEqualIID (riid
, &IID_IPersist
) ||
148 IsEqualIID (riid
, &IID_IPersistFolder
) || IsEqualIID (riid
, &IID_IPersistFolder2
)) {
149 *ppvObj
= _IPersistFolder2_ (This
);
153 IUnknown_AddRef ((IUnknown
*) (*ppvObj
));
154 TRACE ("-- Interface: (%p)->(%p)\n", ppvObj
, *ppvObj
);
157 TRACE ("-- Interface: E_NOINTERFACE\n");
158 return E_NOINTERFACE
;
161 static ULONG WINAPI
ISF_MyComputer_fnAddRef (IShellFolder2
* iface
)
163 ICOM_THIS (IGenericSFImpl
, iface
);
165 TRACE ("(%p)->(count=%lu)\n", This
, This
->ref
);
167 return ++(This
->ref
);
170 static ULONG WINAPI
ISF_MyComputer_fnRelease (IShellFolder2
* iface
)
172 ICOM_THIS (IGenericSFImpl
, iface
);
174 TRACE ("(%p)->(count=%lu)\n", This
, This
->ref
);
176 if (!--(This
->ref
)) {
177 TRACE ("-- destroying IShellFolder(%p)\n", This
);
179 SHFree (This
->pidlRoot
);
180 LocalFree ((HLOCAL
) This
);
186 /**************************************************************************
187 * ISF_MyComputer_fnParseDisplayName
189 static HRESULT WINAPI
190 ISF_MyComputer_fnParseDisplayName (IShellFolder2
* iface
,
193 LPOLESTR lpszDisplayName
,
194 DWORD
* pchEaten
, LPITEMIDLIST
* ppidl
, DWORD
* pdwAttributes
)
196 ICOM_THIS (IGenericSFImpl
, iface
);
198 HRESULT hr
= E_OUTOFMEMORY
;
199 LPCWSTR szNext
= NULL
;
200 WCHAR szElement
[MAX_PATH
];
201 CHAR szTempA
[MAX_PATH
];
202 LPITEMIDLIST pidlTemp
;
204 TRACE ("(%p)->(HWND=%p,%p,%p=%s,%p,pidl=%p,%p)\n",
205 This
, hwndOwner
, pbcReserved
, lpszDisplayName
, debugstr_w (lpszDisplayName
), pchEaten
, ppidl
, pdwAttributes
);
209 *pchEaten
= 0; /* strange but like the original */
211 /* do we have an absolute path name ? */
212 if (PathGetDriveNumberW (lpszDisplayName
) >= 0 && lpszDisplayName
[2] == (WCHAR
) '\\') {
213 szNext
= GetNextElementW (lpszDisplayName
, szElement
, MAX_PATH
);
214 WideCharToMultiByte (CP_ACP
, 0, szElement
, -1, szTempA
, MAX_PATH
, NULL
, NULL
);
215 pidlTemp
= _ILCreateDrive (szTempA
);
217 if (szNext
&& *szNext
) {
218 hr
= SHELL32_ParseNextElement (hwndOwner
, iface
, &pidlTemp
, (LPOLESTR
) szNext
, pchEaten
, pdwAttributes
);
220 if (pdwAttributes
&& *pdwAttributes
) {
221 SHELL32_GetItemAttributes (_IShellFolder_ (This
), pidlTemp
, pdwAttributes
);
228 TRACE ("(%p)->(-- ret=0x%08lx)\n", This
, hr
);
233 /**************************************************************************
234 * ISF_MyComputer_fnEnumObjects
236 static HRESULT WINAPI
237 ISF_MyComputer_fnEnumObjects (IShellFolder2
* iface
, HWND hwndOwner
, DWORD dwFlags
, LPENUMIDLIST
* ppEnumIDList
)
239 ICOM_THIS (IGenericSFImpl
, iface
);
241 TRACE ("(%p)->(HWND=%p flags=0x%08lx pplist=%p)\n", This
, hwndOwner
, dwFlags
, ppEnumIDList
);
243 *ppEnumIDList
= IEnumIDList_Constructor (NULL
, dwFlags
, EIDL_MYCOMP
);
245 TRACE ("-- (%p)->(new ID List: %p)\n", This
, *ppEnumIDList
);
247 return (*ppEnumIDList
) ? S_OK
: E_OUTOFMEMORY
;
250 /**************************************************************************
251 * ISF_MyComputer_fnBindToObject
253 static HRESULT WINAPI
254 ISF_MyComputer_fnBindToObject (IShellFolder2
* iface
, LPCITEMIDLIST pidl
,
255 LPBC pbcReserved
, REFIID riid
, LPVOID
* ppvOut
)
257 ICOM_THIS (IGenericSFImpl
, iface
);
259 TRACE ("(%p)->(pidl=%p,%p,%s,%p)\n", This
, pidl
, pbcReserved
, shdebugstr_guid (riid
), ppvOut
);
261 return SHELL32_BindToChild (This
->pidlRoot
, NULL
, pidl
, riid
, ppvOut
);
264 /**************************************************************************
265 * ISF_MyComputer_fnBindToStorage
267 static HRESULT WINAPI
268 ISF_MyComputer_fnBindToStorage (IShellFolder2
* iface
,
269 LPCITEMIDLIST pidl
, LPBC pbcReserved
, REFIID riid
, LPVOID
* ppvOut
)
271 ICOM_THIS (IGenericSFImpl
, iface
);
273 FIXME ("(%p)->(pidl=%p,%p,%s,%p) stub\n", This
, pidl
, pbcReserved
, shdebugstr_guid (riid
), ppvOut
);
279 /**************************************************************************
280 * ISF_MyComputer_fnCompareIDs
283 static HRESULT WINAPI
284 ISF_MyComputer_fnCompareIDs (IShellFolder2
* iface
, LPARAM lParam
, LPCITEMIDLIST pidl1
, LPCITEMIDLIST pidl2
)
286 ICOM_THIS (IGenericSFImpl
, iface
);
290 TRACE ("(%p)->(0x%08lx,pidl1=%p,pidl2=%p)\n", This
, lParam
, pidl1
, pidl2
);
291 nReturn
= SHELL32_CompareIDs (_IShellFolder_ (This
), lParam
, pidl1
, pidl2
);
292 TRACE ("-- %i\n", nReturn
);
296 /**************************************************************************
297 * ISF_MyComputer_fnCreateViewObject
299 static HRESULT WINAPI
300 ISF_MyComputer_fnCreateViewObject (IShellFolder2
* iface
, HWND hwndOwner
, REFIID riid
, LPVOID
* ppvOut
)
302 ICOM_THIS (IGenericSFImpl
, iface
);
304 LPSHELLVIEW pShellView
;
305 HRESULT hr
= E_INVALIDARG
;
307 TRACE ("(%p)->(hwnd=%p,%s,%p)\n", This
, hwndOwner
, shdebugstr_guid (riid
), ppvOut
);
312 if (IsEqualIID (riid
, &IID_IDropTarget
)) {
313 WARN ("IDropTarget not implemented\n");
315 } else if (IsEqualIID (riid
, &IID_IContextMenu
)) {
316 WARN ("IContextMenu not implemented\n");
318 } else if (IsEqualIID (riid
, &IID_IShellView
)) {
319 pShellView
= IShellView_Constructor ((IShellFolder
*) iface
);
321 hr
= IShellView_QueryInterface (pShellView
, riid
, ppvOut
);
322 IShellView_Release (pShellView
);
326 TRACE ("-- (%p)->(interface=%p)\n", This
, ppvOut
);
330 /**************************************************************************
331 * ISF_MyComputer_fnGetAttributesOf
333 static HRESULT WINAPI
334 ISF_MyComputer_fnGetAttributesOf (IShellFolder2
* iface
, UINT cidl
, LPCITEMIDLIST
* apidl
, DWORD
* rgfInOut
)
336 ICOM_THIS (IGenericSFImpl
, iface
);
340 TRACE ("(%p)->(cidl=%d apidl=%p mask=0x%08lx)\n", This
, cidl
, apidl
, *rgfInOut
);
342 if ((!cidl
) || (!apidl
) || (!rgfInOut
))
345 while (cidl
> 0 && *apidl
) {
347 SHELL32_GetItemAttributes (_IShellFolder_ (This
), *apidl
, rgfInOut
);
352 TRACE ("-- result=0x%08lx\n", *rgfInOut
);
356 /**************************************************************************
357 * ISF_MyComputer_fnGetUIObjectOf
360 * HWND hwndOwner, //[in ] Parent window for any output
361 * UINT cidl, //[in ] array size
362 * LPCITEMIDLIST* apidl, //[in ] simple pidl array
363 * REFIID riid, //[in ] Requested Interface
364 * UINT* prgfInOut, //[ ] reserved
365 * LPVOID* ppvObject) //[out] Resulting Interface
368 static HRESULT WINAPI
369 ISF_MyComputer_fnGetUIObjectOf (IShellFolder2
* iface
,
371 UINT cidl
, LPCITEMIDLIST
* apidl
, REFIID riid
, UINT
* prgfInOut
, LPVOID
* ppvOut
)
373 ICOM_THIS (IGenericSFImpl
, iface
);
376 IUnknown
*pObj
= NULL
;
377 HRESULT hr
= E_INVALIDARG
;
379 TRACE ("(%p)->(%p,%u,apidl=%p,%s,%p,%p)\n",
380 This
, hwndOwner
, cidl
, apidl
, shdebugstr_guid (riid
), prgfInOut
, ppvOut
);
385 if (IsEqualIID (riid
, &IID_IContextMenu
) && (cidl
>= 1)) {
386 pObj
= (LPUNKNOWN
) ISvItemCm_Constructor ((IShellFolder
*) iface
, This
->pidlRoot
, apidl
, cidl
);
388 } else if (IsEqualIID (riid
, &IID_IDataObject
) && (cidl
>= 1)) {
389 pObj
= (LPUNKNOWN
) IDataObject_Constructor (hwndOwner
, This
->pidlRoot
, apidl
, cidl
);
391 } else if (IsEqualIID (riid
, &IID_IExtractIconA
) && (cidl
== 1)) {
392 pidl
= ILCombine (This
->pidlRoot
, apidl
[0]);
393 pObj
= (LPUNKNOWN
) IExtractIconA_Constructor (pidl
);
396 } else if (IsEqualIID (riid
, &IID_IExtractIconW
) && (cidl
== 1)) {
397 pidl
= ILCombine (This
->pidlRoot
, apidl
[0]);
398 pObj
= (LPUNKNOWN
) IExtractIconW_Constructor (pidl
);
401 } else if (IsEqualIID (riid
, &IID_IDropTarget
) && (cidl
>= 1)) {
402 hr
= IShellFolder_QueryInterface (iface
, &IID_IDropTarget
, (LPVOID
*) & pObj
);
412 TRACE ("(%p)->hr=0x%08lx\n", This
, hr
);
416 /**************************************************************************
417 * ISF_MyComputer_fnGetDisplayNameOf
420 * The desktopfolder creates only complete paths (SHGDN_FORPARSING).
421 * SHGDN_INFOLDER makes no sense.
423 static HRESULT WINAPI
ISF_MyComputer_fnGetDisplayNameOf (IShellFolder2
* iface
, LPCITEMIDLIST pidl
, DWORD dwFlags
, LPSTRRET strRet
)
425 ICOM_THIS (IGenericSFImpl
, iface
);
427 char szPath
[MAX_PATH
],
432 TRACE ("(%p)->(pidl=%p,0x%08lx,%p)\n", This
, pidl
, dwFlags
, strRet
);
441 bSimplePidl
= _ILIsPidlSimple (pidl
);
443 if (_ILIsSpecialFolder (pidl
)) {
444 /* take names of special folders only if its only this folder */
446 _ILSimpleGetText (pidl
, szPath
, MAX_PATH
); /* append my own path */
448 FIXME ("special folder\n");
451 if (!_ILIsDrive (pidl
)) {
452 ERR ("Wrong pidl type\n");
456 _ILSimpleGetText (pidl
, szPath
, MAX_PATH
); /* append my own path */
458 /* long view "lw_name (C:)" */
459 if (bSimplePidl
&& !(dwFlags
& SHGDN_FORPARSING
)) {
460 DWORD dwVolumeSerialNumber
,
461 dwMaximumComponetLength
,
464 GetVolumeInformationA (szPath
, szDrive
, sizeof (szDrive
) - 6, &dwVolumeSerialNumber
,
465 &dwMaximumComponetLength
, &dwFileSystemFlags
, NULL
, 0);
466 strcat (szDrive
, " (");
467 strncat (szDrive
, szPath
, 2);
468 strcat (szDrive
, ")");
469 strcpy (szPath
, szDrive
);
473 if (!bSimplePidl
) { /* go deeper if needed */
474 PathAddBackslashA (szPath
);
475 len
= strlen (szPath
);
478 (SHELL32_GetDisplayNameOfChild (iface
, pidl
, dwFlags
| SHGDN_INFOLDER
, szPath
+ len
, MAX_PATH
- len
)))
479 return E_OUTOFMEMORY
;
481 strRet
->uType
= STRRET_CSTR
;
482 lstrcpynA (strRet
->u
.cStr
, szPath
, MAX_PATH
);
484 TRACE ("-- (%p)->(%s)\n", This
, szPath
);
488 /**************************************************************************
489 * ISF_MyComputer_fnSetNameOf
490 * Changes the name of a file object or subfolder, possibly changing its item
491 * identifier in the process.
494 * HWND hwndOwner, //[in ] Owner window for output
495 * LPCITEMIDLIST pidl, //[in ] simple pidl of item to change
496 * LPCOLESTR lpszName, //[in ] the items new display name
497 * DWORD dwFlags, //[in ] SHGNO formatting flags
498 * LPITEMIDLIST* ppidlOut) //[out] simple pidl returned
500 static HRESULT WINAPI
ISF_MyComputer_fnSetNameOf (IShellFolder2
* iface
, HWND hwndOwner
, LPCITEMIDLIST pidl
, /*simple pidl */
501 LPCOLESTR lpName
, DWORD dwFlags
, LPITEMIDLIST
* pPidlOut
)
503 ICOM_THIS (IGenericSFImpl
, iface
);
504 FIXME ("(%p)->(%p,pidl=%p,%s,%lu,%p)\n", This
, hwndOwner
, pidl
, debugstr_w (lpName
), dwFlags
, pPidlOut
);
508 static HRESULT WINAPI
ISF_MyComputer_fnGetDefaultSearchGUID (IShellFolder2
* iface
, GUID
* pguid
)
510 ICOM_THIS (IGenericSFImpl
, iface
);
511 FIXME ("(%p)\n", This
);
514 static HRESULT WINAPI
ISF_MyComputer_fnEnumSearches (IShellFolder2
* iface
, IEnumExtraSearch
** ppenum
)
516 ICOM_THIS (IGenericSFImpl
, iface
);
517 FIXME ("(%p)\n", This
);
520 static HRESULT WINAPI
ISF_MyComputer_fnGetDefaultColumn (IShellFolder2
* iface
, DWORD dwRes
, ULONG
* pSort
, ULONG
* pDisplay
)
522 ICOM_THIS (IGenericSFImpl
, iface
);
524 TRACE ("(%p)\n", This
);
526 if (pSort
) *pSort
= 0;
527 if (pDisplay
) *pDisplay
= 0;
530 static HRESULT WINAPI
ISF_MyComputer_fnGetDefaultColumnState (IShellFolder2
* iface
, UINT iColumn
, DWORD
* pcsFlags
)
532 ICOM_THIS (IGenericSFImpl
, iface
);
534 TRACE ("(%p)\n", This
);
536 if (!pcsFlags
|| iColumn
>= MYCOMPUTERSHELLVIEWCOLUMNS
) return E_INVALIDARG
;
537 *pcsFlags
= MyComputerSFHeader
[iColumn
].pcsFlags
;
540 static HRESULT WINAPI
ISF_MyComputer_fnGetDetailsEx (IShellFolder2
* iface
, LPCITEMIDLIST pidl
, const SHCOLUMNID
* pscid
, VARIANT
* pv
)
542 ICOM_THIS (IGenericSFImpl
, iface
);
543 FIXME ("(%p)\n", This
);
547 /* FIXME: drive size >4GB is rolling over */
548 static HRESULT WINAPI
ISF_MyComputer_fnGetDetailsOf (IShellFolder2
* iface
, LPCITEMIDLIST pidl
, UINT iColumn
, SHELLDETAILS
* psd
)
550 ICOM_THIS (IGenericSFImpl
, iface
);
553 TRACE ("(%p)->(%p %i %p)\n", This
, pidl
, iColumn
, psd
);
555 if (!psd
|| iColumn
>= MYCOMPUTERSHELLVIEWCOLUMNS
)
559 psd
->fmt
= MyComputerSFHeader
[iColumn
].fmt
;
560 psd
->cxChar
= MyComputerSFHeader
[iColumn
].cxChar
;
561 psd
->str
.uType
= STRRET_CSTR
;
562 LoadStringA (shell32_hInstance
, MyComputerSFHeader
[iColumn
].colnameid
, psd
->str
.u
.cStr
, MAX_PATH
);
565 char szPath
[MAX_PATH
];
566 ULARGE_INTEGER ulBytes
;
568 psd
->str
.u
.cStr
[0] = 0x00;
569 psd
->str
.uType
= STRRET_CSTR
;
572 hr
= IShellFolder_GetDisplayNameOf (iface
, pidl
, SHGDN_NORMAL
| SHGDN_INFOLDER
, &psd
->str
);
575 _ILGetFileType (pidl
, psd
->str
.u
.cStr
, MAX_PATH
);
577 case 2: /* total size */
578 if (_ILIsDrive (pidl
)) {
579 _ILSimpleGetText (pidl
, szPath
, MAX_PATH
);
580 GetDiskFreeSpaceExA (szPath
, NULL
, &ulBytes
, NULL
);
581 StrFormatByteSizeA (ulBytes
.s
.LowPart
, psd
->str
.u
.cStr
, MAX_PATH
);
584 case 3: /* free size */
585 if (_ILIsDrive (pidl
)) {
586 _ILSimpleGetText (pidl
, szPath
, MAX_PATH
);
587 GetDiskFreeSpaceExA (szPath
, &ulBytes
, NULL
, NULL
);
588 StrFormatByteSizeA (ulBytes
.s
.LowPart
, psd
->str
.u
.cStr
, MAX_PATH
);
597 static HRESULT WINAPI
ISF_MyComputer_fnMapColumnToSCID (IShellFolder2
* iface
, UINT column
, SHCOLUMNID
* pscid
)
599 ICOM_THIS (IGenericSFImpl
, iface
);
600 FIXME ("(%p)\n", This
);
604 static ICOM_VTABLE (IShellFolder2
) vt_ShellFolder2
=
606 ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE
607 ISF_MyComputer_fnQueryInterface
,
608 ISF_MyComputer_fnAddRef
,
609 ISF_MyComputer_fnRelease
,
610 ISF_MyComputer_fnParseDisplayName
,
611 ISF_MyComputer_fnEnumObjects
,
612 ISF_MyComputer_fnBindToObject
,
613 ISF_MyComputer_fnBindToStorage
,
614 ISF_MyComputer_fnCompareIDs
,
615 ISF_MyComputer_fnCreateViewObject
,
616 ISF_MyComputer_fnGetAttributesOf
,
617 ISF_MyComputer_fnGetUIObjectOf
,
618 ISF_MyComputer_fnGetDisplayNameOf
,
619 ISF_MyComputer_fnSetNameOf
,
621 ISF_MyComputer_fnGetDefaultSearchGUID
,
622 ISF_MyComputer_fnEnumSearches
,
623 ISF_MyComputer_fnGetDefaultColumn
,
624 ISF_MyComputer_fnGetDefaultColumnState
,
625 ISF_MyComputer_fnGetDetailsEx
,
626 ISF_MyComputer_fnGetDetailsOf
,
627 ISF_MyComputer_fnMapColumnToSCID
630 /************************************************************************
631 * IMCFldr_PersistFolder2_QueryInterface
633 static HRESULT WINAPI
IMCFldr_PersistFolder2_QueryInterface (IPersistFolder2
* iface
, REFIID iid
, LPVOID
* ppvObj
)
635 _ICOM_THIS_From_IPersistFolder2 (IGenericSFImpl
, iface
);
637 TRACE ("(%p)\n", This
);
639 return IUnknown_QueryInterface (_IUnknown_ (This
), iid
, ppvObj
);
642 /************************************************************************
643 * IMCFldr_PersistFolder2_AddRef
645 static ULONG WINAPI
IMCFldr_PersistFolder2_AddRef (IPersistFolder2
* iface
)
647 _ICOM_THIS_From_IPersistFolder2 (IGenericSFImpl
, iface
);
649 TRACE ("(%p)->(count=%lu)\n", This
, This
->ref
);
651 return IUnknown_AddRef (_IUnknown_ (This
));
654 /************************************************************************
655 * ISFPersistFolder_Release
657 static ULONG WINAPI
IMCFldr_PersistFolder2_Release (IPersistFolder2
* iface
)
659 _ICOM_THIS_From_IPersistFolder2 (IGenericSFImpl
, iface
);
661 TRACE ("(%p)->(count=%lu)\n", This
, This
->ref
);
663 return IUnknown_Release (_IUnknown_ (This
));
666 /************************************************************************
667 * IMCFldr_PersistFolder2_GetClassID
669 static HRESULT WINAPI
IMCFldr_PersistFolder2_GetClassID (IPersistFolder2
* iface
, CLSID
* lpClassId
)
671 _ICOM_THIS_From_IPersistFolder2 (IGenericSFImpl
, iface
);
673 TRACE ("(%p)\n", This
);
677 *lpClassId
= CLSID_MyComputer
;
682 /************************************************************************
683 * IMCFldr_PersistFolder2_Initialize
685 * NOTES: it makes no sense to change the pidl
687 static HRESULT WINAPI
IMCFldr_PersistFolder2_Initialize (IPersistFolder2
* iface
, LPCITEMIDLIST pidl
)
689 _ICOM_THIS_From_IPersistFolder2 (IGenericSFImpl
, iface
);
690 TRACE ("(%p)->(%p)\n", This
, pidl
);
694 /**************************************************************************
695 * IPersistFolder2_fnGetCurFolder
697 static HRESULT WINAPI
IMCFldr_PersistFolder2_GetCurFolder (IPersistFolder2
* iface
, LPITEMIDLIST
* pidl
)
699 _ICOM_THIS_From_IPersistFolder2 (IGenericSFImpl
, iface
);
701 TRACE ("(%p)->(%p)\n", This
, pidl
);
705 *pidl
= ILClone (This
->pidlRoot
);
709 static ICOM_VTABLE (IPersistFolder2
) vt_PersistFolder2
=
711 ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE
712 IMCFldr_PersistFolder2_QueryInterface
,
713 IMCFldr_PersistFolder2_AddRef
,
714 IMCFldr_PersistFolder2_Release
,
715 IMCFldr_PersistFolder2_GetClassID
,
716 IMCFldr_PersistFolder2_Initialize
,
717 IMCFldr_PersistFolder2_GetCurFolder