2 * Virtual Printers Folder
4 * Copyright 1997 Marcus Meissner
5 * Copyright 1998, 1999, 2002 Juergen Schmied
6 * Copyright 2005 Huw Davies
7 * Copyright 2009 Andrew Hill
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.
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.
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 Street, Fifth Floor, Boston, MA 02110-1301 USA
24 #ifndef _SHFLDR_PRINTERS_H_
25 #define _SHFLDR_PRINTERS_H_
27 class CPrinterFolder
:
28 public CComCoClass
<CPrinterFolder
, &CLSID_Printers
>,
29 public CComObjectRootEx
<CComMultiThreadModelNoCS
>,
31 public IPersistFolder2
36 LPITEMIDLIST pidlRoot
; /* absolute pidl */
38 int dwAttributes
; /* attributes returned by GetAttributesOf FIXME: use it */
42 HRESULT WINAPI
FinalConstruct();
45 virtual HRESULT WINAPI
ParseDisplayName(HWND hwndOwner
, LPBC pbc
, LPOLESTR lpszDisplayName
, DWORD
*pchEaten
, PIDLIST_RELATIVE
*ppidl
, DWORD
*pdwAttributes
);
46 virtual HRESULT WINAPI
EnumObjects(HWND hwndOwner
, DWORD dwFlags
, LPENUMIDLIST
*ppEnumIDList
);
47 virtual HRESULT WINAPI
BindToObject(PCUIDLIST_RELATIVE pidl
, LPBC pbcReserved
, REFIID riid
, LPVOID
*ppvOut
);
48 virtual HRESULT WINAPI
BindToStorage(PCUIDLIST_RELATIVE pidl
, LPBC pbcReserved
, REFIID riid
, LPVOID
*ppvOut
);
49 virtual HRESULT WINAPI
CompareIDs(LPARAM lParam
, PCUIDLIST_RELATIVE pidl1
, PCUIDLIST_RELATIVE pidl2
);
50 virtual HRESULT WINAPI
CreateViewObject(HWND hwndOwner
, REFIID riid
, LPVOID
*ppvOut
);
51 virtual HRESULT WINAPI
GetAttributesOf(UINT cidl
, PCUITEMID_CHILD_ARRAY apidl
, DWORD
*rgfInOut
);
52 virtual HRESULT WINAPI
GetUIObjectOf(HWND hwndOwner
, UINT cidl
, PCUITEMID_CHILD_ARRAY apidl
, REFIID riid
, UINT
* prgfInOut
, LPVOID
* ppvOut
);
53 virtual HRESULT WINAPI
GetDisplayNameOf(PCUITEMID_CHILD pidl
, DWORD dwFlags
, LPSTRRET strRet
);
54 virtual HRESULT WINAPI
SetNameOf(HWND hwndOwner
, PCUITEMID_CHILD pidl
, LPCOLESTR lpName
, DWORD dwFlags
, PITEMID_CHILD
*pPidlOut
);
57 virtual HRESULT WINAPI
GetDefaultSearchGUID(GUID
*pguid
);
58 virtual HRESULT WINAPI
EnumSearches(IEnumExtraSearch
**ppenum
);
59 virtual HRESULT WINAPI
GetDefaultColumn(DWORD dwRes
, ULONG
*pSort
, ULONG
*pDisplay
);
60 virtual HRESULT WINAPI
GetDefaultColumnState(UINT iColumn
, DWORD
*pcsFlags
);
61 virtual HRESULT WINAPI
GetDetailsEx(PCUITEMID_CHILD pidl
, const SHCOLUMNID
*pscid
, VARIANT
*pv
);
62 virtual HRESULT WINAPI
GetDetailsOf(PCUITEMID_CHILD pidl
, UINT iColumn
, SHELLDETAILS
*psd
);
63 virtual HRESULT WINAPI
MapColumnToSCID(UINT column
, SHCOLUMNID
*pscid
);
66 virtual HRESULT WINAPI
GetClassID(CLSID
*lpClassId
);
69 virtual HRESULT WINAPI
Initialize(LPCITEMIDLIST pidl
);
72 virtual HRESULT WINAPI
GetCurFolder(LPITEMIDLIST
* pidl
);
74 DECLARE_REGISTRY_RESOURCEID(IDR_PRINTERS
)
75 DECLARE_NOT_AGGREGATABLE(CPrinterFolder
)
77 DECLARE_PROTECT_FINAL_CONSTRUCT()
79 BEGIN_COM_MAP(CPrinterFolder
)
80 COM_INTERFACE_ENTRY_IID(IID_IShellFolder2
, IShellFolder2
)
81 COM_INTERFACE_ENTRY_IID(IID_IShellFolder
, IShellFolder
)
82 COM_INTERFACE_ENTRY_IID(IID_IPersistFolder
, IPersistFolder
)
83 COM_INTERFACE_ENTRY_IID(IID_IPersistFolder2
, IPersistFolder2
)
84 COM_INTERFACE_ENTRY_IID(IID_IPersist
, IPersist
)
88 #endif /* _SHFLDR_PRINTERS_H_ */