ReactOS  0.4.15-dev-3331-g8ebe441
CNetFolder.h
Go to the documentation of this file.
1 /*
2  * Network Places (Neighbourhood) folder
3  *
4  * Copyright 1997 Marcus Meissner
5  * Copyright 1998, 1999, 2002 Juergen Schmied
6  * Copyright 2003 Mike McCormack for Codeweavers
7  * Copyright 2009 Andrew Hill
8  *
9  * This library is free software; you can redistribute it and/or
10  * modify it under the terms of the GNU Lesser General Public
11  * License as published by the Free Software Foundation; either
12  * version 2.1 of the License, or (at your option) any later version.
13  *
14  * This library is distributed in the hope that it will be useful,
15  * but WITHOUT ANY WARRANTY; without even the implied warranty of
16  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17  * Lesser General Public License for more details.
18  *
19  * You should have received a copy of the GNU Lesser General Public
20  * License along with this library; if not, write to the Free Software
21  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
22  */
23 
24 #ifndef _SHFLDR_NETPLACES_H_
25 #define _SHFLDR_NETPLACES_H_
26 
27 class CNetFolder :
28  public CComCoClass<CNetFolder, &CLSID_NetworkPlaces>,
29  public CComObjectRootEx<CComMultiThreadModelNoCS>,
30  public IShellFolder2,
31  public IPersistFolder2
32 {
33  private:
34  /* both paths are parsible from the desktop */
35  LPITEMIDLIST pidlRoot; /* absolute pidl */
36  public:
37  CNetFolder();
38  ~CNetFolder();
39 
40  // IShellFolder
41  virtual HRESULT WINAPI ParseDisplayName(HWND hwndOwner, LPBC pbc, LPOLESTR lpszDisplayName, DWORD *pchEaten, PIDLIST_RELATIVE *ppidl, DWORD *pdwAttributes);
42  virtual HRESULT WINAPI EnumObjects(HWND hwndOwner, DWORD dwFlags, LPENUMIDLIST *ppEnumIDList);
43  virtual HRESULT WINAPI BindToObject(PCUIDLIST_RELATIVE pidl, LPBC pbcReserved, REFIID riid, LPVOID *ppvOut);
44  virtual HRESULT WINAPI BindToStorage(PCUIDLIST_RELATIVE pidl, LPBC pbcReserved, REFIID riid, LPVOID *ppvOut);
46  virtual HRESULT WINAPI CreateViewObject(HWND hwndOwner, REFIID riid, LPVOID *ppvOut);
47  virtual HRESULT WINAPI GetAttributesOf(UINT cidl, PCUITEMID_CHILD_ARRAY apidl, DWORD *rgfInOut);
48  virtual HRESULT WINAPI GetUIObjectOf(HWND hwndOwner, UINT cidl, PCUITEMID_CHILD_ARRAY apidl, REFIID riid, UINT * prgfInOut, LPVOID * ppvOut);
50  virtual HRESULT WINAPI SetNameOf(HWND hwndOwner, PCUITEMID_CHILD pidl, LPCOLESTR lpName, DWORD dwFlags, PITEMID_CHILD *pPidlOut);
51 
52  /* ShellFolder2 */
53  virtual HRESULT WINAPI GetDefaultSearchGUID(GUID *pguid);
54  virtual HRESULT WINAPI EnumSearches(IEnumExtraSearch **ppenum);
55  virtual HRESULT WINAPI GetDefaultColumn(DWORD dwRes, ULONG *pSort, ULONG *pDisplay);
56  virtual HRESULT WINAPI GetDefaultColumnState(UINT iColumn, DWORD *pcsFlags);
57  virtual HRESULT WINAPI GetDetailsEx(PCUITEMID_CHILD pidl, const SHCOLUMNID *pscid, VARIANT *pv);
58  virtual HRESULT WINAPI GetDetailsOf(PCUITEMID_CHILD pidl, UINT iColumn, SHELLDETAILS *psd);
60 
61  // IPersist
62  virtual HRESULT WINAPI GetClassID(CLSID *lpClassId);
63 
64  // IPersistFolder
66 
67  // IPersistFolder2
69 
72 
74 
76  COM_INTERFACE_ENTRY_IID(IID_IShellFolder2, IShellFolder2)
77  COM_INTERFACE_ENTRY_IID(IID_IShellFolder, IShellFolder)
78  COM_INTERFACE_ENTRY_IID(IID_IPersistFolder, IPersistFolder)
79  COM_INTERFACE_ENTRY_IID(IID_IPersistFolder2, IPersistFolder2)
81  END_COM_MAP()
82 };
83 
84 #endif /* _SHFLDR_NETPLACES_H_ */
#define REFIID
Definition: guiddef.h:118
virtual HRESULT WINAPI BindToObject(PCUIDLIST_RELATIVE pidl, LPBC pbcReserved, REFIID riid, LPVOID *ppvOut)
Definition: CNetFolder.cpp:283
virtual HRESULT WINAPI MapColumnToSCID(UINT column, SHCOLUMNID *pscid)
Definition: CNetFolder.cpp:547
virtual HRESULT WINAPI EnumSearches(IEnumExtraSearch **ppenum)
Definition: CNetFolder.cpp:495
virtual HRESULT WINAPI Initialize(PCIDLIST_ABSOLUTE pidl)
Definition: CNetFolder.cpp:574
interface IBindCtx * LPBC
Definition: objfwd.h:18
virtual HRESULT WINAPI GetDetailsOf(PCUITEMID_CHILD pidl, UINT iColumn, SHELLDETAILS *psd)
Definition: CNetFolder.cpp:529
virtual HRESULT WINAPI SetNameOf(HWND hwndOwner, PCUITEMID_CHILD pidl, LPCOLESTR lpName, DWORD dwFlags, PITEMID_CHILD *pPidlOut)
Definition: CNetFolder.cpp:481
REFIID riid
Definition: precomp.h:44
const GUID IID_IPersist
Definition: proxy.cpp:14
_In_ LPCSTR lpName
Definition: winbase.h:2768
const ITEMID_CHILD UNALIGNED * PCUITEMID_CHILD
Definition: shtypes.idl:70
#define DECLARE_NOT_AGGREGATABLE(x)
Definition: atlcom.h:612
virtual HRESULT WINAPI BindToStorage(PCUIDLIST_RELATIVE pidl, LPBC pbcReserved, REFIID riid, LPVOID *ppvOut)
Definition: CNetFolder.cpp:301
static LPOLESTR
Definition: stg_prop.c:27
virtual HRESULT WINAPI GetClassID(CLSID *lpClassId)
Definition: CNetFolder.cpp:557
virtual HRESULT WINAPI ParseDisplayName(HWND hwndOwner, LPBC pbc, LPOLESTR lpszDisplayName, DWORD *pchEaten, PIDLIST_RELATIVE *ppidl, DWORD *pdwAttributes)
Definition: CNetFolder.cpp:233
const PCUITEMID_CHILD * PCUITEMID_CHILD_ARRAY
Definition: shtypes.idl:71
virtual HRESULT WINAPI EnumObjects(HWND hwndOwner, DWORD dwFlags, LPENUMIDLIST *ppEnumIDList)
Definition: CNetFolder.cpp:275
virtual HRESULT WINAPI GetDisplayNameOf(PCUITEMID_CHILD pidl, DWORD dwFlags, LPSTRRET strRet)
Definition: CNetFolder.cpp:458
virtual HRESULT WINAPI GetDefaultColumnState(UINT iColumn, DWORD *pcsFlags)
Definition: CNetFolder.cpp:513
LONG_PTR LPARAM
Definition: windef.h:208
virtual HRESULT WINAPI GetCurFolder(PIDLIST_ABSOLUTE *pidl)
Definition: CNetFolder.cpp:586
virtual HRESULT WINAPI GetDetailsEx(PCUITEMID_CHILD pidl, const SHCOLUMNID *pscid, VARIANT *pv)
Definition: CNetFolder.cpp:523
#define BEGIN_COM_MAP(x)
Definition: atlcom.h:542
LONG HRESULT
Definition: typedefs.h:79
#define WINAPI
Definition: msvc.h:6
#define IDR_NETWORKPLACES
Definition: shresdef.h:857
unsigned long DWORD
Definition: ntddk_ex.h:95
virtual HRESULT WINAPI GetUIObjectOf(HWND hwndOwner, UINT cidl, PCUITEMID_CHILD_ARRAY apidl, REFIID riid, UINT *prgfInOut, LPVOID *ppvOut)
Definition: CNetFolder.cpp:404
virtual HRESULT WINAPI GetAttributesOf(UINT cidl, PCUITEMID_CHILD_ARRAY apidl, DWORD *rgfInOut)
Definition: CNetFolder.cpp:357
_In_ PCCERT_CONTEXT _In_ DWORD dwFlags
Definition: wincrypt.h:1175
#define DECLARE_REGISTRY_RESOURCEID(x)
Definition: atlcom.h:606
virtual HRESULT WINAPI GetDefaultColumn(DWORD dwRes, ULONG *pSort, ULONG *pDisplay)
Definition: CNetFolder.cpp:501
virtual HRESULT WINAPI CreateViewObject(HWND hwndOwner, REFIID riid, LPVOID *ppvOut)
Definition: CNetFolder.cpp:322
LPITEMIDLIST pidlRoot
Definition: CNetFolder.h:35
virtual HRESULT WINAPI CompareIDs(LPARAM lParam, PCUIDLIST_RELATIVE pidl1, PCUIDLIST_RELATIVE pidl2)
Definition: CNetFolder.cpp:314
#define COM_INTERFACE_ENTRY_IID(iid, x)
Definition: atlcom.h:562
unsigned int UINT
Definition: ndis.h:50
#define DECLARE_PROTECT_FINAL_CONSTRUCT()
Definition: atlcom.h:640
const ITEMIDLIST_RELATIVE UNALIGNED * PCUIDLIST_RELATIVE
Definition: shtypes.idl:57
unsigned int ULONG
Definition: retypes.h:1
#define END_COM_MAP()
Definition: atlcom.h:553
virtual HRESULT WINAPI GetDefaultSearchGUID(GUID *pguid)
Definition: CNetFolder.cpp:489
ITEMIDLIST UNALIGNED * LPITEMIDLIST
Definition: shtypes.idl:41
LPARAM lParam
Definition: combotst.c:139