dmusic: Avoid swallowing collection Load failures.
[wine.git] / dlls / shell32 / shfldr_netplaces.c
blobe478da77c329d0614a69d5cc6ad78c55ae92e6ce
1 /*
2 * Network Places (Neighbourhood) folder
4 * Copyright 1997 Marcus Meissner
5 * Copyright 1998, 1999, 2002 Juergen Schmied
6 * Copyright 2003 Mike McCormack for CodeWeavers
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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
23 #include <stdlib.h>
24 #include <string.h>
25 #include <stdarg.h>
26 #include <stdio.h>
28 #define COBJMACROS
30 #include "winerror.h"
31 #include "windef.h"
32 #include "winbase.h"
33 #include "winreg.h"
35 #include "pidl.h"
36 #include "shell32_main.h"
37 #include "shresdef.h"
38 #include "wine/debug.h"
39 #include "debughlp.h"
40 #include "shfldr.h"
42 WINE_DEFAULT_DEBUG_CHANNEL (shell);
44 /***********************************************************************
45 * IShellFolder implementation
48 typedef struct {
49 IShellFolder2 IShellFolder2_iface;
50 IPersistFolder2 IPersistFolder2_iface;
51 LONG ref;
53 /* both paths are parsible from the desktop */
54 LPITEMIDLIST pidlRoot; /* absolute pidl */
55 } IGenericSFImpl;
57 static const IShellFolder2Vtbl vt_ShellFolder2;
58 static const IPersistFolder2Vtbl vt_NP_PersistFolder2;
60 static inline IGenericSFImpl *impl_from_IShellFolder2(IShellFolder2 *iface)
62 return CONTAINING_RECORD(iface, IGenericSFImpl, IShellFolder2_iface);
65 static inline IGenericSFImpl *impl_from_IPersistFolder2(IPersistFolder2 *iface)
67 return CONTAINING_RECORD(iface, IGenericSFImpl, IPersistFolder2_iface);
71 static const shvheader networkplaces_header[] =
73 { NULL, 0, IDS_SHV_COLUMN1, SHCOLSTATE_TYPE_STR | SHCOLSTATE_ONBYDEFAULT, LVCFMT_RIGHT, 15 },
74 { NULL, 0, IDS_SHV_COLUMN9, SHCOLSTATE_TYPE_STR | SHCOLSTATE_ONBYDEFAULT, LVCFMT_RIGHT, 10 },
77 /**************************************************************************
78 * ISF_NetworkPlaces_Constructor
80 HRESULT WINAPI ISF_NetworkPlaces_Constructor (IUnknown * pUnkOuter, REFIID riid, LPVOID * ppv)
82 IGenericSFImpl *sf;
84 TRACE ("unkOut=%p %s\n", pUnkOuter, shdebugstr_guid (riid));
86 if (!ppv)
87 return E_POINTER;
88 if (pUnkOuter)
89 return CLASS_E_NOAGGREGATION;
91 sf = calloc (1, sizeof (*sf));
92 if (!sf)
93 return E_OUTOFMEMORY;
95 sf->ref = 0;
96 sf->IShellFolder2_iface.lpVtbl = &vt_ShellFolder2;
97 sf->IPersistFolder2_iface.lpVtbl = &vt_NP_PersistFolder2;
98 sf->pidlRoot = _ILCreateNetHood(); /* my qualified pidl */
100 if (FAILED (IShellFolder2_QueryInterface (&sf->IShellFolder2_iface, riid, ppv)))
102 IShellFolder2_Release (&sf->IShellFolder2_iface);
103 return E_NOINTERFACE;
106 TRACE ("--(%p)\n", sf);
107 return S_OK;
110 /**************************************************************************
111 * ISF_NetworkPlaces_fnQueryInterface
113 * NOTE
114 * supports not IPersist/IPersistFolder
116 static HRESULT WINAPI ISF_NetworkPlaces_fnQueryInterface (IShellFolder2 *iface, REFIID riid, LPVOID *ppvObj)
118 IGenericSFImpl *This = impl_from_IShellFolder2(iface);
120 TRACE ("(%p)->(%s,%p)\n", This, shdebugstr_guid (riid), ppvObj);
122 *ppvObj = NULL;
124 if (IsEqualIID (riid, &IID_IUnknown) ||
125 IsEqualIID (riid, &IID_IShellFolder) ||
126 IsEqualIID (riid, &IID_IShellFolder2))
128 *ppvObj = &This->IShellFolder2_iface;
130 else if (IsEqualIID (riid, &IID_IPersist) ||
131 IsEqualIID (riid, &IID_IPersistFolder) ||
132 IsEqualIID (riid, &IID_IPersistFolder2))
134 *ppvObj = &This->IPersistFolder2_iface;
137 if (*ppvObj)
139 IUnknown_AddRef ((IUnknown *) (*ppvObj));
140 TRACE ("-- Interface: (%p)->(%p)\n", ppvObj, *ppvObj);
141 return S_OK;
143 TRACE ("-- Interface: E_NOINTERFACE\n");
144 return E_NOINTERFACE;
147 static ULONG WINAPI ISF_NetworkPlaces_fnAddRef (IShellFolder2 * iface)
149 IGenericSFImpl *This = impl_from_IShellFolder2(iface);
150 ULONG refCount = InterlockedIncrement(&This->ref);
152 TRACE ("(%p)->(count=%lu)\n", This, refCount - 1);
154 return refCount;
157 static ULONG WINAPI ISF_NetworkPlaces_fnRelease (IShellFolder2 * iface)
159 IGenericSFImpl *This = impl_from_IShellFolder2(iface);
160 ULONG refCount = InterlockedDecrement(&This->ref);
162 TRACE ("(%p)->(count=%lu)\n", This, refCount + 1);
164 if (!refCount) {
165 TRACE ("-- destroying IShellFolder(%p)\n", This);
166 SHFree (This->pidlRoot);
167 free (This);
169 return refCount;
172 /**************************************************************************
173 * ISF_NetworkPlaces_fnParseDisplayName
175 static HRESULT WINAPI ISF_NetworkPlaces_fnParseDisplayName (IShellFolder2 * iface,
176 HWND hwndOwner, LPBC pbcReserved, LPOLESTR lpszDisplayName,
177 DWORD * pchEaten, LPITEMIDLIST * ppidl, DWORD * pdwAttributes)
179 IGenericSFImpl *This = impl_from_IShellFolder2(iface);
180 HRESULT hr = E_INVALIDARG;
181 LPCWSTR szNext = NULL;
182 WCHAR szElement[MAX_PATH];
183 LPITEMIDLIST pidlTemp = NULL;
185 TRACE ("(%p)->(HWND=%p,%p,%p=%s,%p,pidl=%p,%p)\n", This,
186 hwndOwner, pbcReserved, lpszDisplayName, debugstr_w (lpszDisplayName),
187 pchEaten, ppidl, pdwAttributes);
189 *ppidl = NULL;
191 szNext = GetNextElementW (lpszDisplayName, szElement, MAX_PATH);
192 if (!wcsicmp(szElement, L"EntireNetwork"))
194 pidlTemp = _ILCreateEntireNetwork();
195 if (pidlTemp)
196 hr = S_OK;
197 else
198 hr = E_OUTOFMEMORY;
200 else
201 FIXME("not implemented for %s\n", debugstr_w(lpszDisplayName));
203 if (SUCCEEDED(hr) && pidlTemp)
205 if (szNext && *szNext)
207 hr = SHELL32_ParseNextElement(iface, hwndOwner, pbcReserved,
208 &pidlTemp, (LPOLESTR) szNext, pchEaten, pdwAttributes);
210 else
212 if (pdwAttributes && *pdwAttributes)
213 hr = SHELL32_GetItemAttributes(&This->IShellFolder2_iface, pidlTemp, pdwAttributes);
217 if (SUCCEEDED(hr))
218 *ppidl = pidlTemp;
219 else
220 ILFree(pidlTemp);
222 TRACE ("(%p)->(-- ret=0x%08lx)\n", This, hr);
224 return hr;
227 /**************************************************************************
228 * ISF_NetworkPlaces_fnEnumObjects
230 static HRESULT WINAPI ISF_NetworkPlaces_fnEnumObjects (IShellFolder2 * iface,
231 HWND hwndOwner, DWORD dwFlags, LPENUMIDLIST * ppEnumIDList)
233 IGenericSFImpl *This = impl_from_IShellFolder2(iface);
234 IEnumIDListImpl *list;
236 TRACE ("(%p)->(HWND=%p flags=0x%08lx pplist=%p)\n", This,
237 hwndOwner, dwFlags, ppEnumIDList);
239 if (!(list = IEnumIDList_Constructor()))
240 return E_OUTOFMEMORY;
241 *ppEnumIDList = &list->IEnumIDList_iface;
243 TRACE ("-- (%p)->(new ID List: %p)\n", This, *ppEnumIDList);
245 return S_OK;
248 /**************************************************************************
249 * ISF_NetworkPlaces_fnBindToObject
251 static HRESULT WINAPI ISF_NetworkPlaces_fnBindToObject (IShellFolder2 * iface,
252 LPCITEMIDLIST pidl, LPBC pbcReserved, REFIID riid, LPVOID * ppvOut)
254 IGenericSFImpl *This = impl_from_IShellFolder2(iface);
256 TRACE ("(%p)->(pidl=%p,%p,%s,%p)\n", This,
257 pidl, pbcReserved, shdebugstr_guid (riid), ppvOut);
259 return SHELL32_BindToChild (This->pidlRoot, &CLSID_ShellFSFolder, NULL, pidl, riid, ppvOut);
262 /**************************************************************************
263 * ISF_NetworkPlaces_fnBindToStorage
265 static HRESULT WINAPI ISF_NetworkPlaces_fnBindToStorage (IShellFolder2 * iface,
266 LPCITEMIDLIST pidl, LPBC pbcReserved, REFIID riid, LPVOID * ppvOut)
268 IGenericSFImpl *This = impl_from_IShellFolder2(iface);
270 FIXME ("(%p)->(pidl=%p,%p,%s,%p) stub\n", This,
271 pidl, pbcReserved, shdebugstr_guid (riid), ppvOut);
273 *ppvOut = NULL;
274 return E_NOTIMPL;
277 /**************************************************************************
278 * ISF_NetworkPlaces_fnCompareIDs
281 static HRESULT WINAPI ISF_NetworkPlaces_fnCompareIDs (IShellFolder2 * iface,
282 LPARAM lParam, LPCITEMIDLIST pidl1, LPCITEMIDLIST pidl2)
284 IGenericSFImpl *This = impl_from_IShellFolder2(iface);
285 int nReturn;
287 TRACE ("(%p)->(0x%08Ix,pidl1=%p,pidl2=%p)\n", This, lParam, pidl1, pidl2);
288 nReturn = SHELL32_CompareIDs(&This->IShellFolder2_iface, lParam, pidl1, pidl2);
289 TRACE ("-- %i\n", nReturn);
290 return nReturn;
293 /**************************************************************************
294 * ISF_NetworkPlaces_fnCreateViewObject
296 static HRESULT WINAPI ISF_NetworkPlaces_fnCreateViewObject (IShellFolder2 * iface,
297 HWND hwndOwner, REFIID riid, LPVOID * ppvOut)
299 IGenericSFImpl *This = impl_from_IShellFolder2(iface);
300 LPSHELLVIEW pShellView;
301 HRESULT hr = E_INVALIDARG;
303 TRACE ("(%p)->(hwnd=%p,%s,%p)\n", This,
304 hwndOwner, shdebugstr_guid (riid), ppvOut);
306 if (!ppvOut)
307 return hr;
309 *ppvOut = NULL;
311 if (IsEqualIID (riid, &IID_IDropTarget))
313 WARN ("IDropTarget not implemented\n");
314 hr = E_NOTIMPL;
316 else if (IsEqualIID (riid, &IID_IShellView))
318 pShellView = IShellView_Constructor ((IShellFolder *) iface);
319 if (pShellView)
321 hr = IShellView_QueryInterface (pShellView, riid, ppvOut);
322 IShellView_Release (pShellView);
325 else
327 FIXME ("invalid/unsupported interface %s\n", shdebugstr_guid (riid));
328 hr = E_NOINTERFACE;
330 TRACE ("-- (%p)->(interface=%p)\n", This, ppvOut);
331 return hr;
334 /**************************************************************************
335 * ISF_NetworkPlaces_fnGetAttributesOf
337 static HRESULT WINAPI ISF_NetworkPlaces_fnGetAttributesOf (IShellFolder2 * iface,
338 UINT cidl, LPCITEMIDLIST * apidl, DWORD * rgfInOut)
340 IGenericSFImpl *This = impl_from_IShellFolder2(iface);
341 HRESULT hr = S_OK;
343 TRACE ("(%p)->(cidl=%d apidl=%p mask=%p (0x%08lx))\n", This,
344 cidl, apidl, rgfInOut, rgfInOut ? *rgfInOut : 0);
346 if (!rgfInOut)
347 return E_INVALIDARG;
348 if (cidl && !apidl)
349 return E_INVALIDARG;
351 if (*rgfInOut == 0)
352 *rgfInOut = ~0;
354 if (cidl == 0)
356 IShellFolder2 *parent = NULL;
357 LPCITEMIDLIST rpidl = NULL;
359 hr = SHBindToParent(This->pidlRoot, &IID_IShellFolder2, (void **)&parent, &rpidl);
360 if(SUCCEEDED(hr))
362 SHELL32_GetItemAttributes(parent, rpidl, rgfInOut);
363 IShellFolder2_Release(parent);
366 else
368 while (cidl > 0 && *apidl)
370 pdump (*apidl);
371 SHELL32_GetItemAttributes(&This->IShellFolder2_iface, *apidl, rgfInOut);
372 apidl++;
373 cidl--;
377 /* make sure SFGAO_VALIDATE is cleared, some apps depend on that */
378 *rgfInOut &= ~SFGAO_VALIDATE;
380 TRACE ("-- result=0x%08lx\n", *rgfInOut);
381 return hr;
384 /**************************************************************************
385 * ISF_NetworkPlaces_fnGetUIObjectOf
387 * PARAMETERS
388 * hwndOwner [in] Parent window for any output
389 * cidl [in] array size
390 * apidl [in] simple pidl array
391 * riid [in] Requested Interface
392 * prgfInOut [ ] reserved
393 * ppvObject [out] Resulting Interface
396 static HRESULT WINAPI ISF_NetworkPlaces_fnGetUIObjectOf (IShellFolder2 * iface,
397 HWND hwndOwner, UINT cidl, LPCITEMIDLIST * apidl, REFIID riid,
398 UINT * prgfInOut, LPVOID * ppvOut)
400 IGenericSFImpl *This = impl_from_IShellFolder2(iface);
402 LPITEMIDLIST pidl;
403 IUnknown *pObj = NULL;
404 HRESULT hr = E_INVALIDARG;
406 TRACE ("(%p)->(%p,%u,apidl=%p,%s,%p,%p)\n", This,
407 hwndOwner, cidl, apidl, shdebugstr_guid (riid), prgfInOut, ppvOut);
409 if (!ppvOut)
410 return hr;
412 *ppvOut = NULL;
414 if (IsEqualIID (riid, &IID_IContextMenu) && (cidl >= 1))
416 return ItemMenu_Constructor((IShellFolder*)iface, This->pidlRoot, apidl, cidl, riid, ppvOut);
418 else if (IsEqualIID (riid, &IID_IDataObject) && (cidl >= 1))
420 pObj = (LPUNKNOWN) IDataObject_Constructor (hwndOwner, This->pidlRoot, apidl, cidl);
421 hr = S_OK;
423 else if (IsEqualIID (riid, &IID_IExtractIconA) && (cidl == 1))
425 pidl = ILCombine (This->pidlRoot, apidl[0]);
426 pObj = (LPUNKNOWN) IExtractIconA_Constructor (pidl);
427 ILFree(pidl);
428 hr = S_OK;
430 else if (IsEqualIID (riid, &IID_IExtractIconW) && (cidl == 1))
432 pidl = ILCombine (This->pidlRoot, apidl[0]);
433 pObj = (LPUNKNOWN) IExtractIconW_Constructor (pidl);
434 ILFree(pidl);
435 hr = S_OK;
437 else if (IsEqualIID (riid, &IID_IDropTarget) && (cidl >= 1))
439 hr = IShellFolder2_QueryInterface (iface, &IID_IDropTarget, (LPVOID *) & pObj);
441 else
442 hr = E_NOINTERFACE;
444 if (SUCCEEDED(hr) && !pObj)
445 hr = E_OUTOFMEMORY;
447 *ppvOut = pObj;
448 TRACE ("(%p)->hr=0x%08lx\n", This, hr);
449 return hr;
452 /**************************************************************************
453 * ISF_NetworkPlaces_fnGetDisplayNameOf
456 static HRESULT WINAPI ISF_NetworkPlaces_fnGetDisplayNameOf (IShellFolder2 * iface,
457 LPCITEMIDLIST pidl, DWORD dwFlags, LPSTRRET strRet)
459 IGenericSFImpl *This = impl_from_IShellFolder2(iface);
461 FIXME ("(%p)->(pidl=%p,0x%08lx,%p)\n", This, pidl, dwFlags, strRet);
462 pdump (pidl);
464 if (!strRet)
465 return E_INVALIDARG;
467 return E_NOTIMPL;
470 /**************************************************************************
471 * ISF_NetworkPlaces_fnSetNameOf
472 * Changes the name of a file object or subfolder, possibly changing its item
473 * identifier in the process.
475 * PARAMETERS
476 * hwndOwner [in] Owner window for output
477 * pidl [in] simple pidl of item to change
478 * lpszName [in] the items new display name
479 * dwFlags [in] SHGNO formatting flags
480 * ppidlOut [out] simple pidl returned
482 static HRESULT WINAPI ISF_NetworkPlaces_fnSetNameOf (IShellFolder2 * iface,
483 HWND hwndOwner, LPCITEMIDLIST pidl, /*simple pidl */
484 LPCOLESTR lpName, DWORD dwFlags, LPITEMIDLIST * pPidlOut)
486 IGenericSFImpl *This = impl_from_IShellFolder2(iface);
488 FIXME ("(%p)->(%p,pidl=%p,%s,%lu,%p)\n", This,
489 hwndOwner, pidl, debugstr_w (lpName), dwFlags, pPidlOut);
490 return E_FAIL;
493 static HRESULT WINAPI ISF_NetworkPlaces_fnGetDefaultSearchGUID(IShellFolder2 *iface, GUID *guid)
495 IGenericSFImpl *This = impl_from_IShellFolder2(iface);
496 TRACE("(%p)->(%p)\n", This, guid);
497 return E_NOTIMPL;
500 static HRESULT WINAPI ISF_NetworkPlaces_fnEnumSearches (IShellFolder2 * iface,
501 IEnumExtraSearch ** ppenum)
503 IGenericSFImpl *This = impl_from_IShellFolder2(iface);
505 FIXME ("(%p)\n", This);
506 return E_NOTIMPL;
509 static HRESULT WINAPI ISF_NetworkPlaces_fnGetDefaultColumn(IShellFolder2 *iface, DWORD reserved,
510 ULONG *sort, ULONG *display)
512 IGenericSFImpl *This = impl_from_IShellFolder2(iface);
514 TRACE("(%p)->(%#lx, %p, %p)\n", This, reserved, sort, display);
516 return E_NOTIMPL;
519 static HRESULT WINAPI ISF_NetworkPlaces_fnGetDefaultColumnState (
520 IShellFolder2 * iface, UINT iColumn, DWORD * pcsFlags)
522 IGenericSFImpl *This = impl_from_IShellFolder2(iface);
524 TRACE ("(%p)->(%d %p)\n", This, iColumn, pcsFlags);
526 if (!pcsFlags || iColumn >= ARRAY_SIZE(networkplaces_header))
527 return E_INVALIDARG;
529 *pcsFlags = networkplaces_header[iColumn].pcsFlags;
531 return S_OK;
534 static HRESULT WINAPI ISF_NetworkPlaces_fnGetDetailsEx (IShellFolder2 * iface,
535 LPCITEMIDLIST pidl, const SHCOLUMNID * pscid, VARIANT * pv)
537 IGenericSFImpl *This = impl_from_IShellFolder2(iface);
539 FIXME ("(%p)\n", This);
540 return E_NOTIMPL;
543 static HRESULT WINAPI ISF_NetworkPlaces_fnGetDetailsOf (IShellFolder2 * iface,
544 LPCITEMIDLIST pidl, UINT iColumn, SHELLDETAILS * psd)
546 IGenericSFImpl *This = impl_from_IShellFolder2(iface);
548 FIXME ("(%p)->(%p %i %p)\n", This, pidl, iColumn, psd);
550 return E_NOTIMPL;
553 static HRESULT WINAPI ISF_NetworkPlaces_fnMapColumnToSCID (IShellFolder2 *iface, UINT column, SHCOLUMNID *scid)
555 IGenericSFImpl *This = impl_from_IShellFolder2(iface);
557 TRACE("(%p)->(%u %p)\n", This, column, scid);
559 if (column >= ARRAY_SIZE(networkplaces_header))
560 return E_INVALIDARG;
562 return shellfolder_map_column_to_scid(networkplaces_header, column, scid);
565 static const IShellFolder2Vtbl vt_ShellFolder2 = {
566 ISF_NetworkPlaces_fnQueryInterface,
567 ISF_NetworkPlaces_fnAddRef,
568 ISF_NetworkPlaces_fnRelease,
569 ISF_NetworkPlaces_fnParseDisplayName,
570 ISF_NetworkPlaces_fnEnumObjects,
571 ISF_NetworkPlaces_fnBindToObject,
572 ISF_NetworkPlaces_fnBindToStorage,
573 ISF_NetworkPlaces_fnCompareIDs,
574 ISF_NetworkPlaces_fnCreateViewObject,
575 ISF_NetworkPlaces_fnGetAttributesOf,
576 ISF_NetworkPlaces_fnGetUIObjectOf,
577 ISF_NetworkPlaces_fnGetDisplayNameOf,
578 ISF_NetworkPlaces_fnSetNameOf,
579 /* ShellFolder2 */
580 ISF_NetworkPlaces_fnGetDefaultSearchGUID,
581 ISF_NetworkPlaces_fnEnumSearches,
582 ISF_NetworkPlaces_fnGetDefaultColumn,
583 ISF_NetworkPlaces_fnGetDefaultColumnState,
584 ISF_NetworkPlaces_fnGetDetailsEx,
585 ISF_NetworkPlaces_fnGetDetailsOf,
586 ISF_NetworkPlaces_fnMapColumnToSCID
589 /************************************************************************
590 * INPFldr_PersistFolder2_QueryInterface
592 static HRESULT WINAPI INPFldr_PersistFolder2_QueryInterface (IPersistFolder2 * iface,
593 REFIID iid, LPVOID * ppvObj)
595 IGenericSFImpl *This = impl_from_IPersistFolder2(iface);
597 TRACE ("(%p)\n", This);
599 return IShellFolder2_QueryInterface (&This->IShellFolder2_iface, iid, ppvObj);
602 /************************************************************************
603 * INPFldr_PersistFolder2_AddRef
605 static ULONG WINAPI INPFldr_PersistFolder2_AddRef (IPersistFolder2 * iface)
607 IGenericSFImpl *This = impl_from_IPersistFolder2(iface);
609 TRACE ("(%p)->(count=%lu)\n", This, This->ref);
611 return IShellFolder2_AddRef (&This->IShellFolder2_iface);
614 /************************************************************************
615 * ISFPersistFolder_Release
617 static ULONG WINAPI INPFldr_PersistFolder2_Release (IPersistFolder2 * iface)
619 IGenericSFImpl *This = impl_from_IPersistFolder2(iface);
621 TRACE ("(%p)->(count=%lu)\n", This, This->ref);
623 return IShellFolder2_Release (&This->IShellFolder2_iface);
626 /************************************************************************
627 * INPFldr_PersistFolder2_GetClassID
629 static HRESULT WINAPI INPFldr_PersistFolder2_GetClassID (
630 IPersistFolder2 * iface, CLSID * lpClassId)
632 IGenericSFImpl *This = impl_from_IPersistFolder2(iface);
634 TRACE ("(%p)\n", This);
636 if (!lpClassId)
637 return E_POINTER;
639 *lpClassId = CLSID_NetworkPlaces;
641 return S_OK;
644 /************************************************************************
645 * INPFldr_PersistFolder2_Initialize
647 * NOTES: it makes no sense to change the pidl
649 static HRESULT WINAPI INPFldr_PersistFolder2_Initialize (
650 IPersistFolder2 * iface, LPCITEMIDLIST pidl)
652 IGenericSFImpl *This = impl_from_IPersistFolder2(iface);
654 TRACE ("(%p)->(%p)\n", This, pidl);
656 return E_NOTIMPL;
659 /**************************************************************************
660 * IPersistFolder2_fnGetCurFolder
662 static HRESULT WINAPI INPFldr_PersistFolder2_GetCurFolder (
663 IPersistFolder2 * iface, LPITEMIDLIST * pidl)
665 IGenericSFImpl *This = impl_from_IPersistFolder2(iface);
667 TRACE ("(%p)->(%p)\n", This, pidl);
669 if (!pidl)
670 return E_POINTER;
672 *pidl = ILClone (This->pidlRoot);
674 return S_OK;
677 static const IPersistFolder2Vtbl vt_NP_PersistFolder2 =
679 INPFldr_PersistFolder2_QueryInterface,
680 INPFldr_PersistFolder2_AddRef,
681 INPFldr_PersistFolder2_Release,
682 INPFldr_PersistFolder2_GetClassID,
683 INPFldr_PersistFolder2_Initialize,
684 INPFldr_PersistFolder2_GetCurFolder