The implementation is mostly empty...
Mike
ChangeLog: * Create an IShellFolder2 implementation for My Network Places
? dlls/shell32/shfldr_nethood.c Index: dlls/shell32/Makefile.in =================================================================== RCS file: /home/wine/wine/dlls/shell32/Makefile.in,v retrieving revision 1.70 diff -u -r1.70 Makefile.in --- dlls/shell32/Makefile.in 17 Sep 2003 04:17:33 -0000 1.70 +++ dlls/shell32/Makefile.in 17 Sep 2003 08:28:40 -0000 @@ -40,6 +40,7 @@ shfldr_desktop.c \ shfldr_fs.c \ shfldr_mycomp.c \ + shfldr_nethood.c \ shlexec.c \ shlfileop.c \ shlfolder.c \ Index: dlls/shell32/enumidlist.c =================================================================== RCS file: /home/wine/wine/dlls/shell32/enumidlist.c,v retrieving revision 1.31 diff -u -r1.31 enumidlist.c --- dlls/shell32/enumidlist.c 5 Sep 2003 23:08:31 -0000 1.31 +++ dlls/shell32/enumidlist.c 17 Sep 2003 08:28:41 -0000 @@ -343,6 +343,10 @@ case EIDL_FILE: ret = CreateFolderEnumList((IEnumIDList*)lpeidl, lpszPath, dwFlags); break; + + case EIDL_EMPTY: + ret = TRUE; + break; } if(!ret) { Index: dlls/shell32/pidl.c =================================================================== RCS file: /home/wine/wine/dlls/shell32/pidl.c,v retrieving revision 1.89 diff -u -r1.89 pidl.c --- dlls/shell32/pidl.c 17 Sep 2003 04:17:33 -0000 1.89 +++ dlls/shell32/pidl.c 17 Sep 2003 08:28:42 -0000 @@ -968,6 +968,10 @@ *ppidl = _ILCreateNetwork (); break; + case CSIDL_NETHOOD: + *ppidl = _ILCreateNetHood (); + break; + case CSIDL_CONTROLS: *ppidl = _ILCreateControl (); break; @@ -1264,6 +1268,11 @@ } LPITEMIDLIST _ILCreateNetwork() +{ TRACE("()\n"); + return _ILCreate(PT_MYCOMP, &CLSID_NetworkPlaces, sizeof(GUID)); +} + +LPITEMIDLIST _ILCreateNetHood() { TRACE("()\n"); return _ILCreate(PT_MYCOMP, &CLSID_NetworkPlaces, sizeof(GUID)); } Index: dlls/shell32/pidl.h =================================================================== RCS file: /home/wine/wine/dlls/shell32/pidl.h,v retrieving revision 1.31 diff -u -r1.31 pidl.h --- dlls/shell32/pidl.h 5 Sep 2003 23:08:31 -0000 1.31 +++ dlls/shell32/pidl.h 17 Sep 2003 08:28:42 -0000 @@ -178,6 +178,7 @@ LPITEMIDLIST _ILCreateControl (void); LPITEMIDLIST _ILCreatePrinter (void); LPITEMIDLIST _ILCreateNetwork (void); +LPITEMIDLIST _ILCreateNetHood (void); LPITEMIDLIST _ILCreateBitBucket (void); LPITEMIDLIST _ILCreateDrive (LPCSTR); LPITEMIDLIST _ILCreateFolder (WIN32_FIND_DATAA * stffile); Index: dlls/shell32/shell32_main.h =================================================================== RCS file: /home/wine/wine/dlls/shell32/shell32_main.h,v retrieving revision 1.72 diff -u -r1.72 shell32_main.h --- dlls/shell32/shell32_main.h 17 Sep 2003 04:17:33 -0000 1.72 +++ dlls/shell32/shell32_main.h 17 Sep 2003 08:28:42 -0000 @@ -93,6 +93,7 @@ HRESULT WINAPI IShellLink_Constructor(IUnknown * pUnkOuter, REFIID riid, LPVOID * ppv); HRESULT WINAPI ISF_Desktop_Constructor(IUnknown * pUnkOuter, REFIID riid, LPVOID * ppv); HRESULT WINAPI ISF_MyComputer_Constructor(IUnknown * pUnkOuter, REFIID riid, LPVOID * ppv); +HRESULT WINAPI ISF_NetworkPlaces_Constructor(IUnknown * pUnkOuter, REFIID riid, LPVOID * ppv); HRESULT WINAPI IDropTargetHelper_Constructor (IUnknown * pUnkOuter, REFIID riid, LPVOID * ppv); HRESULT WINAPI IFileSystemBindData_Constructor(const WIN32_FIND_DATAW *pfd, LPBC *ppV); @@ -100,6 +101,7 @@ #define EIDL_DESK 0 #define EIDL_MYCOMP 1 #define EIDL_FILE 2 +#define EIDL_EMPTY 3 LPENUMIDLIST IEnumIDList_Constructor(LPCSTR,DWORD,DWORD); Index: dlls/shell32/shellole.c =================================================================== RCS file: /home/wine/wine/dlls/shell32/shellole.c,v retrieving revision 1.59 diff -u -r1.59 shellole.c --- dlls/shell32/shellole.c 5 Sep 2003 23:08:31 -0000 1.59 +++ dlls/shell32/shellole.c 17 Sep 2003 08:28:42 -0000 @@ -61,9 +61,10 @@ struct { REFIID riid; LPFNCREATEINSTANCE lpfnCI; -} InterfaceTable[6] = { +} InterfaceTable[7] = { {&CLSID_ShellFSFolder, &IFSFolder_Constructor}, {&CLSID_MyComputer, &ISF_MyComputer_Constructor}, + {&CLSID_NetworkPlaces, &ISF_NetworkPlaces_Constructor}, {&CLSID_ShellDesktop, &ISF_Desktop_Constructor}, {&CLSID_ShellLink, &IShellLink_Constructor}, {&CLSID_DragDropHelper, &IDropTargetHelper_Constructor}, --- /dev/null 1994-07-18 09:46:18.000000000 +1000 +++ dlls/shell32/shfldr_nethood.c 2003-09-18 21:46:49.000000000 +1000 @@ -0,0 +1,601 @@ + +/* + * Network Places (Neighbourhood) folder + * + * Copyright 1997 Marcus Meissner + * Copyright 1998, 1999, 2002 Juergen Schmied + * Copyright 2003 Mike McCormack for Codeweavers + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#include "config.h" +#include "wine/port.h" + +#include <stdlib.h> +#include <string.h> +#include <stdarg.h> +#include <stdio.h> + +#define NONAMELESSUNION +#define NONAMELESSSTRUCT +#include "winerror.h" +#include "windef.h" +#include "winbase.h" +#include "winreg.h" + +#include "wingdi.h" +#include "pidl.h" +#include "shlguid.h" + +#include "undocshell.h" +#include "shell32_main.h" +#include "shresdef.h" +#include "shlwapi.h" +#include "shellfolder.h" +#include "wine/debug.h" +#include "debughlp.h" +#include "shfldr.h" + +WINE_DEFAULT_DEBUG_CHANNEL (shell); + +/*********************************************************************** +* IShellFolder implementation +*/ + +typedef struct { + ICOM_VFIELD (IShellFolder2); + DWORD ref; + ICOM_VTABLE (IPersistFolder2) * lpVtblPersistFolder2; + + /* both paths are parsible from the desktop */ + LPITEMIDLIST pidlRoot; /* absolute pidl */ + int dwAttributes; /* attributes returned by GetAttributesOf FIXME: use it */ +} IGenericSFImpl; + +static struct ICOM_VTABLE (IShellFolder2) vt_ShellFolder2; +static struct ICOM_VTABLE (IPersistFolder2) vt_PersistFolder2; + +HRESULT WINAPI ISF_NetworkPlaces_Constructor (IUnknown * pUnkOuter, REFIID riid, LPVOID * ppv); + +#define _IPersistFolder2_Offset ((int)(&(((IGenericSFImpl*)0)->lpVtblPersistFolder2))) +#define _ICOM_THIS_From_IPersistFolder2(class, name) class* This = (class*)(((char*)name)-_IPersistFolder2_Offset); + +/* + converts This to a interface pointer +*/ +#define _IUnknown_(This) (IUnknown*)&(This->lpVtbl) +#define _IShellFolder_(This) (IShellFolder*)&(This->lpVtbl) +#define _IShellFolder2_(This) (IShellFolder2*)&(This->lpVtbl) + +#define _IPersist_(This) (IPersist*)&(This->lpVtblPersistFolder2) +#define _IPersistFolder_(This) (IPersistFolder*)&(This->lpVtblPersistFolder2) +#define _IPersistFolder2_(This) (IPersistFolder2*)&(This->lpVtblPersistFolder2) + +/*********************************************************************** +* IShellFolder [NetworkPlaces] implementation +*/ + +static shvheader NetworkPlacesSFHeader[] = { + {IDS_SHV_COLUMN1, SHCOLSTATE_TYPE_STR | SHCOLSTATE_ONBYDEFAULT, LVCFMT_RIGHT, 15}, + {IDS_SHV_COLUMN3, SHCOLSTATE_TYPE_STR | SHCOLSTATE_ONBYDEFAULT, LVCFMT_RIGHT, 10}, + {IDS_SHV_COLUMN6, SHCOLSTATE_TYPE_STR | SHCOLSTATE_ONBYDEFAULT, LVCFMT_RIGHT, 10}, + {IDS_SHV_COLUMN7, SHCOLSTATE_TYPE_STR | SHCOLSTATE_ONBYDEFAULT, LVCFMT_RIGHT, 10}, +}; + +#define MYCOMPUTERSHELLVIEWCOLUMNS 4 + +/************************************************************************** +* ISF_NetworkPlaces_Constructor +*/ +HRESULT WINAPI ISF_NetworkPlaces_Constructor (IUnknown * pUnkOuter, REFIID riid, LPVOID * ppv) +{ + IGenericSFImpl *sf; + + TRACE ("unkOut=%p %s\n", pUnkOuter, shdebugstr_guid (riid)); + + if (!ppv) + return E_POINTER; + if (pUnkOuter) + return CLASS_E_NOAGGREGATION; + + sf = (IGenericSFImpl *) LocalAlloc (GMEM_ZEROINIT, sizeof (IGenericSFImpl)); + if (!sf) + return E_OUTOFMEMORY; + + sf->ref = 0; + sf->lpVtbl = &vt_ShellFolder2; + sf->lpVtblPersistFolder2 = &vt_PersistFolder2; + sf->pidlRoot = _ILCreateNetHood(); /* my qualified pidl */ + + if (!SUCCEEDED (IUnknown_QueryInterface (_IUnknown_ (sf), riid, ppv))) { + IUnknown_Release (_IUnknown_ (sf)); + return E_NOINTERFACE; + } + + TRACE ("--(%p)\n", sf); + return S_OK; +} + +/************************************************************************** + * ISF_NetworkPlaces_fnQueryInterface + * + * NOTES supports not IPersist/IPersistFolder + */ +static HRESULT WINAPI ISF_NetworkPlaces_fnQueryInterface (IShellFolder2 * iface, REFIID riid, LPVOID * ppvObj) +{ + ICOM_THIS (IGenericSFImpl, iface); + + TRACE ("(%p)->(%s,%p)\n", This, shdebugstr_guid (riid), ppvObj); + + *ppvObj = NULL; + + if (IsEqualIID (riid, &IID_IUnknown) || + IsEqualIID (riid, &IID_IShellFolder) || IsEqualIID (riid, &IID_IShellFolder2)) { + *ppvObj = This; + } else if (IsEqualIID (riid, &IID_IPersist) || + IsEqualIID (riid, &IID_IPersistFolder) || IsEqualIID (riid, &IID_IPersistFolder2)) { + *ppvObj = _IPersistFolder2_ (This); + } + + if (*ppvObj) { + IUnknown_AddRef ((IUnknown *) (*ppvObj)); + TRACE ("-- Interface: (%p)->(%p)\n", ppvObj, *ppvObj); + return S_OK; + } + TRACE ("-- Interface: E_NOINTERFACE\n"); + return E_NOINTERFACE; +} + +static ULONG WINAPI ISF_NetworkPlaces_fnAddRef (IShellFolder2 * iface) +{ + ICOM_THIS (IGenericSFImpl, iface); + + TRACE ("(%p)->(count=%lu)\n", This, This->ref); + + return ++(This->ref); +} + +static ULONG WINAPI ISF_NetworkPlaces_fnRelease (IShellFolder2 * iface) +{ + ICOM_THIS (IGenericSFImpl, iface); + + TRACE ("(%p)->(count=%lu)\n", This, This->ref); + + if (!--(This->ref)) { + TRACE ("-- destroying IShellFolder(%p)\n", This); + if (This->pidlRoot) + SHFree (This->pidlRoot); + LocalFree ((HLOCAL) This); + return 0; + } + return This->ref; +} + +/************************************************************************** +* ISF_NetworkPlaces_fnParseDisplayName +*/ +static HRESULT WINAPI +ISF_NetworkPlaces_fnParseDisplayName (IShellFolder2 * iface, + HWND hwndOwner, + LPBC pbcReserved, + LPOLESTR lpszDisplayName, + DWORD * pchEaten, LPITEMIDLIST * ppidl, DWORD * pdwAttributes) +{ + ICOM_THIS (IGenericSFImpl, iface); + + HRESULT hr = E_UNEXPECTED; + + TRACE ("(%p)->(HWND=%p,%p,%p=%s,%p,pidl=%p,%p)\n", + This, hwndOwner, pbcReserved, lpszDisplayName, debugstr_w (lpszDisplayName), pchEaten, ppidl, pdwAttributes); + + *ppidl = 0; + if (pchEaten) + *pchEaten = 0; /* strange but like the original */ + + TRACE ("(%p)->(-- ret=0x%08lx)\n", This, hr); + + return hr; +} + +/************************************************************************** +* ISF_NetworkPlaces_fnEnumObjects +*/ +static HRESULT WINAPI +ISF_NetworkPlaces_fnEnumObjects (IShellFolder2 * iface, HWND hwndOwner, DWORD dwFlags, LPENUMIDLIST * ppEnumIDList) +{ + ICOM_THIS (IGenericSFImpl, iface); + + TRACE ("(%p)->(HWND=%p flags=0x%08lx pplist=%p)\n", This, hwndOwner, dwFlags, ppEnumIDList); + + *ppEnumIDList = IEnumIDList_Constructor (NULL, dwFlags, EIDL_EMPTY); + + TRACE ("-- (%p)->(new ID List: %p)\n", This, *ppEnumIDList); + + return (*ppEnumIDList) ? S_OK : E_OUTOFMEMORY; +} + +/************************************************************************** +* ISF_NetworkPlaces_fnBindToObject +*/ +static HRESULT WINAPI +ISF_NetworkPlaces_fnBindToObject (IShellFolder2 * iface, LPCITEMIDLIST pidl, + LPBC pbcReserved, REFIID riid, LPVOID * ppvOut) +{ + ICOM_THIS (IGenericSFImpl, iface); + + TRACE ("(%p)->(pidl=%p,%p,%s,%p)\n", This, pidl, pbcReserved, shdebugstr_guid (riid), ppvOut); + + return SHELL32_BindToChild (This->pidlRoot, NULL, pidl, riid, ppvOut); +} + +/************************************************************************** +* ISF_NetworkPlaces_fnBindToStorage +*/ +static HRESULT WINAPI +ISF_NetworkPlaces_fnBindToStorage (IShellFolder2 * iface, + LPCITEMIDLIST pidl, LPBC pbcReserved, REFIID riid, LPVOID * ppvOut) +{ + ICOM_THIS (IGenericSFImpl, iface); + + FIXME ("(%p)->(pidl=%p,%p,%s,%p) stub\n", This, pidl, pbcReserved, shdebugstr_guid (riid), ppvOut); + + *ppvOut = NULL; + return E_NOTIMPL; +} + +/************************************************************************** +* ISF_NetworkPlaces_fnCompareIDs +*/ + +static HRESULT WINAPI +ISF_NetworkPlaces_fnCompareIDs (IShellFolder2 * iface, LPARAM lParam, LPCITEMIDLIST pidl1, LPCITEMIDLIST pidl2) +{ + ICOM_THIS (IGenericSFImpl, iface); + + int nReturn; + + TRACE ("(%p)->(0x%08lx,pidl1=%p,pidl2=%p)\n", This, lParam, pidl1, pidl2); + nReturn = SHELL32_CompareIDs (_IShellFolder_ (This), lParam, pidl1, pidl2); + TRACE ("-- %i\n", nReturn); + return nReturn; +} + +/************************************************************************** +* ISF_NetworkPlaces_fnCreateViewObject +*/ +static HRESULT WINAPI +ISF_NetworkPlaces_fnCreateViewObject (IShellFolder2 * iface, HWND hwndOwner, REFIID riid, LPVOID * ppvOut) +{ + ICOM_THIS (IGenericSFImpl, iface); + + LPSHELLVIEW pShellView; + HRESULT hr = E_INVALIDARG; + + TRACE ("(%p)->(hwnd=%p,%s,%p)\n", This, hwndOwner, shdebugstr_guid (riid), ppvOut); + + if (ppvOut) { + *ppvOut = NULL; + + if (IsEqualIID (riid, &IID_IDropTarget)) { + WARN ("IDropTarget not implemented\n"); + hr = E_NOTIMPL; + } else if (IsEqualIID (riid, &IID_IContextMenu)) { + WARN ("IContextMenu not implemented\n"); + hr = E_NOTIMPL; + } else if (IsEqualIID (riid, &IID_IShellView)) { + pShellView = IShellView_Constructor ((IShellFolder *) iface); + if (pShellView) { + hr = IShellView_QueryInterface (pShellView, riid, ppvOut); + IShellView_Release (pShellView); + } + } + } + TRACE ("-- (%p)->(interface=%p)\n", This, ppvOut); + return hr; +} + +/************************************************************************** +* ISF_NetworkPlaces_fnGetAttributesOf +*/ +static HRESULT WINAPI +ISF_NetworkPlaces_fnGetAttributesOf (IShellFolder2 * iface, UINT cidl, LPCITEMIDLIST * apidl, DWORD * rgfInOut) +{ + ICOM_THIS (IGenericSFImpl, iface); + + HRESULT hr = S_OK; + + TRACE ("(%p)->(cidl=%d apidl=%p mask=0x%08lx)\n", This, cidl, apidl, *rgfInOut); + + if ((!cidl) || (!apidl) || (!rgfInOut)) + return E_INVALIDARG; + + while (cidl > 0 && *apidl) { + DWORD attribs = 0; + pdump (*apidl); + SHELL32_GetItemAttributes (_IShellFolder_ (This), *apidl, &attribs); + *rgfInOut &= attribs; + apidl++; + cidl--; + } + + TRACE ("-- result=0x%08lx\n", *rgfInOut); + return hr; +} + +/************************************************************************** +* ISF_NetworkPlaces_fnGetUIObjectOf +* +* PARAMETERS +* HWND hwndOwner, //[in ] Parent window for any output +* UINT cidl, //[in ] array size +* LPCITEMIDLIST* apidl, //[in ] simple pidl array +* REFIID riid, //[in ] Requested Interface +* UINT* prgfInOut, //[ ] reserved +* LPVOID* ppvObject) //[out] Resulting Interface +* +*/ +static HRESULT WINAPI +ISF_NetworkPlaces_fnGetUIObjectOf (IShellFolder2 * iface, + HWND hwndOwner, + UINT cidl, LPCITEMIDLIST * apidl, REFIID riid, UINT * prgfInOut, LPVOID * ppvOut) +{ + ICOM_THIS (IGenericSFImpl, iface); + + LPITEMIDLIST pidl; + IUnknown *pObj = NULL; + HRESULT hr = E_INVALIDARG; + + TRACE ("(%p)->(%p,%u,apidl=%p,%s,%p,%p)\n", + This, hwndOwner, cidl, apidl, shdebugstr_guid (riid), prgfInOut, ppvOut); + + if (ppvOut) { + *ppvOut = NULL; + + if (IsEqualIID (riid, &IID_IContextMenu) && (cidl >= 1)) { + pObj = (LPUNKNOWN) ISvItemCm_Constructor ((IShellFolder *) iface, This->pidlRoot, apidl, cidl); + hr = S_OK; + } else if (IsEqualIID (riid, &IID_IDataObject) && (cidl >= 1)) { + pObj = (LPUNKNOWN) IDataObject_Constructor (hwndOwner, This->pidlRoot, apidl, cidl); + hr = S_OK; + } else if (IsEqualIID (riid, &IID_IExtractIconA) && (cidl == 1)) { + pidl = ILCombine (This->pidlRoot, apidl[0]); + pObj = (LPUNKNOWN) IExtractIconA_Constructor (pidl); + SHFree (pidl); + hr = S_OK; + } else if (IsEqualIID (riid, &IID_IExtractIconW) && (cidl == 1)) { + pidl = ILCombine (This->pidlRoot, apidl[0]); + pObj = (LPUNKNOWN) IExtractIconW_Constructor (pidl); + SHFree (pidl); + hr = S_OK; + } else if (IsEqualIID (riid, &IID_IDropTarget) && (cidl >= 1)) { + hr = IShellFolder_QueryInterface (iface, &IID_IDropTarget, (LPVOID *) & pObj); + } else { + hr = E_NOINTERFACE; + } + + if (!pObj) + hr = E_OUTOFMEMORY; + + *ppvOut = pObj; + } + TRACE ("(%p)->hr=0x%08lx\n", This, hr); + return hr; +} + +/************************************************************************** +* ISF_NetworkPlaces_fnGetDisplayNameOf +* +*/ +static HRESULT WINAPI ISF_NetworkPlaces_fnGetDisplayNameOf (IShellFolder2 * iface, LPCITEMIDLIST pidl, DWORD dwFlags, LPSTRRET strRet) +{ + ICOM_THIS (IGenericSFImpl, iface); + + FIXME ("(%p)->(pidl=%p,0x%08lx,%p)\n", This, pidl, dwFlags, strRet); + pdump (pidl); + + return E_NOTIMPL; +} + +/************************************************************************** +* ISF_NetworkPlaces_fnSetNameOf +* Changes the name of a file object or subfolder, possibly changing its item +* identifier in the process. +* +* PARAMETERS +* HWND hwndOwner, //[in ] Owner window for output +* LPCITEMIDLIST pidl, //[in ] simple pidl of item to change +* LPCOLESTR lpszName, //[in ] the items new display name +* DWORD dwFlags, //[in ] SHGNO formatting flags +* LPITEMIDLIST* ppidlOut) //[out] simple pidl returned +*/ +static HRESULT WINAPI ISF_NetworkPlaces_fnSetNameOf (IShellFolder2 * iface, HWND hwndOwner, LPCITEMIDLIST pidl, /*simple pidl */ + LPCOLESTR lpName, DWORD dwFlags, LPITEMIDLIST * pPidlOut) +{ + ICOM_THIS (IGenericSFImpl, iface); + FIXME ("(%p)->(%p,pidl=%p,%s,%lu,%p)\n", This, hwndOwner, pidl, debugstr_w (lpName), dwFlags, pPidlOut); + return E_FAIL; +} + +static HRESULT WINAPI ISF_NetworkPlaces_fnGetDefaultSearchGUID (IShellFolder2 * iface, GUID * pguid) +{ + ICOM_THIS (IGenericSFImpl, iface); + FIXME ("(%p)\n", This); + return E_NOTIMPL; +} +static HRESULT WINAPI ISF_NetworkPlaces_fnEnumSearches (IShellFolder2 * iface, IEnumExtraSearch ** ppenum) +{ + ICOM_THIS (IGenericSFImpl, iface); + FIXME ("(%p)\n", This); + return E_NOTIMPL; +} +static HRESULT WINAPI ISF_NetworkPlaces_fnGetDefaultColumn (IShellFolder2 * iface, DWORD dwRes, ULONG * pSort, ULONG * pDisplay) +{ + ICOM_THIS (IGenericSFImpl, iface); + + TRACE ("(%p)\n", This); + + if (pSort) *pSort = 0; + if (pDisplay) *pDisplay = 0; + return S_OK; +} +static HRESULT WINAPI ISF_NetworkPlaces_fnGetDefaultColumnState (IShellFolder2 * iface, UINT iColumn, DWORD * pcsFlags) +{ + ICOM_THIS (IGenericSFImpl, iface); + + TRACE ("(%p)\n", This); + + if (!pcsFlags || iColumn >= MYCOMPUTERSHELLVIEWCOLUMNS) return E_INVALIDARG; + *pcsFlags = NetworkPlacesSFHeader[iColumn].pcsFlags; + return S_OK; +} +static HRESULT WINAPI ISF_NetworkPlaces_fnGetDetailsEx (IShellFolder2 * iface, LPCITEMIDLIST pidl, const SHCOLUMNID * pscid, VARIANT * pv) +{ + ICOM_THIS (IGenericSFImpl, iface); + FIXME ("(%p)\n", This); + return E_NOTIMPL; +} + +/* FIXME: drive size >4GB is rolling over */ +static HRESULT WINAPI ISF_NetworkPlaces_fnGetDetailsOf (IShellFolder2 * iface, LPCITEMIDLIST pidl, UINT iColumn, SHELLDETAILS * psd) +{ + ICOM_THIS (IGenericSFImpl, iface); + + FIXME ("(%p)->(%p %i %p)\n", This, pidl, iColumn, psd); + + return E_NOTIMPL; +} +static HRESULT WINAPI ISF_NetworkPlaces_fnMapColumnToSCID (IShellFolder2 * iface, UINT column, SHCOLUMNID * pscid) +{ + ICOM_THIS (IGenericSFImpl, iface); + FIXME ("(%p)\n", This); + return E_NOTIMPL; +} + +static ICOM_VTABLE (IShellFolder2) vt_ShellFolder2 = +{ + ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE + ISF_NetworkPlaces_fnQueryInterface, + ISF_NetworkPlaces_fnAddRef, + ISF_NetworkPlaces_fnRelease, + ISF_NetworkPlaces_fnParseDisplayName, + ISF_NetworkPlaces_fnEnumObjects, + ISF_NetworkPlaces_fnBindToObject, + ISF_NetworkPlaces_fnBindToStorage, + ISF_NetworkPlaces_fnCompareIDs, + ISF_NetworkPlaces_fnCreateViewObject, + ISF_NetworkPlaces_fnGetAttributesOf, + ISF_NetworkPlaces_fnGetUIObjectOf, + ISF_NetworkPlaces_fnGetDisplayNameOf, + ISF_NetworkPlaces_fnSetNameOf, + /* ShellFolder2 */ + ISF_NetworkPlaces_fnGetDefaultSearchGUID, + ISF_NetworkPlaces_fnEnumSearches, + ISF_NetworkPlaces_fnGetDefaultColumn, + ISF_NetworkPlaces_fnGetDefaultColumnState, + ISF_NetworkPlaces_fnGetDetailsEx, + ISF_NetworkPlaces_fnGetDetailsOf, + ISF_NetworkPlaces_fnMapColumnToSCID +}; + +/************************************************************************ + * INPFldr_PersistFolder2_QueryInterface + */ +static HRESULT WINAPI INPFldr_PersistFolder2_QueryInterface (IPersistFolder2 * iface, REFIID iid, LPVOID * ppvObj) +{ + _ICOM_THIS_From_IPersistFolder2 (IGenericSFImpl, iface); + + TRACE ("(%p)\n", This); + + return IUnknown_QueryInterface (_IUnknown_ (This), iid, ppvObj); +} + +/************************************************************************ + * INPFldr_PersistFolder2_AddRef + */ +static ULONG WINAPI INPFldr_PersistFolder2_AddRef (IPersistFolder2 * iface) +{ + _ICOM_THIS_From_IPersistFolder2 (IGenericSFImpl, iface); + + TRACE ("(%p)->(count=%lu)\n", This, This->ref); + + return IUnknown_AddRef (_IUnknown_ (This)); +} + +/************************************************************************ + * ISFPersistFolder_Release + */ +static ULONG WINAPI INPFldr_PersistFolder2_Release (IPersistFolder2 * iface) +{ + _ICOM_THIS_From_IPersistFolder2 (IGenericSFImpl, iface); + + TRACE ("(%p)->(count=%lu)\n", This, This->ref); + + return IUnknown_Release (_IUnknown_ (This)); +} + +/************************************************************************ + * INPFldr_PersistFolder2_GetClassID + */ +static HRESULT WINAPI INPFldr_PersistFolder2_GetClassID (IPersistFolder2 * iface, CLSID * lpClassId) +{ + _ICOM_THIS_From_IPersistFolder2 (IGenericSFImpl, iface); + + TRACE ("(%p)\n", This); + + if (!lpClassId) + return E_POINTER; + *lpClassId = CLSID_NetworkPlaces; + + return S_OK; +} + +/************************************************************************ + * INPFldr_PersistFolder2_Initialize + * + * NOTES: it makes no sense to change the pidl + */ +static HRESULT WINAPI INPFldr_PersistFolder2_Initialize (IPersistFolder2 * iface, LPCITEMIDLIST pidl) +{ + _ICOM_THIS_From_IPersistFolder2 (IGenericSFImpl, iface); + TRACE ("(%p)->(%p)\n", This, pidl); + return E_NOTIMPL; +} + +/************************************************************************** + * IPersistFolder2_fnGetCurFolder + */ +static HRESULT WINAPI INPFldr_PersistFolder2_GetCurFolder (IPersistFolder2 * iface, LPITEMIDLIST * pidl) +{ + _ICOM_THIS_From_IPersistFolder2 (IGenericSFImpl, iface); + + TRACE ("(%p)->(%p)\n", This, pidl); + + if (!pidl) + return E_POINTER; + *pidl = ILClone (This->pidlRoot); + return S_OK; +} + +static ICOM_VTABLE (IPersistFolder2) vt_PersistFolder2 = +{ +ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE + INPFldr_PersistFolder2_QueryInterface, + INPFldr_PersistFolder2_AddRef, + INPFldr_PersistFolder2_Release, + INPFldr_PersistFolder2_GetClassID, + INPFldr_PersistFolder2_Initialize, + INPFldr_PersistFolder2_GetCurFolder +};