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"
30 #define NONAMELESSUNION
31 #define NONAMELESSSTRUCT
39 #include "undocshell.h"
40 #include "shell32_main.h"
43 #include "shellfolder.h"
44 #include "wine/debug.h"
48 WINE_DEFAULT_DEBUG_CHANNEL (shell
);
50 /***********************************************************************
51 * IShellFolder implementation
55 ICOM_VFIELD (IShellFolder2
);
57 ICOM_VTABLE (IPersistFolder2
) * lpVtblPersistFolder2
;
59 /* both paths are parsible from the desktop */
60 LPITEMIDLIST pidlRoot
; /* absolute pidl */
61 int dwAttributes
; /* attributes returned by GetAttributesOf FIXME: use it */
64 static struct ICOM_VTABLE (IShellFolder2
) vt_ShellFolder2
;
65 static struct ICOM_VTABLE (IPersistFolder2
) vt_PersistFolder2
;
67 HRESULT WINAPI
ISF_MyComputer_Constructor (IUnknown
* pUnkOuter
, REFIID riid
, LPVOID
* ppv
);
69 #define _IPersistFolder2_Offset ((int)(&(((IGenericSFImpl*)0)->lpVtblPersistFolder2)))
70 #define _ICOM_THIS_From_IPersistFolder2(class, name) class* This = (class*)(((char*)name)-_IPersistFolder2_Offset);
73 converts This to a interface pointer
75 #define _IUnknown_(This) (IUnknown*)&(This->lpVtbl)
76 #define _IShellFolder_(This) (IShellFolder*)&(This->lpVtbl)
77 #define _IShellFolder2_(This) (IShellFolder2*)&(This->lpVtbl)
79 #define _IPersist_(This) (IPersist*)&(This->lpVtblPersistFolder2)
80 #define _IPersistFolder_(This) (IPersistFolder*)&(This->lpVtblPersistFolder2)
81 #define _IPersistFolder2_(This) (IPersistFolder2*)&(This->lpVtblPersistFolder2)
83 /***********************************************************************
84 * IShellFolder [MyComputer] implementation
87 static shvheader MyComputerSFHeader
[] = {
88 {IDS_SHV_COLUMN1
, SHCOLSTATE_TYPE_STR
| SHCOLSTATE_ONBYDEFAULT
, LVCFMT_RIGHT
, 15},
89 {IDS_SHV_COLUMN3
, SHCOLSTATE_TYPE_STR
| SHCOLSTATE_ONBYDEFAULT
, LVCFMT_RIGHT
, 10},
90 {IDS_SHV_COLUMN6
, SHCOLSTATE_TYPE_STR
| SHCOLSTATE_ONBYDEFAULT
, LVCFMT_RIGHT
, 10},
91 {IDS_SHV_COLUMN7
, SHCOLSTATE_TYPE_STR
| SHCOLSTATE_ONBYDEFAULT
, LVCFMT_RIGHT
, 10},
94 #define MYCOMPUTERSHELLVIEWCOLUMNS 4
96 /**************************************************************************
97 * ISF_MyComputer_Constructor
99 HRESULT WINAPI
ISF_MyComputer_Constructor (IUnknown
* pUnkOuter
, REFIID riid
, LPVOID
* ppv
)
103 TRACE ("unkOut=%p %s\n", pUnkOuter
, shdebugstr_guid (riid
));
108 return CLASS_E_NOAGGREGATION
;
110 sf
= (IGenericSFImpl
*) LocalAlloc (GMEM_ZEROINIT
, sizeof (IGenericSFImpl
));
112 return E_OUTOFMEMORY
;
115 ICOM_VTBL (sf
) = &vt_ShellFolder2
;
116 sf
->lpVtblPersistFolder2
= &vt_PersistFolder2
;
117 sf
->pidlRoot
= _ILCreateMyComputer (); /* my qualified pidl */
119 if (!SUCCEEDED (IUnknown_QueryInterface (_IUnknown_ (sf
), riid
, ppv
))) {
120 IUnknown_Release (_IUnknown_ (sf
));
121 return E_NOINTERFACE
;
124 TRACE ("--(%p)\n", sf
);
128 /**************************************************************************
129 * ISF_MyComputer_fnQueryInterface
131 * NOTES supports not IPersist/IPersistFolder
133 static HRESULT WINAPI
ISF_MyComputer_fnQueryInterface (IShellFolder2
* iface
, REFIID riid
, LPVOID
* ppvObj
)
135 ICOM_THIS (IGenericSFImpl
, iface
);
137 TRACE ("(%p)->(%s,%p)\n", This
, shdebugstr_guid (riid
), ppvObj
);
141 if (IsEqualIID (riid
, &IID_IUnknown
) ||
142 IsEqualIID (riid
, &IID_IShellFolder
) || IsEqualIID (riid
, &IID_IShellFolder2
)) {
144 } else if (IsEqualIID (riid
, &IID_IPersist
) ||
145 IsEqualIID (riid
, &IID_IPersistFolder
) || IsEqualIID (riid
, &IID_IPersistFolder2
)) {
146 *ppvObj
= _IPersistFolder2_ (This
);
150 IUnknown_AddRef ((IUnknown
*) (*ppvObj
));
151 TRACE ("-- Interface: (%p)->(%p)\n", ppvObj
, *ppvObj
);
154 TRACE ("-- Interface: E_NOINTERFACE\n");
155 return E_NOINTERFACE
;
158 static ULONG WINAPI
ISF_MyComputer_fnAddRef (IShellFolder2
* iface
)
160 ICOM_THIS (IGenericSFImpl
, iface
);
162 TRACE ("(%p)->(count=%lu)\n", This
, This
->ref
);
164 return ++(This
->ref
);
167 static ULONG WINAPI
ISF_MyComputer_fnRelease (IShellFolder2
* iface
)
169 ICOM_THIS (IGenericSFImpl
, iface
);
171 TRACE ("(%p)->(count=%lu)\n", This
, This
->ref
);
173 if (!--(This
->ref
)) {
174 TRACE ("-- destroying IShellFolder(%p)\n", This
);
176 SHFree (This
->pidlRoot
);
177 LocalFree ((HLOCAL
) This
);
183 /**************************************************************************
184 * ISF_MyComputer_fnParseDisplayName
186 static HRESULT WINAPI
187 ISF_MyComputer_fnParseDisplayName (IShellFolder2
* iface
,
190 LPOLESTR lpszDisplayName
,
191 DWORD
* pchEaten
, LPITEMIDLIST
* ppidl
, DWORD
* pdwAttributes
)
193 ICOM_THIS (IGenericSFImpl
, iface
);
195 HRESULT hr
= E_OUTOFMEMORY
;
196 LPCWSTR szNext
= NULL
;
197 WCHAR szElement
[MAX_PATH
];
198 CHAR szTempA
[MAX_PATH
];
199 LPITEMIDLIST pidlTemp
;
201 TRACE ("(%p)->(HWND=%p,%p,%p=%s,%p,pidl=%p,%p)\n",
202 This
, hwndOwner
, pbcReserved
, lpszDisplayName
, debugstr_w (lpszDisplayName
), pchEaten
, ppidl
, pdwAttributes
);
206 *pchEaten
= 0; /* strange but like the original */
208 /* do we have an absolute path name ? */
209 if (PathGetDriveNumberW (lpszDisplayName
) >= 0 && lpszDisplayName
[2] == (WCHAR
) '\\') {
210 szNext
= GetNextElementW (lpszDisplayName
, szElement
, MAX_PATH
);
211 WideCharToMultiByte (CP_ACP
, 0, szElement
, -1, szTempA
, MAX_PATH
, NULL
, NULL
);
212 pidlTemp
= _ILCreateDrive (szTempA
);
214 if (szNext
&& *szNext
) {
215 hr
= SHELL32_ParseNextElement (hwndOwner
, iface
, &pidlTemp
, (LPOLESTR
) szNext
, pchEaten
, pdwAttributes
);
217 if (pdwAttributes
&& *pdwAttributes
) {
218 SHELL32_GetItemAttributes (_IShellFolder_ (This
), pidlTemp
, pdwAttributes
);
225 TRACE ("(%p)->(-- ret=0x%08lx)\n", This
, hr
);
230 /**************************************************************************
231 * ISF_MyComputer_fnEnumObjects
233 static HRESULT WINAPI
234 ISF_MyComputer_fnEnumObjects (IShellFolder2
* iface
, HWND hwndOwner
, DWORD dwFlags
, LPENUMIDLIST
* ppEnumIDList
)
236 ICOM_THIS (IGenericSFImpl
, iface
);
238 TRACE ("(%p)->(HWND=%p flags=0x%08lx pplist=%p)\n", This
, hwndOwner
, dwFlags
, ppEnumIDList
);
240 *ppEnumIDList
= IEnumIDList_Constructor (NULL
, dwFlags
, EIDL_MYCOMP
);
242 TRACE ("-- (%p)->(new ID List: %p)\n", This
, *ppEnumIDList
);
244 return (*ppEnumIDList
) ? S_OK
: E_OUTOFMEMORY
;
247 /**************************************************************************
248 * ISF_MyComputer_fnBindToObject
250 static HRESULT WINAPI
251 ISF_MyComputer_fnBindToObject (IShellFolder2
* iface
, LPCITEMIDLIST pidl
,
252 LPBC pbcReserved
, REFIID riid
, LPVOID
* ppvOut
)
254 ICOM_THIS (IGenericSFImpl
, iface
);
256 TRACE ("(%p)->(pidl=%p,%p,%s,%p)\n", This
, pidl
, pbcReserved
, shdebugstr_guid (riid
), ppvOut
);
258 return SHELL32_BindToChild (This
->pidlRoot
, NULL
, pidl
, riid
, ppvOut
);
261 /**************************************************************************
262 * ISF_MyComputer_fnBindToStorage
264 static HRESULT WINAPI
265 ISF_MyComputer_fnBindToStorage (IShellFolder2
* iface
,
266 LPCITEMIDLIST pidl
, LPBC pbcReserved
, REFIID riid
, LPVOID
* ppvOut
)
268 ICOM_THIS (IGenericSFImpl
, iface
);
270 FIXME ("(%p)->(pidl=%p,%p,%s,%p) stub\n", This
, pidl
, pbcReserved
, shdebugstr_guid (riid
), ppvOut
);
276 /**************************************************************************
277 * ISF_MyComputer_fnCompareIDs
280 static HRESULT WINAPI
281 ISF_MyComputer_fnCompareIDs (IShellFolder2
* iface
, LPARAM lParam
, LPCITEMIDLIST pidl1
, LPCITEMIDLIST pidl2
)
283 ICOM_THIS (IGenericSFImpl
, iface
);
287 TRACE ("(%p)->(0x%08lx,pidl1=%p,pidl2=%p)\n", This
, lParam
, pidl1
, pidl2
);
288 nReturn
= SHELL32_CompareIDs (_IShellFolder_ (This
), lParam
, pidl1
, pidl2
);
289 TRACE ("-- %i\n", nReturn
);
293 /**************************************************************************
294 * ISF_MyComputer_fnCreateViewObject
296 static HRESULT WINAPI
297 ISF_MyComputer_fnCreateViewObject (IShellFolder2
* iface
, HWND hwndOwner
, REFIID riid
, LPVOID
* ppvOut
)
299 ICOM_THIS (IGenericSFImpl
, iface
);
301 LPSHELLVIEW pShellView
;
302 HRESULT hr
= E_INVALIDARG
;
304 TRACE ("(%p)->(hwnd=%p,%s,%p)\n", This
, hwndOwner
, shdebugstr_guid (riid
), ppvOut
);
309 if (IsEqualIID (riid
, &IID_IDropTarget
)) {
310 WARN ("IDropTarget not implemented\n");
312 } else if (IsEqualIID (riid
, &IID_IContextMenu
)) {
313 WARN ("IContextMenu not implemented\n");
315 } else if (IsEqualIID (riid
, &IID_IShellView
)) {
316 pShellView
= IShellView_Constructor ((IShellFolder
*) iface
);
318 hr
= IShellView_QueryInterface (pShellView
, riid
, ppvOut
);
319 IShellView_Release (pShellView
);
323 TRACE ("-- (%p)->(interface=%p)\n", This
, ppvOut
);
327 /**************************************************************************
328 * ISF_MyComputer_fnGetAttributesOf
330 static HRESULT WINAPI
331 ISF_MyComputer_fnGetAttributesOf (IShellFolder2
* iface
, UINT cidl
, LPCITEMIDLIST
* apidl
, DWORD
* rgfInOut
)
333 ICOM_THIS (IGenericSFImpl
, iface
);
337 TRACE ("(%p)->(cidl=%d apidl=%p mask=0x%08lx)\n", This
, cidl
, apidl
, *rgfInOut
);
339 if ((!cidl
) || (!apidl
) || (!rgfInOut
))
342 while (cidl
> 0 && *apidl
) {
344 SHELL32_GetItemAttributes (_IShellFolder_ (This
), *apidl
, rgfInOut
);
349 TRACE ("-- result=0x%08lx\n", *rgfInOut
);
353 /**************************************************************************
354 * ISF_MyComputer_fnGetUIObjectOf
357 * HWND hwndOwner, //[in ] Parent window for any output
358 * UINT cidl, //[in ] array size
359 * LPCITEMIDLIST* apidl, //[in ] simple pidl array
360 * REFIID riid, //[in ] Requested Interface
361 * UINT* prgfInOut, //[ ] reserved
362 * LPVOID* ppvObject) //[out] Resulting Interface
365 static HRESULT WINAPI
366 ISF_MyComputer_fnGetUIObjectOf (IShellFolder2
* iface
,
368 UINT cidl
, LPCITEMIDLIST
* apidl
, REFIID riid
, UINT
* prgfInOut
, LPVOID
* ppvOut
)
370 ICOM_THIS (IGenericSFImpl
, iface
);
373 IUnknown
*pObj
= NULL
;
374 HRESULT hr
= E_INVALIDARG
;
376 TRACE ("(%p)->(%p,%u,apidl=%p,%s,%p,%p)\n",
377 This
, hwndOwner
, cidl
, apidl
, shdebugstr_guid (riid
), prgfInOut
, ppvOut
);
382 if (IsEqualIID (riid
, &IID_IContextMenu
) && (cidl
>= 1)) {
383 pObj
= (LPUNKNOWN
) ISvItemCm_Constructor ((IShellFolder
*) iface
, This
->pidlRoot
, apidl
, cidl
);
385 } else if (IsEqualIID (riid
, &IID_IDataObject
) && (cidl
>= 1)) {
386 pObj
= (LPUNKNOWN
) IDataObject_Constructor (hwndOwner
, This
->pidlRoot
, apidl
, cidl
);
388 } else if (IsEqualIID (riid
, &IID_IExtractIconA
) && (cidl
== 1)) {
389 pidl
= ILCombine (This
->pidlRoot
, apidl
[0]);
390 pObj
= (LPUNKNOWN
) IExtractIconA_Constructor (pidl
);
393 } else if (IsEqualIID (riid
, &IID_IExtractIconW
) && (cidl
== 1)) {
394 pidl
= ILCombine (This
->pidlRoot
, apidl
[0]);
395 pObj
= (LPUNKNOWN
) IExtractIconW_Constructor (pidl
);
398 } else if (IsEqualIID (riid
, &IID_IDropTarget
) && (cidl
>= 1)) {
399 hr
= IShellFolder_QueryInterface (iface
, &IID_IDropTarget
, (LPVOID
*) & pObj
);
409 TRACE ("(%p)->hr=0x%08lx\n", This
, hr
);
413 /**************************************************************************
414 * ISF_MyComputer_fnGetDisplayNameOf
417 * The desktopfolder creates only complete paths (SHGDN_FORPARSING).
418 * SHGDN_INFOLDER makes no sense.
420 static HRESULT WINAPI
ISF_MyComputer_fnGetDisplayNameOf (IShellFolder2
* iface
, LPCITEMIDLIST pidl
, DWORD dwFlags
, LPSTRRET strRet
)
422 ICOM_THIS (IGenericSFImpl
, iface
);
424 char szPath
[MAX_PATH
],
429 TRACE ("(%p)->(pidl=%p,0x%08lx,%p)\n", This
, pidl
, dwFlags
, strRet
);
438 bSimplePidl
= _ILIsPidlSimple (pidl
);
440 if (_ILIsSpecialFolder (pidl
)) {
441 /* take names of special folders only if its only this folder */
443 _ILSimpleGetText (pidl
, szPath
, MAX_PATH
); /* append my own path */
445 FIXME ("special folder\n");
448 if (!_ILIsDrive (pidl
)) {
449 ERR ("Wrong pidl type\n");
453 _ILSimpleGetText (pidl
, szPath
, MAX_PATH
); /* append my own path */
455 /* long view "lw_name (C:)" */
456 if (bSimplePidl
&& !(dwFlags
& SHGDN_FORPARSING
)) {
457 DWORD dwVolumeSerialNumber
,
458 dwMaximumComponetLength
,
461 GetVolumeInformationA (szPath
, szDrive
, sizeof (szDrive
) - 6, &dwVolumeSerialNumber
,
462 &dwMaximumComponetLength
, &dwFileSystemFlags
, NULL
, 0);
463 strcat (szDrive
, " (");
464 strncat (szDrive
, szPath
, 2);
465 strcat (szDrive
, ")");
466 strcpy (szPath
, szDrive
);
470 if (!bSimplePidl
) { /* go deeper if needed */
471 PathAddBackslashA (szPath
);
472 len
= strlen (szPath
);
475 (SHELL32_GetDisplayNameOfChild (iface
, pidl
, dwFlags
| SHGDN_INFOLDER
, szPath
+ len
, MAX_PATH
- len
)))
476 return E_OUTOFMEMORY
;
478 strRet
->uType
= STRRET_CSTR
;
479 lstrcpynA (strRet
->u
.cStr
, szPath
, MAX_PATH
);
481 TRACE ("-- (%p)->(%s)\n", This
, szPath
);
485 /**************************************************************************
486 * ISF_MyComputer_fnSetNameOf
487 * Changes the name of a file object or subfolder, possibly changing its item
488 * identifier in the process.
491 * HWND hwndOwner, //[in ] Owner window for output
492 * LPCITEMIDLIST pidl, //[in ] simple pidl of item to change
493 * LPCOLESTR lpszName, //[in ] the items new display name
494 * DWORD dwFlags, //[in ] SHGNO formatting flags
495 * LPITEMIDLIST* ppidlOut) //[out] simple pidl returned
497 static HRESULT WINAPI
ISF_MyComputer_fnSetNameOf (IShellFolder2
* iface
, HWND hwndOwner
, LPCITEMIDLIST pidl
, /*simple pidl */
498 LPCOLESTR lpName
, DWORD dwFlags
, LPITEMIDLIST
* pPidlOut
)
500 ICOM_THIS (IGenericSFImpl
, iface
);
501 FIXME ("(%p)->(%p,pidl=%p,%s,%lu,%p)\n", This
, hwndOwner
, pidl
, debugstr_w (lpName
), dwFlags
, pPidlOut
);
505 static HRESULT WINAPI
ISF_MyComputer_fnGetDefaultSearchGUID (IShellFolder2
* iface
, GUID
* pguid
)
507 ICOM_THIS (IGenericSFImpl
, iface
);
508 FIXME ("(%p)\n", This
);
511 static HRESULT WINAPI
ISF_MyComputer_fnEnumSearches (IShellFolder2
* iface
, IEnumExtraSearch
** ppenum
)
513 ICOM_THIS (IGenericSFImpl
, iface
);
514 FIXME ("(%p)\n", This
);
517 static HRESULT WINAPI
ISF_MyComputer_fnGetDefaultColumn (IShellFolder2
* iface
, DWORD dwRes
, ULONG
* pSort
, ULONG
* pDisplay
)
519 ICOM_THIS (IGenericSFImpl
, iface
);
521 TRACE ("(%p)\n", This
);
523 if (pSort
) *pSort
= 0;
524 if (pDisplay
) *pDisplay
= 0;
527 static HRESULT WINAPI
ISF_MyComputer_fnGetDefaultColumnState (IShellFolder2
* iface
, UINT iColumn
, DWORD
* pcsFlags
)
529 ICOM_THIS (IGenericSFImpl
, iface
);
531 TRACE ("(%p)\n", This
);
533 if (!pcsFlags
|| iColumn
>= MYCOMPUTERSHELLVIEWCOLUMNS
) return E_INVALIDARG
;
534 *pcsFlags
= MyComputerSFHeader
[iColumn
].pcsFlags
;
537 static HRESULT WINAPI
ISF_MyComputer_fnGetDetailsEx (IShellFolder2
* iface
, LPCITEMIDLIST pidl
, const SHCOLUMNID
* pscid
, VARIANT
* pv
)
539 ICOM_THIS (IGenericSFImpl
, iface
);
540 FIXME ("(%p)\n", This
);
544 /* FIXME: drive size >4GB is rolling over */
545 static HRESULT WINAPI
ISF_MyComputer_fnGetDetailsOf (IShellFolder2
* iface
, LPCITEMIDLIST pidl
, UINT iColumn
, SHELLDETAILS
* psd
)
547 ICOM_THIS (IGenericSFImpl
, iface
);
550 TRACE ("(%p)->(%p %i %p)\n", This
, pidl
, iColumn
, psd
);
552 if (!psd
|| iColumn
>= MYCOMPUTERSHELLVIEWCOLUMNS
)
556 psd
->fmt
= MyComputerSFHeader
[iColumn
].fmt
;
557 psd
->cxChar
= MyComputerSFHeader
[iColumn
].cxChar
;
558 psd
->str
.uType
= STRRET_CSTR
;
559 LoadStringA (shell32_hInstance
, MyComputerSFHeader
[iColumn
].colnameid
, psd
->str
.u
.cStr
, MAX_PATH
);
562 char szPath
[MAX_PATH
];
563 ULARGE_INTEGER ulBytes
;
565 psd
->str
.u
.cStr
[0] = 0x00;
566 psd
->str
.uType
= STRRET_CSTR
;
569 hr
= IShellFolder_GetDisplayNameOf (iface
, pidl
, SHGDN_NORMAL
| SHGDN_INFOLDER
, &psd
->str
);
572 _ILGetFileType (pidl
, psd
->str
.u
.cStr
, MAX_PATH
);
574 case 2: /* total size */
575 if (_ILIsDrive (pidl
)) {
576 _ILSimpleGetText (pidl
, szPath
, MAX_PATH
);
577 GetDiskFreeSpaceExA (szPath
, NULL
, &ulBytes
, NULL
);
578 StrFormatByteSizeA (ulBytes
.s
.LowPart
, psd
->str
.u
.cStr
, MAX_PATH
);
581 case 3: /* free size */
582 if (_ILIsDrive (pidl
)) {
583 _ILSimpleGetText (pidl
, szPath
, MAX_PATH
);
584 GetDiskFreeSpaceExA (szPath
, &ulBytes
, NULL
, NULL
);
585 StrFormatByteSizeA (ulBytes
.s
.LowPart
, psd
->str
.u
.cStr
, MAX_PATH
);
594 static HRESULT WINAPI
ISF_MyComputer_fnMapNameToSCID (IShellFolder2
* iface
, LPCWSTR pwszName
, SHCOLUMNID
* pscid
)
596 ICOM_THIS (IGenericSFImpl
, iface
);
597 FIXME ("(%p)\n", This
);
601 static ICOM_VTABLE (IShellFolder2
) vt_ShellFolder2
=
603 ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE
604 ISF_MyComputer_fnQueryInterface
,
605 ISF_MyComputer_fnAddRef
,
606 ISF_MyComputer_fnRelease
,
607 ISF_MyComputer_fnParseDisplayName
,
608 ISF_MyComputer_fnEnumObjects
,
609 ISF_MyComputer_fnBindToObject
,
610 ISF_MyComputer_fnBindToStorage
,
611 ISF_MyComputer_fnCompareIDs
,
612 ISF_MyComputer_fnCreateViewObject
,
613 ISF_MyComputer_fnGetAttributesOf
,
614 ISF_MyComputer_fnGetUIObjectOf
,
615 ISF_MyComputer_fnGetDisplayNameOf
,
616 ISF_MyComputer_fnSetNameOf
,
618 ISF_MyComputer_fnGetDefaultSearchGUID
,
619 ISF_MyComputer_fnEnumSearches
,
620 ISF_MyComputer_fnGetDefaultColumn
,
621 ISF_MyComputer_fnGetDefaultColumnState
,
622 ISF_MyComputer_fnGetDetailsEx
,
623 ISF_MyComputer_fnGetDetailsOf
,
624 ISF_MyComputer_fnMapNameToSCID
627 /************************************************************************
628 * IMCFldr_PersistFolder2_QueryInterface
630 static HRESULT WINAPI
IMCFldr_PersistFolder2_QueryInterface (IPersistFolder2
* iface
, REFIID iid
, LPVOID
* ppvObj
)
632 _ICOM_THIS_From_IPersistFolder2 (IGenericSFImpl
, iface
);
634 TRACE ("(%p)\n", This
);
636 return IUnknown_QueryInterface (_IUnknown_ (This
), iid
, ppvObj
);
639 /************************************************************************
640 * IMCFldr_PersistFolder2_AddRef
642 static ULONG WINAPI
IMCFldr_PersistFolder2_AddRef (IPersistFolder2
* iface
)
644 _ICOM_THIS_From_IPersistFolder2 (IGenericSFImpl
, iface
);
646 TRACE ("(%p)->(count=%lu)\n", This
, This
->ref
);
648 return IUnknown_AddRef (_IUnknown_ (This
));
651 /************************************************************************
652 * ISFPersistFolder_Release
654 static ULONG WINAPI
IMCFldr_PersistFolder2_Release (IPersistFolder2
* iface
)
656 _ICOM_THIS_From_IPersistFolder2 (IGenericSFImpl
, iface
);
658 TRACE ("(%p)->(count=%lu)\n", This
, This
->ref
);
660 return IUnknown_Release (_IUnknown_ (This
));
663 /************************************************************************
664 * IMCFldr_PersistFolder2_GetClassID
666 static HRESULT WINAPI
IMCFldr_PersistFolder2_GetClassID (IPersistFolder2
* iface
, CLSID
* lpClassId
)
668 _ICOM_THIS_From_IPersistFolder2 (IGenericSFImpl
, iface
);
670 TRACE ("(%p)\n", This
);
674 *lpClassId
= CLSID_MyComputer
;
679 /************************************************************************
680 * IMCFldr_PersistFolder2_Initialize
682 * NOTES: it makes no sense to change the pidl
684 static HRESULT WINAPI
IMCFldr_PersistFolder2_Initialize (IPersistFolder2
* iface
, LPCITEMIDLIST pidl
)
686 _ICOM_THIS_From_IPersistFolder2 (IGenericSFImpl
, iface
);
687 TRACE ("(%p)->(%p)\n", This
, pidl
);
691 /**************************************************************************
692 * IPersistFolder2_fnGetCurFolder
694 static HRESULT WINAPI
IMCFldr_PersistFolder2_GetCurFolder (IPersistFolder2
* iface
, LPITEMIDLIST
* pidl
)
696 _ICOM_THIS_From_IPersistFolder2 (IGenericSFImpl
, iface
);
698 TRACE ("(%p)->(%p)\n", This
, pidl
);
702 *pidl
= ILClone (This
->pidlRoot
);
706 static ICOM_VTABLE (IPersistFolder2
) vt_PersistFolder2
=
708 ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE
709 IMCFldr_PersistFolder2_QueryInterface
,
710 IMCFldr_PersistFolder2_AddRef
,
711 IMCFldr_PersistFolder2_Release
,
712 IMCFldr_PersistFolder2_GetClassID
,
713 IMCFldr_PersistFolder2_Initialize
,
714 IMCFldr_PersistFolder2_GetCurFolder