2 * Virtual MyDocuments Folder
4 * Copyright 2007 Johannes Anderwald
5 * Copyright 2009 Andrew Hill
7 * This library is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Lesser General Public
9 * License as published by the Free Software Foundation; either
10 * version 2.1 of the License, or (at your option) any later version.
12 * This library is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 * Lesser General Public License for more details.
17 * You should have received a copy of the GNU Lesser General Public
18 * License along with this library; if not, write to the Free Software
19 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
22 #ifndef _SHFLDR_MYDOCUMENTS_H_
23 #define _SHFLDR_MYDOCUMENTS_H_
26 public CComCoClass
<CMyDocsFolder
, &CLSID_MyDocuments
>,
27 public CComObjectRootEx
<CComMultiThreadModelNoCS
>,
29 public IPersistFolder2
32 /* both paths are parsible from the MyDocuments */
33 LPWSTR sPathTarget
; /* complete path to target used for enumeration and ChangeNotify */
34 LPITEMIDLIST pidlRoot
; /* absolute pidl */
38 HRESULT WINAPI
FinalConstruct();
41 virtual HRESULT WINAPI
ParseDisplayName (HWND hwndOwner
, LPBC pbc
, LPOLESTR lpszDisplayName
, DWORD
*pchEaten
, LPITEMIDLIST
*ppidl
, DWORD
*pdwAttributes
);
42 virtual HRESULT WINAPI
EnumObjects(HWND hwndOwner
, DWORD dwFlags
, LPENUMIDLIST
*ppEnumIDList
);
43 virtual HRESULT WINAPI
BindToObject(LPCITEMIDLIST pidl
, LPBC pbcReserved
, REFIID riid
, LPVOID
*ppvOut
);
44 virtual HRESULT WINAPI
BindToStorage(LPCITEMIDLIST pidl
, LPBC pbcReserved
, REFIID riid
, LPVOID
*ppvOut
);
45 virtual HRESULT WINAPI
CompareIDs(LPARAM lParam
, LPCITEMIDLIST pidl1
, LPCITEMIDLIST pidl2
);
46 virtual HRESULT WINAPI
CreateViewObject(HWND hwndOwner
, REFIID riid
, LPVOID
*ppvOut
);
47 virtual HRESULT WINAPI
GetAttributesOf (UINT cidl
, LPCITEMIDLIST
*apidl
, DWORD
*rgfInOut
);
48 virtual HRESULT WINAPI
GetUIObjectOf(HWND hwndOwner
, UINT cidl
, LPCITEMIDLIST
*apidl
, REFIID riid
, UINT
* prgfInOut
, LPVOID
* ppvOut
);
49 virtual HRESULT WINAPI
GetDisplayNameOf(LPCITEMIDLIST pidl
, DWORD dwFlags
, LPSTRRET strRet
);
50 virtual HRESULT WINAPI
SetNameOf(HWND hwndOwner
, LPCITEMIDLIST pidl
, LPCOLESTR lpName
, DWORD dwFlags
, LPITEMIDLIST
*pPidlOut
);
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(LPCITEMIDLIST pidl
, const SHCOLUMNID
*pscid
, VARIANT
*pv
);
58 virtual HRESULT WINAPI
GetDetailsOf(LPCITEMIDLIST pidl
, UINT iColumn
, SHELLDETAILS
*psd
);
59 virtual HRESULT WINAPI
MapColumnToSCID(UINT column
, SHCOLUMNID
*pscid
);
62 virtual HRESULT WINAPI
GetClassID(CLSID
*lpClassId
);
65 virtual HRESULT WINAPI
Initialize(LPCITEMIDLIST pidl
);
68 virtual HRESULT WINAPI
GetCurFolder(LPITEMIDLIST
* pidl
);
70 DECLARE_REGISTRY_RESOURCEID(IDR_MYDOCUMENTS
)
71 DECLARE_NOT_AGGREGATABLE(CMyDocsFolder
)
73 DECLARE_PROTECT_FINAL_CONSTRUCT()
75 BEGIN_COM_MAP(CMyDocsFolder
)
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
)
80 COM_INTERFACE_ENTRY_IID(IID_IPersist
, IPersist
)
84 #endif // _SHFLDR_MYDOCUMENTS_H_