ReactOS 0.4.15-dev-8390-g075894b
CFindFolder.h
Go to the documentation of this file.
1/*
2 * PROJECT: ReactOS Search Shell Extension
3 * LICENSE: GPL-2.0-or-later (https://spdx.org/licenses/GPL-2.0-or-later)
4 * PURPOSE: Search results folder
5 * COPYRIGHT: Copyright 2019 Brock Mammen
6 */
7
8#pragma once
9
10#include "shellfind.h"
11
13 public CWindowImpl<CFindFolder>,
14 public CComCoClass<CFindFolder, &CLSID_FindFolder>,
15 public CComObjectRootEx<CComMultiThreadModelNoCS>,
16 public IShellFolder2,
17 public IPersistFolder2,
18 public IShellFolderViewCB,
19 public IConnectionPointContainerImpl<CFindFolder>,
20 public IConnectionPointImpl<CFindFolder, &DIID_DSearchCommandEvents>
21{
22 // *** IShellFolder2 methods ***
24
26
27 STDMETHODIMP GetDefaultColumn(DWORD dwRes, ULONG *pSort, ULONG *pDisplay);
28
29 STDMETHODIMP GetDefaultColumnState(UINT iColumn, DWORD *pcsFlags);
30
32
34
36
37
38 // *** IShellFolder methods ***
39 STDMETHODIMP ParseDisplayName(HWND hwndOwner, LPBC pbc, LPOLESTR lpszDisplayName, ULONG *pchEaten,
40 PIDLIST_RELATIVE *ppidl, ULONG *pdwAttributes);
41
42 STDMETHODIMP EnumObjects(HWND hwndOwner, DWORD dwFlags, LPENUMIDLIST *ppEnumIDList);
43
45
47
49
51
53
54 STDMETHODIMP GetUIObjectOf(HWND hwndOwner, UINT cidl, PCUITEMID_CHILD_ARRAY apidl, REFIID riid, UINT *prgfInOut,
55 LPVOID *ppvOut);
56
57
59 STDMETHODIMP SetNameOf(HWND hwndOwner, PCUITEMID_CHILD pidl, LPCOLESTR lpName, DWORD dwFlags,
60 PITEMID_CHILD *pPidlOut);
61
64
65private:
71
73 static DWORD WINAPI SearchThreadProc(LPVOID lpParameter);
74
77
78
79 // *** IPersistFolder methods ***
81
82
83 // *** IPersist methods ***
84 STDMETHODIMP GetClassID(CLSID *pClassId);
85
86 // *** Message handlers ***
88
90
92
94
95public:
97
99
101
103
105 CONNECTION_POINT_ENTRY(DIID_DSearchCommandEvents)
107
114
116 COM_INTERFACE_ENTRY_IID(IID_IShellFolder2, IShellFolder2)
117 COM_INTERFACE_ENTRY_IID(IID_IShellFolder, IShellFolder)
118 COM_INTERFACE_ENTRY_IID(IID_IShellFolderViewCB, IShellFolderViewCB)
119 COM_INTERFACE_ENTRY_IID(IID_IPersistFolder2, IPersistFolder2)
120 COM_INTERFACE_ENTRY_IID(IID_IPersistFolder, IPersistFolder)
124};
125
#define STDMETHODIMP
Definition: basetyps.h:43
STDMETHODIMP GetDisplayNameOf(PCUITEMID_CHILD pidl, DWORD dwFlags, LPSTRRET pName)
LRESULT StartSearch(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
HANDLE m_hStopEvent
Definition: CFindFolder.h:70
STDMETHODIMP GetClassID(CLSID *pClassId)
CComPtr< IShellFolder2 > m_pisfInner
Definition: CFindFolder.h:67
STDMETHODIMP GetDetailsEx(PCUITEMID_CHILD pidl, const SHCOLUMNID *pscid, VARIANT *pv)
STDMETHODIMP BindToObject(PCUIDLIST_RELATIVE pidl, LPBC pbcReserved, REFIID riid, LPVOID *ppvOut)
STDMETHODIMP SetNameOf(HWND hwndOwner, PCUITEMID_CHILD pidl, LPCOLESTR lpName, DWORD dwFlags, PITEMID_CHILD *pPidlOut)
STDMETHODIMP GetCurFolder(PIDLIST_ABSOLUTE *pidl)
static DWORD WINAPI SearchThreadProc(LPVOID lpParameter)
STDMETHODIMP CompareIDs(LPARAM lParam, PCUIDLIST_RELATIVE pidl1, PCUIDLIST_RELATIVE pidl2)
LRESULT AddResult(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
LRESULT UpdateStatus(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
STDMETHODIMP GetAttributesOf(UINT cidl, PCUITEMID_CHILD_ARRAY apidl, DWORD *rgfInOut)
STDMETHODIMP GetDefaultColumn(DWORD dwRes, ULONG *pSort, ULONG *pDisplay)
STDMETHODIMP MapColumnToSCID(UINT iColumn, SHCOLUMNID *pscid)
STDMETHODIMP EnumObjects(HWND hwndOwner, DWORD dwFlags, LPENUMIDLIST *ppEnumIDList)
CComPtr< IShellFolderView > m_shellFolderView
Definition: CFindFolder.h:68
STDMETHODIMP MessageSFVCB(UINT uMsg, WPARAM wParam, LPARAM lParam)
STDMETHODIMP EnumSearches(IEnumExtraSearch **ppenum)
LRESULT StopSearch(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
STDMETHODIMP GetDetailsOf(PCUITEMID_CHILD pidl, UINT iColumn, SHELLDETAILS *pDetails)
void NotifyConnections(DISPID id)
STDMETHODIMP BindToStorage(PCUIDLIST_RELATIVE pidl, LPBC pbcReserved, REFIID riid, LPVOID *ppvOut)
STDMETHODIMP GetDefaultSearchGUID(GUID *pguid)
LPITEMIDLIST m_pidl
Definition: CFindFolder.h:66
STDMETHODIMP CreateViewObject(HWND hwndOwner, REFIID riid, LPVOID *ppvOut)
CComPtr< IShellBrowser > m_shellBrowser
Definition: CFindFolder.h:69
STDMETHODIMP GetDefaultColumnState(UINT iColumn, DWORD *pcsFlags)
STDMETHODIMP GetUIObjectOf(HWND hwndOwner, UINT cidl, PCUITEMID_CHILD_ARRAY apidl, REFIID riid, UINT *prgfInOut, LPVOID *ppvOut)
WPARAM wParam
Definition: combotst.c:138
LPARAM lParam
Definition: combotst.c:139
#define IDR_FINDFOLDER
Definition: resource.h:110
unsigned int BOOL
Definition: ntddk_ex.h:94
unsigned long DWORD
Definition: ntddk_ex.h:95
REFIID riid
Definition: atlbase.h:39
#define BEGIN_CONNECTION_POINT_MAP(x)
Definition: atlcom.h:1483
#define BEGIN_COM_MAP(x)
Definition: atlcom.h:581
#define CONNECTION_POINT_ENTRY(iid)
Definition: atlcom.h:1494
#define END_CONNECTION_POINT_MAP()
Definition: atlcom.h:1488
#define COM_INTERFACE_ENTRY_IID(iid, x)
Definition: atlcom.h:601
#define DECLARE_PROTECT_FINAL_CONSTRUCT()
Definition: atlcom.h:679
#define DECLARE_NOT_AGGREGATABLE(x)
Definition: atlcom.h:651
#define DECLARE_REGISTRY_RESOURCEID(x)
Definition: atlcom.h:645
#define END_COM_MAP()
Definition: atlcom.h:592
#define MESSAGE_HANDLER(msg, func)
Definition: atlwin.h:1926
#define BEGIN_MSG_MAP(theClass)
Definition: atlwin.h:1898
#define END_MSG_MAP()
Definition: atlwin.h:1917
static LPSTR pName
Definition: security.c:75
static IParseDisplayName ParseDisplayName
Definition: moniker.c:816
static LPOLESTR
Definition: stg_prop.c:27
static VARIANTARG static DISPID
Definition: ordinal.c:52
unsigned int UINT
Definition: ndis.h:50
interface IBindCtx * LPBC
Definition: objfwd.h:18
const GUID IID_IConnectionPointContainer
const GUID IID_IPersist
Definition: proxy.cpp:14
#define REFIID
Definition: guiddef.h:118
#define WM_SEARCH_ADD_RESULT
Definition: shellfind.h:31
#define WM_SEARCH_UPDATE_STATUS
Definition: shellfind.h:32
#define WM_SEARCH_START
Definition: shellfind.h:29
#define WM_SEARCH_STOP
Definition: shellfind.h:30
ITEMIDLIST UNALIGNED * LPITEMIDLIST
Definition: shtypes.idl:41
const PCUITEMID_CHILD * PCUITEMID_CHILD_ARRAY
Definition: shtypes.idl:71
const ITEMID_CHILD UNALIGNED * PCUITEMID_CHILD
Definition: shtypes.idl:70
const ITEMIDLIST_RELATIVE UNALIGNED * PCUIDLIST_RELATIVE
Definition: shtypes.idl:57
uint32_t ULONG
Definition: typedefs.h:59
_In_ LPCSTR lpName
Definition: winbase.h:2789
_In_ PCCERT_CONTEXT _In_ DWORD dwFlags
Definition: wincrypt.h:1176
LONG_PTR LPARAM
Definition: windef.h:208
LONG_PTR LRESULT
Definition: windef.h:209
UINT_PTR WPARAM
Definition: windef.h:207
#define WINAPI
Definition: msvc.h:6
static void Initialize()
Definition: xlate.c:212