ReactOS 0.4.17-dev-573-g8315b8c
CFindFolder Class Reference

#include <CFindFolder.h>

Inheritance diagram for CFindFolder:
Collaboration diagram for CFindFolder:

Public Member Functions

 CFindFolder ()
 
- Public Member Functions inherited from ATL::CWindowImpl< CFindFolder >
HWND Create (HWND hWndParent, _U_RECT rect=NULL, LPCTSTR szWindowName=NULL, DWORD dwStyle=0, DWORD dwExStyle=0, _U_MENUorID MenuOrID=0U, LPVOID lpCreateParam=NULL)
 
- Public Member Functions inherited from ATL::CWindowImplBaseT< TBase, TWinTraits >
 CWindowImplBaseT ()
 
virtual void OnFinalMessage (HWND)
 
BOOL SubclassWindow (HWND hWnd)
 
HWND UnsubclassWindow (BOOL bForce=FALSE)
 
virtual WNDPROC GetWindowProc ()
 
LRESULT DefWindowProc (UINT uMsg, WPARAM wParam, LPARAM lParam)
 
HWND Create (HWND hWndParent, _U_RECT rect, LPCTSTR szWindowName, DWORD dwStyle, DWORD dwExStyle, _U_MENUorID MenuOrID, ATOM atom, LPVOID lpCreateParam)
 
- Public Member Functions inherited from ATL::CWindowImplRoot< TBase >
 CWindowImplRoot ()
 
virtual ~CWindowImplRoot ()
 
- Public Member Functions inherited from ATL::CWindow
 CWindow (HWND hWnd=NULL)
 
 operator HWND () const
 
UINT ArrangeIconicWindows ()
 
void Attach (HWND hWndNew)
 
HDC BeginPaint (LPPAINTSTRUCT lpPaint)
 
BOOL BringWindowToTop ()
 
BOOL CenterWindow (HWND hWndCenter=NULL)
 
BOOL ChangeClipboardChain (HWND hWndNewNext)
 
BOOL CheckDlgButton (int nIDButton, UINT nCheck)
 
BOOL CheckRadioButton (int nIDFirstButton, int nIDLastButton, int nIDCheckButton)
 
HWND ChildWindowFromPoint (POINT point) const
 
HWND ChildWindowFromPointEx (POINT point, UINT uFlags) const
 
BOOL ClientToScreen (LPPOINT lpPoint) const
 
BOOL ClientToScreen (LPRECT lpRect) const
 
HWND Create (LPCTSTR lpstrWndClass, HWND hWndParent, _U_RECT rect=NULL, LPCTSTR szWindowName=NULL, DWORD dwStyle=0, DWORD dwExStyle=0, _U_MENUorID MenuOrID=0U, LPVOID lpCreateParam=NULL)
 
BOOL CreateCaret (HBITMAP pBitmap)
 
BOOL CreateGrayCaret (int nWidth, int nHeight)
 
BOOL CreateSolidCaret (int nWidth, int nHeight)
 
HDWP DeferWindowPos (HDWP hWinPosInfo, HWND hWndInsertAfter, int x, int y, int cx, int cy, UINT uFlags)
 
BOOL DestroyWindow ()
 
HWND Detach ()
 
int DlgDirList (LPTSTR lpPathSpec, int nIDListBox, int nIDStaticPath, UINT nFileType)
 
int DlgDirListComboBox (LPTSTR lpPathSpec, int nIDComboBox, int nIDStaticPath, UINT nFileType)
 
BOOL DlgDirSelect (LPTSTR lpString, int nCount, int nIDListBox)
 
BOOL DlgDirSelectComboBox (LPTSTR lpString, int nCount, int nIDComboBox)
 
void DragAcceptFiles (BOOL bAccept=TRUE)
 
BOOL DrawMenuBar ()
 
BOOL EnableScrollBar (UINT uSBFlags, UINT uArrowFlags=ESB_ENABLE_BOTH)
 
BOOL EnableWindow (BOOL bEnable=TRUE)
 
void EndPaint (LPPAINTSTRUCT lpPaint)
 
BOOL FlashWindow (BOOL bInvert)
 
BOOL GetClientRect (LPRECT lpRect) const
 
HDC GetDC ()
 
HDC GetDCEx (HRGN hRgnClip, DWORD flags)
 
HWND GetDescendantWindow (int nID) const
 
HRESULT GetDlgControl (int nID, REFIID iid, void **ppCtrl)
 
int GetDlgCtrlID () const
 
HRESULT GetDlgHost (int nID, REFIID iid, void **ppHost)
 
HWND GetDlgItem (_In_ int nID) const
 
UINT GetDlgItemInt (_In_ int nID, _Out_opt_ BOOL *lpTrans=NULL, _In_ BOOL bSigned=TRUE) const
 
UINT GetDlgItemText (_In_ int nID, _Out_writes_to_(nMaxCount, return+1) LPTSTR lpStr, _In_ int nMaxCount) const
 
BOOL GetDlgItemText (_In_ int nID, _Inout_ _Outref_result_maybenull_ _Post_z_ BSTR &bstrText) const
 
DWORD GetExStyle () const
 
HFONT GetFont () const
 
DWORD GetHotKey () const
 
HICON GetIcon (BOOL bBigIcon=TRUE) const
 
HWND GetLastActivePopup () const
 
HMENU GetMenu () const
 
HWND GetNextDlgGroupItem (HWND hWndCtl, BOOL bPrevious=FALSE) const
 
HWND GetNextDlgTabItem (HWND hWndCtl, BOOL bPrevious=FALSE) const
 
CWindow GetParent () const
 
BOOL GetScrollInfo (int nBar, LPSCROLLINFO lpScrollInfo)
 
BOOL GetScrollPos (int nBar)
 
BOOL GetScrollRange (int nBar, LPINT lpMinPos, LPINT lpMaxPos) const
 
DWORD GetStyle () const
 
HMENU GetSystemMenu (BOOL bRevert)
 
HWND GetTopLevelParent () const
 
HWND GetTopLevelWindow () const
 
HWND GetTopWindow () const
 
BOOL GetUpdateRect (LPRECT lpRect, BOOL bErase=FALSE)
 
int GetUpdateRgn (HRGN hRgn, BOOL bErase=FALSE)
 
HWND GetWindow (UINT nCmd) const
 
DWORD GetWindowContextHelpId () const
 
HDC GetWindowDC ()
 
LONG GetWindowLong (int nIndex) const
 
LONG_PTR GetWindowLongPtr (int nIndex) const
 
BOOL GetWindowPlacement (WINDOWPLACEMENT *lpwndpl) const
 
DWORD GetWindowProcessID ()
 
BOOL GetWindowRect (LPRECT lpRect) const
 
int GetWindowRgn (HRGN hRgn)
 
int GetWindowText (_Out_writes_to_(nMaxCount, return+1) LPTSTR lpszStringBuf, _In_ int nMaxCount) const
 
BOOL GetWindowText (_Inout_ _Outref_result_maybenull_ _Post_z_ BSTR &bstrText) const
 
int GetWindowTextLength () const
 
DWORD GetWindowThreadID ()
 
WORD GetWindowWord (int nIndex) const
 
void GotoDlgCtrl (HWND hWndCtrl) const
 
BOOL HideCaret ()
 
BOOL HiliteMenuItem (HMENU hMenu, UINT uHiliteItem, UINT uHilite)
 
BOOL Invalidate (BOOL bErase=TRUE)
 
BOOL InvalidateRect (LPCRECT lpRect, BOOL bErase=TRUE)
 
void InvalidateRgn (HRGN hRgn, BOOL bErase=TRUE)
 
BOOL IsChild (const HWND hWnd) const
 
BOOL IsDialogMessage (LPMSG lpMsg)
 
UINT IsDlgButtonChecked (int nIDButton) const
 
BOOL IsIconic () const
 
BOOL IsParentDialog ()
 
BOOL IsWindow () const
 
BOOL IsWindowEnabled () const
 
BOOL IsWindowVisible () const
 
BOOL IsWindowUnicode ()
 
BOOL IsZoomed () const
 
BOOL KillTimer (UINT_PTR nIDEvent)
 
BOOL LockWindowUpdate (BOOL bLock=TRUE)
 
int MapWindowPoints (HWND hWndTo, LPPOINT lpPoint, UINT nCount) const
 
int MapWindowPoints (HWND hWndTo, LPRECT lpRect) const
 
int MessageBox (LPCTSTR lpszText, LPCTSTR lpszCaption=NULL, UINT nType=MB_OK)
 
BOOL ModifyStyle (DWORD dwRemove, DWORD dwAdd, UINT nFlags=0)
 
BOOL ModifyStyleEx (DWORD dwRemove, DWORD dwAdd, UINT nFlags=0)
 
BOOL MoveWindow (int x, int y, int nWidth, int nHeight, BOOL bRepaint=TRUE)
 
void NextDlgCtrl () const
 
BOOL OpenClipboard ()
 
BOOL PostMessage (UINT message, WPARAM wParam=0, LPARAM lParam=0)
 
void PrevDlgCtrl () const
 
void Print (HDC hDC, DWORD dwFlags) const
 
void PrintClient (HDC hDC, DWORD dwFlags) const
 
BOOL RedrawWindow (LPCRECT lpRectUpdate=NULL, HRGN hRgnUpdate=NULL, UINT flags=RDW_INVALIDATE|RDW_UPDATENOW|RDW_ERASE)
 
int ReleaseDC (HDC hDC)
 
BOOL ResizeClient (int nWidth, int nHeight, BOOL bRedraw=FALSE)
 
BOOL ScreenToClient (LPPOINT lpPoint) const
 
BOOL ScrollWindow (int xAmount, int yAmount, LPCRECT lpRect=NULL, LPCRECT lpClipRect=NULL)
 
int ScrollWindowEx (int dx, int dy, LPCRECT lpRectScroll, LPCRECT lpRectClip, HRGN hRgnUpdate, LPRECT lpRectUpdate, UINT flags)
 
LRESULT SendDlgItemMessage (int nID, UINT message, WPARAM wParam=0, LPARAM lParam=0)
 
LRESULT SendMessage (UINT message, WPARAM wParam=0, LPARAM lParam=0)
 
void SendMessageToDescendants (UINT message, WPARAM wParam=0, LPARAM lParam=0, BOOL bDeep=TRUE)
 
BOOL SendNotifyMessage (UINT message, WPARAM wParam=0, LPARAM lParam=0)
 
HWND SetActiveWindow ()
 
HWND SetCapture ()
 
HWND SetClipboardViewer ()
 
int SetDlgCtrlID (int nID)
 
BOOL SetDlgItemInt (int nID, UINT nValue, BOOL bSigned=TRUE)
 
BOOL SetDlgItemText (int nID, LPCTSTR lpszString)
 
HWND SetFocus ()
 
void SetFont (HFONT hFont, BOOL bRedraw=TRUE)
 
int SetHotKey (WORD wVirtualKeyCode, WORD wModifiers)
 
HICON SetIcon (HICON hIcon, BOOL bBigIcon=TRUE)
 
BOOL SetMenu (HMENU hMenu)
 
HWND SetParent (HWND hWndNewParent)
 
void SetRedraw (BOOL bRedraw=TRUE)
 
int SetScrollInfo (int nBar, LPSCROLLINFO lpScrollInfo, BOOL bRedraw=TRUE)
 
int SetScrollPos (int nBar, int nPos, BOOL bRedraw=TRUE)
 
BOOL SetScrollRange (int nBar, int nMinPos, int nMaxPos, BOOL bRedraw=TRUE)
 
UINT_PTR SetTimer (UINT_PTR nIDEvent, UINT nElapse, void(CALLBACK *lpfnTimer)(HWND, UINT, UINT_PTR, DWORD)=NULL)
 
BOOL SetWindowContextHelpId (DWORD dwContextHelpId)
 
LONG SetWindowLong (int nIndex, LONG dwNewLong)
 
LONG_PTR SetWindowLongPtr (int nIndex, LONG_PTR dwNewLong)
 
BOOL SetWindowPlacement (const WINDOWPLACEMENT *lpwndpl)
 
BOOL SetWindowPos (HWND hWndInsertAfter, int x, int y, int cx, int cy, UINT nFlags)
 
int SetWindowRgn (HRGN hRgn, BOOL bRedraw=FALSE)
 
BOOL SetWindowText (LPCTSTR lpszString)
 
WORD SetWindowWord (int nIndex, WORD wNewWord)
 
BOOL ShowCaret ()
 
BOOL ShowOwnedPopups (BOOL bShow=TRUE)
 
BOOL ShowScrollBar (UINT nBar, BOOL bShow=TRUE)
 
BOOL ShowWindow (int nCmdShow)
 
BOOL ShowWindowAsync (int nCmdShow)
 
BOOL UpdateWindow ()
 
BOOL ValidateRect (LPCRECT lpRect)
 
BOOL ValidateRgn (HRGN hRgn)
 
BOOL WinHelp (LPCTSTR lpszHelp, UINT nCmd=HELP_CONTEXT, DWORD dwData=0)
 
- Public Member Functions inherited from ATL::CMessageMap
virtual BOOL ProcessWindowMessage (HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam, LRESULT &lResult, DWORD dwMsgMapID)=0
 
- Public Member Functions inherited from ATL::CComObjectRootEx< CComMultiThreadModelNoCS >
 ~CComObjectRootEx ()
 
ULONG InternalAddRef ()
 
ULONG InternalRelease ()
 
void Lock ()
 
void Unlock ()
 
HRESULT _AtlInitialConstruct ()
 
- Public Member Functions inherited from ATL::CComObjectRootBase
 CComObjectRootBase ()
 
 ~CComObjectRootBase ()
 
void SetVoid (void *)
 
HRESULT _AtlFinalConstruct ()
 
HRESULT FinalConstruct ()
 
void InternalFinalConstructAddRef ()
 
void InternalFinalConstructRelease ()
 
void FinalRelease ()
 
HRESULT GetDefaultSearchGUID ([out] GUID *lpguid)
 
HRESULT EnumSearches ([out] IEnumExtraSearch **ppenum)
 
HRESULT GetDefaultColumn ([in] DWORD dwReserved, [out] ULONG *pSort, [out] ULONG *pDisplay)
 
HRESULT GetDefaultColumnState ([in] UINT iColumn, [out] SHCOLSTATEF *pcsFlags)
 
HRESULT GetDetailsEx ([in] PCUITEMID_CHILD pidl, [in] const SHCOLUMNID *pscid, [out] VARIANT *pv)
 
HRESULT GetDetailsOf ([in] PCUITEMID_CHILD pidl, [in] UINT iColumn, [out] SHELLDETAILS *psd)
 
HRESULT MapColumnToSCID ([in] UINT iColumn, [in] SHCOLUMNID *pscid)
 
- Public Member Functions inherited from IShellFolder
HRESULT ParseDisplayName ([in] HWND hwndOwner, [in] LPBC pbcReserved, [in, string] LPOLESTR lpszDisplayName, [out] ULONG *pchEaten, [out] PIDLIST_RELATIVE *ppidl, [in, out, unique] ULONG *pdwAttributes)
 
HRESULT EnumObjects ([in] HWND hwndOwner, [in] SHCONTF grfFlags, [out] IEnumIDList **ppenumIDList)
 
HRESULT BindToObject ([in] PCUIDLIST_RELATIVE pidl, [in] LPBC pbcReserved, [in] REFIID riid, [out, iid_is(riid)] void **ppvOut)
 
HRESULT BindToStorage ([in] PCUIDLIST_RELATIVE pidl, [in] LPBC pbcReserved, [in] REFIID riid, [out, iid_is(riid)] void **ppvObj)
 
HRESULT CompareIDs ([in] LPARAM lParam, [in] PCUIDLIST_RELATIVE pidl1, [in] PCUIDLIST_RELATIVE pidl2)
 
HRESULT CreateViewObject ([in] HWND hwndOwner, [in] REFIID riid, [out, iid_is(riid)] void **ppvOut)
 
HRESULT GetAttributesOf ([in] UINT cidl, [in, size_is(cidl)] PCUITEMID_CHILD_ARRAY apidl, [in, out] SFGAOF *rgfInOut)
 
HRESULT GetUIObjectOf ([in] HWND hwndOwner, [in] UINT cidl, [in, size_is(cidl)] PCUITEMID_CHILD_ARRAY apidl, [in] REFIID riid, [in, out, unique] UINT *prgfInOut, [out, iid_is(riid)] void **ppvOut)
 
HRESULT GetDisplayNameOf ([in] PCUITEMID_CHILD pidl, [in] SHGDNF uFlags, [out] STRRET *lpName)
 
HRESULT SetNameOf ([in] HWND hwnd, [in] PCUITEMID_CHILD pidl, [in, string] LPCOLESTR lpszName, [in] SHGDNF uFlags, [out] PITEMID_CHILD *ppidlOut)
 
- Public Member Functions inherited from IUnknown
HRESULT QueryInterface ([in] REFIID riid, [out, iid_is(riid)] void **ppvObject)
 
ULONG AddRef ()
 
ULONG Release ()
 
HRESULT GetCurFolder ([out] PIDLIST_ABSOLUTE *ppidl)
 
HRESULT Initialize ([in] PCIDLIST_ABSOLUTE pidl)
 
HRESULT GetClassID ([out] CLSID *pClassID)
 
HRESULT GetValidCharacters ([out, string] LPWSTR *ppwszValidChars, [out, string] LPWSTR *ppwszInvalidChars)
 
HRESULT GetMaxLength ([in, string] LPCWSTR pszName, [out] int *piMaxNameLen)
 
- Public Member Functions inherited from ATL::IConnectionPointContainerImpl< CFindFolder >
STDMETHOD() EnumConnectionPoints (IEnumConnectionPoints **ppEnum)
 
STDMETHOD() FindConnectionPoint (REFIID riid, IConnectionPoint **ppCP)
 
HRESULT EnumConnectionPoints ([out] IEnumConnectionPoints **ppEnum)
 
HRESULT FindConnectionPoint ([in] REFIID riid, [out] IConnectionPoint **ppCP)
 
- Public Member Functions inherited from ATL::IConnectionPointImpl< CFindFolder, &DIID_DSearchCommandEvents >
 ~IConnectionPointImpl ()
 
STDMETHOD() _LocCPQueryInterface (REFIID riid, void **ppvObject)
 
STDMETHOD() GetConnectionInterface (IID *piid2)
 
STDMETHOD() GetConnectionPointContainer (IConnectionPointContainer **ppCPC)
 
STDMETHOD() Advise (IUnknown *pUnkSink, DWORD *pdwCookie)
 
STDMETHOD() Unadvise (DWORD dwCookie)
 
STDMETHOD() EnumConnections (IEnumConnections **ppEnum)
 
- Public Member Functions inherited from ATL::_ICPLocator< piid >
STDMETHOD() _LocCPQueryInterface (REFIID riid, void **ppvObject)=0
 
virtual ULONG STDMETHODCALLTYPE AddRef ()=0
 
virtual ULONG STDMETHODCALLTYPE Release ()=0
 

Private Member Functions

STDMETHODIMP GetDefaultSearchGUID (GUID *pguid)
 
STDMETHODIMP EnumSearches (IEnumExtraSearch **ppenum)
 
STDMETHODIMP GetDefaultColumn (DWORD dwRes, ULONG *pSort, ULONG *pDisplay)
 
STDMETHODIMP GetDefaultColumnState (UINT iColumn, DWORD *pcsFlags)
 
STDMETHODIMP GetDetailsEx (PCUITEMID_CHILD pidl, const SHCOLUMNID *pscid, VARIANT *pv)
 
STDMETHODIMP GetDetailsOf (PCUITEMID_CHILD pidl, UINT iColumn, SHELLDETAILS *pDetails)
 
STDMETHODIMP MapColumnToSCID (UINT iColumn, SHCOLUMNID *pscid)
 
STDMETHODIMP ParseDisplayName (HWND hwndOwner, LPBC pbc, LPOLESTR lpszDisplayName, ULONG *pchEaten, PIDLIST_RELATIVE *ppidl, ULONG *pdwAttributes)
 
STDMETHODIMP EnumObjects (HWND hwndOwner, DWORD dwFlags, LPENUMIDLIST *ppEnumIDList)
 
STDMETHODIMP BindToObject (PCUIDLIST_RELATIVE pidl, LPBC pbcReserved, REFIID riid, LPVOID *ppvOut)
 
STDMETHODIMP BindToStorage (PCUIDLIST_RELATIVE pidl, LPBC pbcReserved, REFIID riid, LPVOID *ppvOut)
 
STDMETHODIMP CompareIDs (LPARAM lParam, PCUIDLIST_RELATIVE pidl1, PCUIDLIST_RELATIVE pidl2)
 
STDMETHODIMP CreateViewObject (HWND hwndOwner, REFIID riid, LPVOID *ppvOut)
 
STDMETHODIMP GetAttributesOf (UINT cidl, PCUITEMID_CHILD_ARRAY apidl, DWORD *rgfInOut)
 
STDMETHODIMP GetUIObjectOf (HWND hwndOwner, UINT cidl, PCUITEMID_CHILD_ARRAY apidl, REFIID riid, UINT *prgfInOut, LPVOID *ppvOut)
 
STDMETHODIMP GetDisplayNameOf (PCUITEMID_CHILD pidl, DWORD dwFlags, LPSTRRET pName)
 
STDMETHODIMP SetNameOf (HWND hwndOwner, PCUITEMID_CHILD pidl, LPCOLESTR lpName, DWORD dwFlags, PITEMID_CHILD *pPidlOut)
 
STDMETHODIMP MessageSFVCB (UINT uMsg, WPARAM wParam, LPARAM lParam)
 
STDMETHOD() GetMaxLength (LPCWSTR pszName, int *piMaxNameLen) override
 
STDMETHOD() GetValidCharacters (LPWSTR *ppwszValidChars, LPWSTR *ppwszInvalidChars) override
 
HRESULT GetFSFolderAndChild (LPCITEMIDLIST pidl, IShellFolder **ppSF, PCUITEMID_CHILD *ppidlLast=NULL)
 
HRESULT GetFSFolder2AndChild (LPCITEMIDLIST pidl, IShellFolder2 **ppSF, PCUITEMID_CHILD *ppidlLast=NULL)
 
void FreePidlArray (HDPA hDpa)
 
HDPA CreateAbsolutePidlArray (UINT cidl, PCUITEMID_CHILD_ARRAY apidl)
 
void NotifyConnections (DISPID id)
 
STDMETHODIMP GetCurFolder (PIDLIST_ABSOLUTE *pidl)
 
STDMETHODIMP Initialize (PCIDLIST_ABSOLUTE pidl)
 
STDMETHODIMP GetClassID (CLSID *pClassId)
 
LRESULT StartSearch (UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
 
LRESULT StopSearch (UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
 
LRESULT AddResult (UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
 
LRESULT UpdateStatus (UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
 

Static Private Member Functions

static int CALLBACK SortItemsForDataObject (void *p1, void *p2, LPARAM lparam)
 
static DWORD WINAPI SearchThreadProc (LPVOID lpParameter)
 

Private Attributes

LPITEMIDLIST m_pidl
 
CComPtr< IShellFolder2m_pisfInner
 
CComPtr< IShellFolder2m_pSfDesktop
 
CComPtr< IShellFolderView > m_shellFolderView
 
CComPtr< IShellBrowserm_shellBrowser
 
HANDLE m_hStopEvent
 
UINT m_SearchId = 0
 

Additional Inherited Members

- Public Types inherited from ATL::CWindowImplRoot< TBase >
enum  { WINSTATE_DESTROYED = 0x00000001 }
 
- Public Types inherited from IShellFolder2
typedef struct IShellFolder2::SHCOLUMNIDLPSHCOLUMNID
 
typedef const SHCOLUMNIDLPCSHCOLUMNID
 
- Public Types inherited from IShellFolder
enum  tagSHGDN {
  SHGDN_NORMAL = 0 , SHGDN_INFOLDER = 1 , SHGDN_FOREDITING = 0x1000 , SHGDN_INCLUDE_NONFILESYS = 0x2000 ,
  SHGDN_FORADDRESSBAR = 0x4000 , SHGDN_FORPARSING = 0x8000
}
 
enum  tagSHCONTF {
  SHCONTF_FOLDERS = 32 , SHCONTF_NONFOLDERS = 64 , SHCONTF_INCLUDEHIDDEN = 128 , SHCONTF_INIT_ON_FIRST_NEXT = 256 ,
  SHCONTF_NETPRINTERSRCH = 512 , SHCONTF_SHAREABLE = 1024 , SHCONTF_STORAGE = 2048 , SHCONTF_NAVIGATION_ENUM = 0x01000 ,
  SHCONTF_FASTITEMS = 0x02000 , SHCONTF_FLATLIST = 0x04000 , SHCONTF_ENABLE_ASYNC = 0x08000 , SHCONTF_INCLUDESUPERHIDDEN = 0x10000
}
 
typedef IShellFolderLPSHELLFOLDER
 
typedef enum IShellFolder::tagSHGDN SHGNO
 
typedef DWORD SHGDNF
 
typedef DWORD SHCONTF
 
typedef ULONG SFGAOF
 
- Public Types inherited from IUnknown
typedef IUnknownLPUNKNOWN
 
- Public Types inherited from IPersistFolder2
typedef IPersistFolder2LPPERSISTFOLDER2
 
- Public Types inherited from IPersistFolder
typedef IPersistFolderLPPERSISTFOLDER
 
- Public Types inherited from IPersist
typedef IPersistLPPERSIST
 
- Public Types inherited from IConnectionPointContainer
typedef IConnectionPointContainerPCONNECTIONPOINTCONTAINER
 
typedef IConnectionPointContainerLPCONNECTIONPOINTCONTAINER
 
- Static Public Member Functions inherited from ATL::CWindowImpl< CFindFolder >
static LPCTSTR GetWndCaption ()
 
- Static Public Member Functions inherited from ATL::CWindowImplBaseT< TBase, TWinTraits >
static DWORD GetWndStyle (DWORD dwStyle)
 
static DWORD GetWndExStyle (DWORD dwExStyle)
 
static LRESULT CALLBACK StartWindowProc (HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
 
static LRESULT CALLBACK WindowProc (HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
 
- Static Public Member Functions inherited from ATL::CWindow
static LPCTSTR GetWndClassName ()
 
static LRESULT SendMessage (HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
 
- Static Public Member Functions inherited from ATL::CComCoClass< CFindFolder, &CLSID_FindFolder >
static LPCTSTR WINAPI GetObjectDescription ()
 
- Static Public Member Functions inherited from ATL::CComObjectRootBase
static void WINAPI ObjectMain (bool)
 
static const struct _ATL_CATMAP_ENTRYGetCategoryMap ()
 
static HRESULT WINAPI InternalQueryInterface (void *pThis, const _ATL_INTMAP_ENTRY *pEntries, REFIID iid, void **ppvObject)
 
- Public Attributes inherited from ATL::CWindowImplBaseT< TBase, TWinTraits >
WNDPROC m_pfnSuperWindowProc
 
- Public Attributes inherited from ATL::CWindowImplRoot< TBase >
CWndProcThunk m_thunk
 
const _ATL_MSGm_pCurrentMsg
 
DWORD m_dwState
 
- Public Attributes inherited from ATL::CWindow
HWND m_hWnd
 
- Public Attributes inherited from ATL::CComObjectRootBase
LONG m_dwRef
 
- Public Attributes inherited from ATL::IConnectionPointImpl< CFindFolder, &DIID_DSearchCommandEvents >
CComDynamicUnkArray m_vec
 
- Static Public Attributes inherited from ATL::CWindow
static RECT rcDefault
 

Detailed Description

Definition at line 12 of file CFindFolder.h.

Constructor & Destructor Documentation

◆ CFindFolder()

CFindFolder::CFindFolder ( )

Definition at line 144 of file CFindFolder.cpp.

144 :
145 m_pidl(NULL),
147{
148}
HANDLE m_hStopEvent
Definition: CFindFolder.h:75
LPITEMIDLIST m_pidl
Definition: CFindFolder.h:71
#define NULL
Definition: types.h:112

Member Function Documentation

◆ AddResult()

LRESULT CFindFolder::AddResult ( UINT  uMsg,
WPARAM  wParam,
LPARAM  lParam,
BOOL bHandled 
)
private

Definition at line 763 of file CFindFolder.cpp.

764{
765 if (!lParam)
766 return 0;
767
769 if (wParam != m_SearchId)
770 return 0;
771
772 CComHeapPtr<ITEMIDLIST> lpSearchPidl(_ILCreate(lpPath));
773 if (lpSearchPidl)
774 {
775 UINT uItemIndex;
776 m_shellFolderView->AddObject(lpSearchPidl, &uItemIndex);
777 }
778
779 return 0;
780}
CComPtr< IShellFolderView > m_shellFolderView
Definition: CFindFolder.h:73
UINT m_SearchId
Definition: CFindFolder.h:76
WPARAM wParam
Definition: combotst.c:138
LPARAM lParam
Definition: combotst.c:139
PITEMID_CHILD _ILCreate(LPCWSTR lpName, LPCWSTR lpFileName)
Definition: fontpidl.cpp:16
unsigned int UINT
Definition: sysinfo.c:13
uint16_t * LPWSTR
Definition: typedefs.h:56

◆ BindToObject()

STDMETHODIMP CFindFolder::BindToObject ( PCUIDLIST_RELATIVE  pidl,
LPBC  pbcReserved,
REFIID  riid,
LPVOID ppvOut 
)
private

Definition at line 887 of file CFindFolder.cpp.

888{
889 HRESULT hr;
890 CComPtr<IShellFolder> pInnerFolder;
891 PCUITEMID_CHILD pidlChild;
892 if (FAILED_UNEXPECTEDLY(hr = GetFSFolderAndChild(pidl, &pInnerFolder, &pidlChild)))
893 return hr;
894 return pInnerFolder->BindToObject(pidlChild, pbcReserved, riid, ppvOut);
895}
HRESULT GetFSFolderAndChild(LPCITEMIDLIST pidl, IShellFolder **ppSF, PCUITEMID_CHILD *ppidlLast=NULL)
HRESULT hr
Definition: delayimp.cpp:582
#define FAILED_UNEXPECTEDLY
Definition: utils.cpp:33
REFIID riid
Definition: atlbase.h:39
const ITEMID_CHILD UNALIGNED * PCUITEMID_CHILD
Definition: shtypes.idl:70

◆ BindToStorage()

STDMETHODIMP CFindFolder::BindToStorage ( PCUIDLIST_RELATIVE  pidl,
LPBC  pbcReserved,
REFIID  riid,
LPVOID ppvOut 
)
private

Definition at line 897 of file CFindFolder.cpp.

898{
900 return E_NOTIMPL;
901}
#define UNIMPLEMENTED
Definition: ntoskrnl.c:15
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ CompareIDs()

STDMETHODIMP CFindFolder::CompareIDs ( LPARAM  lParam,
PCUIDLIST_RELATIVE  pidl1,
PCUIDLIST_RELATIVE  pidl2 
)
private

Implements IShellFolder.

Definition at line 903 of file CFindFolder.cpp.

904{
905 HRESULT hr;
906 WORD wColumn = LOWORD(lParam);
907 switch (wColumn)
908 {
909 case COL_NAME_INDEX: // Name
910 C_ASSERT(COL_NAME_INDEX == 0); // SHELL32::SHFSF_COL_NAME
911 // We can have more than one item with the same filename, in this case, look at the path as well.
912 // When DefView wants to identify a specific item, it will use the SHCIDS_CANONICALONLY flag.
913 hr = m_pisfInner->CompareIDs(MAKELONG(0, HIWORD(lParam)), _ILGetFSPidl(pidl1), _ILGetFSPidl(pidl2));
915 hr = CompareIDs(COL_LOCATION_INDEX, pidl1, pidl2);
916 return hr;
917 case COL_LOCATION_INDEX: // Path
918 return MAKE_COMPARE_HRESULT(StrCmpW(_ILGetPath(pidl1), _ILGetPath(pidl2)));
919 case COL_RELEVANCE_INDEX: // Relevance
920 return E_NOTIMPL;
921 default: // Default columns
922 wColumn -= _countof(g_ColumnDefs) - 1;
923 break;
924 }
925 return m_pisfInner->CompareIDs(MAKELONG(wColumn, HIWORD(lParam)), _ILGetFSPidl(pidl1), _ILGetFSPidl(pidl2));
926}
static LPCWSTR _ILGetPath(LPCITEMIDLIST pidl)
static LPCITEMIDLIST _ILGetFSPidl(LPCITEMIDLIST pidl)
static FolderViewColumns g_ColumnDefs[]
Definition: CFontExt.cpp:34
#define SHCIDS_ALLFIELDS
Definition: CFontExt.cpp:14
CComPtr< IShellFolder2 > m_pisfInner
Definition: CFindFolder.h:72
STDMETHODIMP CompareIDs(LPARAM lParam, PCUIDLIST_RELATIVE pidl1, PCUIDLIST_RELATIVE pidl2)
#define SHCIDS_CANONICALONLY
Definition: shobjidl.idl:226
#define COL_NAME_INDEX
Definition: resource.h:187
#define COL_RELEVANCE_INDEX
Definition: resource.h:189
#define COL_LOCATION_INDEX
Definition: resource.h:188
int WINAPI StrCmpW(const WCHAR *str, const WCHAR *comp)
Definition: string.c:458
unsigned short WORD
Definition: ntddk_ex.h:93
#define C_ASSERT(e)
Definition: intsafe.h:73
#define LOWORD(l)
Definition: pedump.c:82
#define MAKE_COMPARE_HRESULT(x)
Definition: shellutils.h:686
#define S_EQUAL
Definition: shellutils.h:684
#define _countof(array)
Definition: sndvol32.h:70
#define MAKELONG(a, b)
Definition: typedefs.h:249
#define HIWORD(l)
Definition: typedefs.h:247

Referenced by CompareIDs().

◆ CreateAbsolutePidlArray()

HDPA CFindFolder::CreateAbsolutePidlArray ( UINT  cidl,
PCUITEMID_CHILD_ARRAY  apidl 
)
private

Definition at line 251 of file CFindFolder.cpp.

252{
253 HDPA hDpa = DPA_Create(cidl / 2);
254 if (hDpa)
255 {
256 for (UINT i = 0; i < cidl; ++i)
257 {
258 PIDLIST_ABSOLUTE pidl = _ILCreateAbsolute(apidl[i]);
259 if (pidl)
260 {
261 if (DPA_InsertPtr(hDpa, i, pidl) >= 0)
262 continue;
263 ILFree(pidl);
264 }
265 FreePidlArray(hDpa);
266 return NULL;
267 }
268 }
269 return hDpa;
270}
static PIDLIST_ABSOLUTE _ILCreateAbsolute(LPCITEMIDLIST pidlChild)
void FreePidlArray(HDPA hDpa)
HDPA WINAPI DPA_Create(INT nGrow)
Definition: dpa.c:950
INT WINAPI DPA_InsertPtr(HDPA hdpa, INT i, LPVOID p)
Definition: dpa.c:591
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
void WINAPI ILFree(LPITEMIDLIST pidl)
Definition: pidl.c:1051
Definition: dpa.c:49

Referenced by GetUIObjectOf().

◆ CreateViewObject()

STDMETHODIMP CFindFolder::CreateViewObject ( HWND  hwndOwner,
REFIID  riid,
LPVOID ppvOut 
)
private

Definition at line 928 of file CFindFolder.cpp.

929{
930 if (riid == IID_IShellView)
931 {
932 SFV_CREATE sfvparams = {};
933 sfvparams.cbSize = sizeof(SFV_CREATE);
934 sfvparams.pshf = this;
935 sfvparams.psfvcb = this;
936 HRESULT hr = SHCreateShellFolderView(&sfvparams, (IShellView **) ppvOut);
938 {
939 return hr;
940 }
941
942 return ((IShellView * ) * ppvOut)->QueryInterface(IID_PPV_ARG(IShellFolderView, &m_shellFolderView));
943 }
944 return E_NOINTERFACE;
945}
HRESULT WINAPI SHCreateShellFolderView(const SFV_CREATE *pcsfv, IShellView **ppsv)
Definition: CDefView.cpp:4822
HRESULT QueryInterface([in] REFIID riid, [out, iid_is(riid)] void **ppvObject)
struct _SFV_CREATE SFV_CREATE
IShellFolderViewCB * psfvcb
Definition: shlobj.h:1376
UINT cbSize
Definition: shlobj.h:1373
IShellFolder * pshf
Definition: shlobj.h:1374
#define E_NOINTERFACE
Definition: winerror.h:3479
#define IID_PPV_ARG(Itype, ppType)

◆ EnumObjects()

STDMETHODIMP CFindFolder::EnumObjects ( HWND  hwndOwner,
DWORD  dwFlags,
LPENUMIDLIST *  ppEnumIDList 
)
private

Definition at line 881 of file CFindFolder.cpp.

882{
883 *ppEnumIDList = NULL;
884 return S_FALSE;
885}
#define S_FALSE
Definition: winerror.h:3451

◆ EnumSearches()

STDMETHODIMP CFindFolder::EnumSearches ( IEnumExtraSearch **  ppenum)
private

Implements IShellFolder2.

Definition at line 797 of file CFindFolder.cpp.

798{
800 return E_NOTIMPL;
801}

◆ FreePidlArray()

void CFindFolder::FreePidlArray ( HDPA  hDpa)
private

Definition at line 246 of file CFindFolder.cpp.

247{
249}
static int CALLBACK ILFreeHelper(void *pItem, void *pCaller)
void WINAPI DPA_DestroyCallback(HDPA hdpa, PFNDPAENUMCALLBACK enumProc, LPVOID lParam)
Definition: dpa.c:1003

Referenced by CreateAbsolutePidlArray(), and GetUIObjectOf().

◆ GetAttributesOf()

STDMETHODIMP CFindFolder::GetAttributesOf ( UINT  cidl,
PCUITEMID_CHILD_ARRAY  apidl,
DWORD rgfInOut 
)
private

Definition at line 947 of file CFindFolder.cpp.

948{
949 if (!cidl)
950 {
951 *rgfInOut &= SFGAO_BROWSABLE; // TODO: SFGAO_CANRENAME?
952 return S_OK;
953 }
954
956 for (UINT i = 0; i < cidl; ++i)
957 {
958 CComPtr<IShellFolder> pFolder;
959 PCUITEMID_CHILD pidlChild;
960 if (FAILED_UNEXPECTEDLY(hr = GetFSFolderAndChild(apidl[i], &pFolder, &pidlChild)))
961 break;
962 if (FAILED(hr = pFolder->GetAttributesOf(1, &pidlChild, rgfInOut)))
963 break;
964 }
965 return hr;
966}
#define E_INVALIDARG
Definition: ddrawi.h:101
#define S_OK
Definition: intsafe.h:52
#define FAILED(hr)
Definition: intsafe.h:51

◆ GetClassID()

STDMETHODIMP CFindFolder::GetClassID ( CLSID pClassId)
private

Implements IPersist.

Definition at line 1292 of file CFindFolder.cpp.

1293{
1294 if (pClassId == NULL)
1295 return E_INVALIDARG;
1296 *pClassId = CLSID_FindFolder;
1297 return S_OK;
1298}

◆ GetCurFolder()

STDMETHODIMP CFindFolder::GetCurFolder ( PIDLIST_ABSOLUTE pidl)
private

Implements IPersistFolder2.

Definition at line 1272 of file CFindFolder.cpp.

1273{
1274 return SHILClone(m_pidl, pidl);
1275}

◆ GetDefaultColumn()

STDMETHODIMP CFindFolder::GetDefaultColumn ( DWORD  dwRes,
ULONG pSort,
ULONG pDisplay 
)
private

Implements IShellFolder2.

Definition at line 803 of file CFindFolder.cpp.

804{
805 if (pSort)
806 *pSort = COL_NAME_INDEX;
807 if (pDisplay)
808 *pDisplay = COL_NAME_INDEX;
809 return S_OK;
810}

◆ GetDefaultColumnState()

STDMETHODIMP CFindFolder::GetDefaultColumnState ( UINT  iColumn,
DWORD pcsFlags 
)
private

Implements IShellFolder2.

Definition at line 812 of file CFindFolder.cpp.

813{
814 if (!pcsFlags)
815 return E_INVALIDARG;
816 if (iColumn >= _countof(g_ColumnDefs))
817 return m_pisfInner->GetDefaultColumnState(iColumn - _countof(g_ColumnDefs) + 1, pcsFlags);
818 *pcsFlags = g_ColumnDefs[iColumn].dwDefaultState;
819 return S_OK;
820}
DWORD dwDefaultState
Definition: CFontExt.cpp:20

◆ GetDefaultSearchGUID()

STDMETHODIMP CFindFolder::GetDefaultSearchGUID ( GUID pguid)
private

Implements IShellFolder2.

Definition at line 791 of file CFindFolder.cpp.

792{
794 return E_NOTIMPL;
795}

◆ GetDetailsEx()

STDMETHODIMP CFindFolder::GetDetailsEx ( PCUITEMID_CHILD  pidl,
const SHCOLUMNID pscid,
VARIANT pv 
)
private

Implements IShellFolder2.

Definition at line 822 of file CFindFolder.cpp.

823{
824 // FIXME: Handle COL_LOCATION_INDEX and COL_RELEVANCE_INDEX
826 PCUITEMID_CHILD pChild;
827 if (SUCCEEDED(GetFSFolder2AndChild(pidl, &pFolder, &pChild)))
828 return pFolder->GetDetailsEx(pChild, pscid, pv);
829 return E_FAIL;
830}
HRESULT GetFSFolder2AndChild(LPCITEMIDLIST pidl, IShellFolder2 **ppSF, PCUITEMID_CHILD *ppidlLast=NULL)
#define E_FAIL
Definition: ddrawi.h:102
#define SUCCEEDED(hr)
Definition: intsafe.h:50

◆ GetDetailsOf()

STDMETHODIMP CFindFolder::GetDetailsOf ( PCUITEMID_CHILD  pidl,
UINT  iColumn,
SHELLDETAILS pDetails 
)
private

Implements IShellFolder2.

Definition at line 832 of file CFindFolder.cpp.

833{
834 if (iColumn >= _countof(g_ColumnDefs))
835 {
836 UINT FSColumn = iColumn - _countof(g_ColumnDefs) + 1;
837 if (pidl)
838 {
840 PCUITEMID_CHILD pChild;
841 if (SUCCEEDED(GetFSFolder2AndChild(pidl, &pFolder, &pChild)))
842 return pFolder->GetDetailsOf(pChild, FSColumn, pDetails);
843 }
844 return m_pisfInner->GetDetailsOf(pidl, FSColumn, pDetails); // Column header info
845 }
846
847 pDetails->cxChar = g_ColumnDefs[iColumn].cxChar;
848 pDetails->fmt = g_ColumnDefs[iColumn].fmt;
849 if (!pidl)
850 return SHSetStrRet(&pDetails->str, _AtlBaseModule.GetResourceInstance(), g_ColumnDefs[iColumn].iResource);
851
852 if (iColumn == COL_LOCATION_INDEX)
853 {
854 return SHSetStrRet(&pDetails->str, _ILGetPath(pidl));
855 }
856
857 if (iColumn == COL_RELEVANCE_INDEX)
858 {
859 // TODO: Fill once the relevance is calculated
860 return SHSetStrRetEmpty(&pDetails->str);
861 }
862
863 ATLASSERT(iColumn == COL_NAME_INDEX);
864 return GetDisplayNameOf(pidl, SHGDN_NORMAL | SHGDN_INFOLDER, &pDetails->str);
865}
#define ATLASSERT(x)
Definition: CComVariant.cpp:10
STDMETHODIMP GetDisplayNameOf(PCUITEMID_CHILD pidl, DWORD dwFlags, LPSTRRET pName)
STRRET str
Definition: shtypes.idl:108

◆ GetDisplayNameOf()

STDMETHODIMP CFindFolder::GetDisplayNameOf ( PCUITEMID_CHILD  pidl,
DWORD  dwFlags,
LPSTRRET  pName 
)
private

Definition at line 1150 of file CFindFolder.cpp.

1151{
1152 HRESULT hr;
1153 CComPtr<IShellFolder> pFolder;
1154 PCUITEMID_CHILD pidlChild;
1155 if (FAILED_UNEXPECTEDLY(hr = GetFSFolderAndChild(pidl, &pFolder, &pidlChild)))
1156 return hr;
1157 return pFolder->GetDisplayNameOf(pidlChild, dwFlags, pName);
1158}
static LPSTR pName
Definition: security.c:86
_In_ LPWSTR _In_ DWORD _In_ DWORD _In_ DWORD dwFlags
Definition: netsh.h:141

Referenced by GetDetailsOf().

◆ GetFSFolder2AndChild()

HRESULT CFindFolder::GetFSFolder2AndChild ( LPCITEMIDLIST  pidl,
IShellFolder2 **  ppSF,
PCUITEMID_CHILD ppidlLast = NULL 
)
private

Definition at line 231 of file CFindFolder.cpp.

232{
234 HRESULT hr = GetFSFolderAndChild(pidl, &pSF1, ppidlLast);
235 if (SUCCEEDED(hr))
236 hr = pSF1->QueryInterface(IID_PPV_ARG(IShellFolder2, ppSF));
237 return hr;
238}

Referenced by GetDetailsEx(), and GetDetailsOf().

◆ GetFSFolderAndChild()

HRESULT CFindFolder::GetFSFolderAndChild ( LPCITEMIDLIST  pidl,
IShellFolder **  ppSF,
PCUITEMID_CHILD ppidlLast = NULL 
)
private

Definition at line 215 of file CFindFolder.cpp.

216{
218 PCWSTR path = _ILGetPath(pidl);
219 if (!path || !path[0])
220 return E_INVALIDARG;
221 PIDLIST_ABSOLUTE pidlFolder = ILCreateFromPathW(path); // FIXME: SHELL32_CreateSimpleIDListFromPath(, DIRECTORY);
222 if (!pidlFolder)
223 return E_FAIL;
224 HRESULT hr = m_pSfDesktop->BindToObject(pidlFolder, NULL, IID_PPV_ARG(IShellFolder, ppSF));
225 ILFree(pidlFolder);
226 if (ppidlLast)
227 *ppidlLast = _ILGetFSPidl(pidl);
228 return hr;
229}
CComPtr< IShellFolder2 > m_pSfDesktop
Definition: CFindFolder.h:72
LPITEMIDLIST WINAPI ILCreateFromPathW(LPCWSTR path)
Definition: pidl.c:1108
const uint16_t * PCWSTR
Definition: typedefs.h:57

Referenced by BindToObject(), GetAttributesOf(), GetDisplayNameOf(), GetFSFolder2AndChild(), GetUIObjectOf(), and SetNameOf().

◆ GetMaxLength()

STDMETHODIMP CFindFolder::GetMaxLength ( LPCWSTR  pszName,
int piMaxNameLen 
)
overrideprivate

Implements IItemNameLimits.

Definition at line 1257 of file CFindFolder.cpp.

1258{
1260 HRESULT hr = m_pisfInner->QueryInterface(IID_PPV_ARG(IItemNameLimits, &pLimits));
1261 return FAILED_UNEXPECTEDLY(hr) ? hr : pLimits->GetMaxLength(pszName, piMaxNameLen);;
1262}

◆ GetUIObjectOf()

STDMETHODIMP CFindFolder::GetUIObjectOf ( HWND  hwndOwner,
UINT  cidl,
PCUITEMID_CHILD_ARRAY  apidl,
REFIID  riid,
UINT prgfInOut,
LPVOID ppvOut 
)
private

Definition at line 1092 of file CFindFolder.cpp.

1094{
1095 HRESULT hr;
1096 if (cidl <= 0)
1097 return E_INVALIDARG;
1098
1099 CComHeapPtr<PCITEMID_CHILD> aFSPidlAlloc;
1100 PCITEMID_CHILD pidlSingleBuffer, *aFSPidl = &pidlSingleBuffer; // Optimize for single item callers
1101 if (cidl != 1)
1102 {
1103 if (riid == IID_IDataObject)
1104 {
1105 if (HDPA hDpa = CreateAbsolutePidlArray(cidl, apidl))
1106 {
1108 ITEMIDLIST pidlRoot = {};
1110 NULL, (IDataObject**)ppvOut);
1111 FreePidlArray(hDpa);
1112 return hr;
1113 }
1114 }
1115
1116 aFSPidlAlloc.Allocate(cidl);
1117 aFSPidl = aFSPidlAlloc;
1118 }
1119 for (UINT i = 0; i < cidl; i++)
1120 {
1121 aFSPidl[i] = _ILGetFSPidl(apidl[i]);
1122 }
1123
1124 if (riid == IID_IContextMenu)
1125 {
1126 // FIXME: Use CDefFolderMenu_Create2(..., AddFSClassKeysToArray())
1128 if (!folderPidl)
1129 return E_OUTOFMEMORY;
1130 CComPtr<IShellFolder> pDesktopFolder;
1131 if (FAILED_UNEXPECTEDLY(hr = SHGetDesktopFolder(&pDesktopFolder)))
1132 return hr;
1133 CComPtr<IShellFolder> pShellFolder;
1134 hr = pDesktopFolder->BindToObject(folderPidl, NULL, IID_PPV_ARG(IShellFolder, &pShellFolder));
1136 return hr;
1137 CComPtr<IContextMenu> pContextMenu;
1138 hr = pShellFolder->GetUIObjectOf(hwndOwner, cidl, aFSPidl, riid, prgfInOut, (void**)&pContextMenu);
1140 return hr;
1141 return CFindFolderContextMenu::Create(m_shellFolderView, cidl, pContextMenu, (IContextMenu **)ppvOut);
1142 }
1143
1144 CComPtr<IShellFolder> pFolder;
1145 if (FAILED_UNEXPECTEDLY(hr = GetFSFolderAndChild(apidl[0], &pFolder)))
1146 return hr;
1147 return pFolder->GetUIObjectOf(hwndOwner, cidl, aFSPidl, riid, prgfInOut, ppvOut);
1148}
HRESULT WINAPI SHGetDesktopFolder(IShellFolder **psf)
HRESULT WINAPI SHCreateFileDataObject(PCIDLIST_ABSOLUTE pidlFolder, UINT cidl, PCUITEMID_CHILD_ARRAY apidl, IDataObject *pDataInner, IDataObject **ppDataObj)
static HRESULT Create(IShellFolderView *pShellFolderView, UINT cidl, IContextMenu *pInnerContextMenu, IContextMenu **pContextMenu)
static int CALLBACK SortItemsForDataObject(void *p1, void *p2, LPARAM lparam)
HDPA CreateAbsolutePidlArray(UINT cidl, PCUITEMID_CHILD_ARRAY apidl)
bool Allocate(_In_ size_t nElements=1)
Definition: atlalloc.h:143
#define E_OUTOFMEMORY
Definition: ddrawi.h:100
BOOL WINAPI DPA_Sort(HDPA hdpa, PFNDPACOMPARE pfnCompare, LPARAM lParam)
Definition: dpa.c:813
const GUID IID_IDataObject
#define DPA_GetPtrPtr(hdpa)
Definition: commctrl.h:4974
const PCUITEMID_CHILD * PCUITEMID_CHILD_ARRAY
Definition: shtypes.idl:71

◆ GetValidCharacters()

STDMETHODIMP CFindFolder::GetValidCharacters ( LPWSTR ppwszValidChars,
LPWSTR ppwszInvalidChars 
)
overrideprivate

Implements IItemNameLimits.

Definition at line 1264 of file CFindFolder.cpp.

1265{
1267 HRESULT hr = m_pisfInner->QueryInterface(IID_PPV_ARG(IItemNameLimits, &pLimits));
1268 return FAILED_UNEXPECTEDLY(hr) ? hr : pLimits->GetValidCharacters(ppwszValidChars, ppwszInvalidChars);
1269}

◆ Initialize()

STDMETHODIMP CFindFolder::Initialize ( PCIDLIST_ABSOLUTE  pidl)
private

Implements IPersistFolder.

Definition at line 1278 of file CFindFolder.cpp.

1279{
1280 if (m_pidl)
1281 return E_UNEXPECTED;
1282 HRESULT hr;
1284 return hr;
1285 if (FAILED(hr = SHILClone(pidl, &m_pidl)))
1286 return hr;
1287 return SHELL32_CoCreateInitSF(m_pidl, NULL, NULL, &CLSID_ShellFSFolder,
1289}
static HRESULT SHELL32_CoCreateInitSF(LPCITEMIDLIST pidlRoot, PERSIST_FOLDER_TARGET_INFO *ppfti, LPCITEMIDLIST pidlChild, const GUID *clsid, REFIID riid, LPVOID *ppvOut)
Definition: CFindFolder.cpp:39
#define E_UNEXPECTED
Definition: winerror.h:3528

◆ MapColumnToSCID()

STDMETHODIMP CFindFolder::MapColumnToSCID ( UINT  iColumn,
SHCOLUMNID pscid 
)
private

Implements IShellFolder2.

Definition at line 867 of file CFindFolder.cpp.

868{
870 return E_NOTIMPL;
871}

◆ MessageSFVCB()

STDMETHODIMP CFindFolder::MessageSFVCB ( UINT  uMsg,
WPARAM  wParam,
LPARAM  lParam 
)
private

Definition at line 1194 of file CFindFolder.cpp.

1195{
1196 switch (uMsg)
1197 {
1198 case SFVM_DEFVIEWMODE:
1199 {
1200 FOLDERVIEWMODE *pViewMode = (FOLDERVIEWMODE *) lParam;
1201 *pViewMode = FVM_DETAILS;
1202 return S_OK;
1203 }
1204 case SFVM_WINDOWCREATED:
1205 {
1206 // Subclass window to receive window messages
1208
1209 // Get shell browser for updating status bar text
1212 return hr;
1213
1214 // Open search bar
1215 CComPtr<IWebBrowser2> pWebBrowser2;
1216 hr = m_shellBrowser->QueryInterface(IID_PPV_ARG(IWebBrowser2, &pWebBrowser2));
1218 return hr;
1219 WCHAR wszGuid[39];
1220 StringFromGUID2(CLSID_FileSearchBand, wszGuid, _countof(wszGuid));
1221 CComVariant searchBar(wszGuid);
1222 return pWebBrowser2->ShowBrowserBar(&searchBar, NULL, NULL);
1223 }
1224 case SFVM_WINDOWCLOSING:
1225 {
1227
1228 // [CORE-20504] LVN_ITEMACTIVATE in the DefView ListView can trigger a navigation that destroys this IShellFolder,
1229 // unsubclass now so we don't get a message after our "this" is dead.
1233 return S_OK;
1234 }
1235 case SFVM_GETCOMMANDDIR:
1236 {
1237 HRESULT hr = E_FAIL;
1239 {
1240 PCUITEMID_CHILD *apidl;
1241 UINT cidl = 0;
1242 if (SUCCEEDED(hr = m_shellFolderView->GetSelectedObjects(&apidl, &cidl)))
1243 {
1244 if (cidl)
1246 LocalFree(apidl);
1247 }
1248 }
1249 return hr;
1250 }
1251 // TODO: SFVM_GETCOLUMNSTREAM
1252 }
1253 return E_NOTIMPL;
1254}
#define SFVM_GETCOMMANDDIR
#define SFVM_WINDOWCLOSING
HWND UnsubclassWindow(BOOL bForce=FALSE)
Definition: atlwin.h:1575
CComPtr< IShellBrowser > m_shellBrowser
Definition: CFindFolder.h:74
INT WINAPI StringFromGUID2(REFGUID guid, LPOLESTR str, INT cmax)
Definition: combase.c:1525
HRESULT WINAPI IUnknown_QueryService(IUnknown *obj, REFGUID sid, REFIID iid, void **out)
Definition: main.c:181
HLOCAL NTAPI LocalFree(HLOCAL hMem)
Definition: heapmem.c:1594
short WCHAR
Definition: pedump.c:58
#define WM_SEARCH_STOP
Definition: shellfind.h:30
#define SID_SShellBrowser
Definition: shlguid.h:128
#define SFVM_DEFVIEWMODE
Definition: shlobj.h:1334
#define SFVM_WINDOWCREATED
Definition: shlobj.h:1324
FOLDERVIEWMODE
Definition: shobjidl.idl:708
@ FVM_DETAILS
Definition: shobjidl.idl:714
STRSAFEAPI StringCchCopyW(STRSAFE_LPWSTR pszDest, size_t cchDest, STRSAFE_LPCWSTR pszSrc)
Definition: strsafe.h:149
uint16_t * PWSTR
Definition: typedefs.h:56
#define SubclassWindow(hwnd, lpfn)
Definition: windowsx.h:542
#define SendMessage
Definition: winuser.h:6009

◆ NotifyConnections()

void CFindFolder::NotifyConnections ( DISPID  id)
private

Definition at line 627 of file CFindFolder.cpp.

628{
629 DISPPARAMS dispatchParams = {0};
630 CComDynamicUnkArray &subscribers =
632 for (IUnknown** pSubscriber = subscribers.begin(); pSubscriber < subscribers.end(); pSubscriber++)
633 {
634 if (!*pSubscriber)
635 continue;
636
637 CComPtr<IDispatch> pDispatch;
638 HRESULT hResult = (*pSubscriber)->QueryInterface(IID_PPV_ARG(IDispatch, &pDispatch));
639 if (!FAILED_UNEXPECTEDLY(hResult))
640 pDispatch->Invoke(id, GUID_NULL, 0, DISPATCH_METHOD, &dispatchParams, NULL, NULL, NULL);
641 }
642}
IUnknown ** end()
Definition: atlcom.h:1128
IUnknown ** begin()
Definition: atlcom.h:1123
#define GUID_NULL
Definition: ks.h:106
struct stdole::DISPPARAMS DISPPARAMS
#define DISPATCH_METHOD
Definition: oleauto.h:1006

◆ ParseDisplayName()

STDMETHODIMP CFindFolder::ParseDisplayName ( HWND  hwndOwner,
LPBC  pbc,
LPOLESTR  lpszDisplayName,
ULONG pchEaten,
PIDLIST_RELATIVE ppidl,
ULONG pdwAttributes 
)
private

Implements IShellFolder.

Definition at line 874 of file CFindFolder.cpp.

876{
878 return E_NOTIMPL;
879}

◆ SearchThreadProc()

DWORD WINAPI CFindFolder::SearchThreadProc ( LPVOID  lpParameter)
staticprivate

Definition at line 595 of file CFindFolder.cpp.

596{
597 _SearchData *data = static_cast<_SearchData*>(lpParameter);
598
600
602
603 data->pFindFolder->NotifyConnections(DISPID_SEARCHSTART);
604
605 UINT uTotalFound = 0;
606 for (LOCATIONITEM *pLocation = data->pPaths; pLocation; pLocation = pLocation->pNext)
607 {
608 uTotalFound += RecursiveFind(pLocation->szPath, data);
609 }
610
611 data->pFindFolder->NotifyConnections(DISPID_SEARCHCOMPLETE);
612
614 status.Format(IDS_SEARCH_FILES_FOUND, uTotalFound);
616 ::SendMessageW(data->hwnd, WM_SEARCH_STOP, 0, 0);
617
618 CloseHandle(data->hStopEvent);
619 delete data;
620
621 if (SUCCEEDED(hrCoInit))
623
624 return 0;
625}
static UINT RecursiveFind(LPCWSTR lpPath, _SearchData *pSearchData)
static void PostUpdate(UINT Msg, LPCWSTR pszText, const _SearchData &Data)
#define IDS_SEARCH_FILES_FOUND
Definition: resource.h:178
HRESULT WINAPI DECLSPEC_HOTPATCH CoInitializeEx(void *reserved, DWORD model)
Definition: combase.c:2803
void WINAPI DECLSPEC_HOTPATCH CoUninitialize(void)
Definition: combase.c:2842
#define CloseHandle
Definition: compat.h:739
BOOL WINAPI SetThreadPriority(IN HANDLE hThread, IN int nPriority)
Definition: thread.c:700
#define DISPID_SEARCHSTART
Definition: exdispid.h:172
#define DISPID_SEARCHCOMPLETE
Definition: exdispid.h:173
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
Definition: gl.h:1950
@ COINIT_MULTITHREADED
Definition: objbase.h:280
#define WM_SEARCH_UPDATE_STATUS
Definition: shellfind.h:32
Definition: ps.c:97
struct tagLOCATIONITEM * pNext
Definition: shellfind.h:37
HANDLE WINAPI GetCurrentThread(void)
Definition: proc.c:1145
#define THREAD_PRIORITY_BELOW_NORMAL
Definition: winbase.h:301
LRESULT WINAPI SendMessageW(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)

Referenced by StartSearch().

◆ SetNameOf()

STDMETHODIMP CFindFolder::SetNameOf ( HWND  hwndOwner,
PCUITEMID_CHILD  pidl,
LPCOLESTR  lpName,
DWORD  dwFlags,
PITEMID_CHILD pPidlOut 
)
private

Implements IShellFolder.

Definition at line 1160 of file CFindFolder.cpp.

1162{
1163 if (!pPidlOut)
1164 return E_INVALIDARG; // Our pidls are special, the caller must get it from us and not from parsing
1165 *pPidlOut = NULL;
1166
1167 HRESULT hr;
1168 CComPtr<IShellFolder> pFolder;
1169 PCUITEMID_CHILD pidlChild;
1170 if (FAILED_UNEXPECTEDLY(hr = GetFSFolderAndChild(pidl, &pFolder, &pidlChild)))
1171 return hr;
1172
1173 PCWSTR pszDir = _ILGetPath(pidl);
1174 PWSTR pszFull = (PWSTR)SHAlloc((wcslen(pszDir) + MAX_PATH) * sizeof(*pszDir));
1175 if (!pszFull)
1176 return E_OUTOFMEMORY;
1177
1178 PITEMID_CHILD pidlRawNew = NULL;
1179 hr = pFolder->SetNameOf(hwndOwner, pidlChild, lpName, dwFlags, &pidlRawNew);
1180 if (SUCCEEDED(hr) && pidlRawNew)
1181 {
1182 WCHAR szFileName[MAX_PATH];
1183 hr = DisplayNameOfW(pFolder, pidlRawNew, SHGDN_FORPARSING | SHGDN_INFOLDER, szFileName, _countof(szFileName));
1184 ILFree(pidlRawNew);
1185 PathCombineW(pszFull, pszDir, szFileName);
1186 if (SUCCEEDED(hr))
1187 hr = ((*pPidlOut = _ILCreate(pszFull)) != NULL) ? S_OK : E_OUTOFMEMORY;
1188 }
1189 SHFree(pszFull);
1190 return hr;
1191}
static HRESULT WINAPI DisplayNameOfW(_In_ IShellFolder *psf, _In_ LPCITEMIDLIST pidl, _In_ DWORD dwFlags, _Out_ LPWSTR pszBuf, _In_ UINT cchBuf)
Definition: CFindFolder.cpp:15
#define MAX_PATH
Definition: compat.h:34
_ACRTIMP size_t __cdecl wcslen(const wchar_t *)
Definition: wcs.c:2988
void WINAPI SHFree(LPVOID pv)
Definition: shellole.c:370
LPVOID WINAPI SHAlloc(SIZE_T len)
Definition: shellole.c:348
#define PathCombineW
Definition: pathcch.h:318
_In_ LPCSTR pszDir
Definition: shellapi.h:609
_In_ LPCSTR lpName
Definition: winbase.h:2519

◆ SortItemsForDataObject()

int CALLBACK CFindFolder::SortItemsForDataObject ( void p1,
void p2,
LPARAM  lparam 
)
staticprivate

Definition at line 1086 of file CFindFolder.cpp.

1087{
1088 // For Delete/Move operations, a subfolder/file needs to come before the parent folder
1089 return ::ILGetSize((LPCITEMIDLIST)p1) - ::ILGetSize((LPCITEMIDLIST)p2);
1090}
UINT WINAPI ILGetSize(LPCITEMIDLIST pidl)
Definition: pidl.c:941
const ITEMIDLIST UNALIGNED * LPCITEMIDLIST
Definition: shtypes.idl:42

Referenced by GetUIObjectOf().

◆ StartSearch()

LRESULT CFindFolder::StartSearch ( UINT  uMsg,
WPARAM  wParam,
LPARAM  lParam,
BOOL bHandled 
)
private

Definition at line 644 of file CFindFolder.cpp.

645{
646 HKEY hkey;
647 DWORD size = sizeof(DWORD);
649 DWORD SearchHiddenValue = 0;
650
651 if (!lParam)
652 return 0;
653
654 // Clear all previous search results
655 UINT uItemIndex;
656 m_shellFolderView->RemoveObject(NULL, &uItemIndex);
657
658 _SearchData* pSearchData = new _SearchData(++m_SearchId);
659 pSearchData->pFindFolder = this;
660 pSearchData->hwnd = m_hWnd;
661
662 SearchStart *pSearchParams = (SearchStart *) lParam;
663 pSearchData->pPaths = pSearchParams->pPaths;
664 pSearchData->szFileName = pSearchParams->szFileName;
665 pSearchData->szQueryA = pSearchParams->szQuery;
666 pSearchData->szQueryW = pSearchParams->szQuery;
667
668 // UTF-16 BE
669 {
670 CStringW utf16 = pSearchData->szQueryW;
671 LPWSTR psz = utf16.GetBuffer();
672 for (SIZE_T i = 0; psz[i]; ++i)
673 {
674 psz[i] = MAKEWORD(HIBYTE(psz[i]), LOBYTE(psz[i]));
675 }
676 utf16.ReleaseBuffer();
677 pSearchData->szQueryU16BE = utf16;
678 }
679
680 // UTF-8
681 {
683 INT cch = WideCharToMultiByte(CP_UTF8, 0, pSearchData->szQueryW, -1, NULL, 0, NULL, NULL);
684 if (cch > 0)
685 {
686 LPSTR psz = utf8.GetBuffer(cch);
687 WideCharToMultiByte(CP_UTF8, 0, pSearchData->szQueryW, -1, psz, cch, NULL, NULL);
688 utf8.ReleaseBuffer();
689 pSearchData->szQueryU8 = utf8;
690 }
691 else
692 {
693 pSearchData->szQueryU8 = pSearchData->szQueryA;
694 }
695 }
696
697 pSearchData->SearchHidden = pSearchParams->SearchHidden;
698 SHFree(pSearchParams);
699
700 TRACE("pSearchParams->SearchHidden is '%d'.\n", pSearchData->SearchHidden);
701
702 if (pSearchData->SearchHidden)
703 SearchHiddenValue = 1;
704 else
705 SearchHiddenValue = 0;
706
707 /* Placing the code to save the changed settings to the registry here has the effect of not saving any changes */
708 /* to the registry unless the user clicks on the "Search" button. This is the same as what we see in Windows. */
709 result = RegOpenKeyEx(HKEY_CURRENT_USER, L"Software\\Microsoft\\Windows\\CurrentVersion\\Explorer", 0, KEY_SET_VALUE, &hkey);
710 if (result == ERROR_SUCCESS)
711 {
712 if (RegSetValueExW(hkey, L"SearchHidden", NULL, REG_DWORD, (const BYTE*)&SearchHiddenValue, size) == ERROR_SUCCESS)
713 {
714 TRACE("SearchHidden is '%d'.\n", SearchHiddenValue);
715 }
716 else
717 {
718 ERR("RegSetValueEx for \"Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\SearchHidden\" Failed.\n");
719 }
720 RegCloseKey(hkey);
721 }
722 else
723 {
724 ERR("RegOpenKey for \"Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\" Failed.\n");
725 }
726
727 if (m_hStopEvent)
730
731 if (!SHCreateThread(SearchThreadProc, pSearchData, 0, NULL))
732 {
733 if (pSearchData->hStopEvent)
734 {
735 CloseHandle(pSearchData->hStopEvent);
737 }
738 delete pSearchData;
739 }
740 return 0;
741}
#define ERR(fmt,...)
Definition: precomp.h:57
#define RegCloseKey(hKey)
Definition: registry.h:49
void ReleaseBuffer(_In_ int nNewLength=-1)
Definition: atlsimpstr.h:387
HWND m_hWnd
Definition: atlwin.h:273
static DWORD WINAPI SearchThreadProc(LPVOID lpParameter)
#define ERROR_SUCCESS
Definition: deptool.c:10
#define TRUE
Definition: types.h:120
#define FALSE
Definition: types.h:117
LONG WINAPI RegSetValueExW(_In_ HKEY hKey, _In_ LPCWSTR lpValueName, _In_ DWORD Reserved, _In_ DWORD dwType, _In_ CONST BYTE *lpData, _In_ DWORD cbData)
Definition: reg.c:4882
#define WideCharToMultiByte
Definition: compat.h:111
BOOL WINAPI SHCreateThread(LPTHREAD_START_ROUTINE thread_proc, void *data, DWORD flags, LPTHREAD_START_ROUTINE callback)
Definition: main.c:1628
#define L(x)
Definition: resources.c:13
unsigned long DWORD
Definition: ntddk_ex.h:95
GLsizeiptr size
Definition: glext.h:5919
GLuint64EXT * result
Definition: glext.h:11304
#define LOBYTE(W)
Definition: jmemdos.c:487
#define HIBYTE(W)
Definition: jmemdos.c:486
#define DWORD
Definition: nt_native.h:44
#define KEY_SET_VALUE
Definition: nt_native.h:1020
#define REG_DWORD
Definition: sdbapi.c:615
#define CP_UTF8
Definition: nls.h:20
_In_ UINT _In_ UINT cch
Definition: shellapi.h:432
#define TRACE(s)
Definition: solgame.cpp:4
WCHAR szFileName[MAX_PATH]
Definition: shellfind.h:54
LOCATIONITEM * pPaths
Definition: shellfind.h:53
BOOL SearchHidden
Definition: shellfind.h:56
WCHAR szQuery[MAX_PATH]
Definition: shellfind.h:55
CStringA szQueryA
CStringW szQueryW
CStringW szFileName
CStringW szQueryU16BE
LOCATIONITEM * pPaths
HANDLE hStopEvent
CStringA szQueryU8
CComPtr< CFindFolder > pFindFolder
BOOL WINAPI DECLSPEC_HOTPATCH SetEvent(IN HANDLE hEvent)
Definition: synch.c:669
#define MAKEWORD(a, b)
Definition: typedefs.h:248
ULONG_PTR SIZE_T
Definition: typedefs.h:80
char * LPSTR
Definition: typedefs.h:51
int32_t INT
Definition: typedefs.h:58
#define CreateEvent
Definition: winbase.h:3469
#define HKEY_CURRENT_USER
Definition: winreg.h:11
#define RegOpenKeyEx
Definition: winreg.h:552
unsigned char BYTE
Definition: xxhash.c:193

◆ StopSearch()

LRESULT CFindFolder::StopSearch ( UINT  uMsg,
WPARAM  wParam,
LPARAM  lParam,
BOOL bHandled 
)
private

Definition at line 743 of file CFindFolder.cpp.

744{
745 if (m_hStopEvent)
746 {
749
750 // Wait for all in-flight messages with data we need to free
753 {
754 if (msg.message == WM_SEARCH_STOPPED)
755 break;
756 if (msg.message == WM_SEARCH_ADD_RESULT || msg.message == WM_SEARCH_UPDATE_STATUS)
757 SHFree((void*)msg.lParam);
758 }
759 }
760 return 0;
761}
#define msg(x)
Definition: auth_time.c:54
#define WM_SEARCH_ADD_RESULT
Definition: shellfind.h:31
#define WM_SEARCH_STOPPED
Definition: shellfind.h:33
#define WM_SEARCH_START
Definition: shellfind.h:29
TW_UINT32 TW_UINT16 TW_UINT16 MSG
Definition: twain.h:1829
BOOL WINAPI PostMessageW(_In_opt_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
BOOL WINAPI PeekMessageW(_Out_ LPMSG, _In_opt_ HWND, _In_ UINT, _In_ UINT, _In_ UINT)
#define PM_REMOVE
Definition: winuser.h:1207

◆ UpdateStatus()

LRESULT CFindFolder::UpdateStatus ( UINT  uMsg,
WPARAM  wParam,
LPARAM  lParam,
BOOL bHandled 
)
private

Definition at line 782 of file CFindFolder.cpp.

783{
786 m_shellBrowser->SetStatusTextSB(status);
787 return 0;
788}

Member Data Documentation

◆ m_hStopEvent

HANDLE CFindFolder::m_hStopEvent
private

Definition at line 75 of file CFindFolder.h.

Referenced by StartSearch(), and StopSearch().

◆ m_pidl

LPITEMIDLIST CFindFolder::m_pidl
private

Definition at line 71 of file CFindFolder.h.

Referenced by GetCurFolder(), and Initialize().

◆ m_pisfInner

CComPtr<IShellFolder2> CFindFolder::m_pisfInner
private

◆ m_pSfDesktop

CComPtr<IShellFolder2> CFindFolder::m_pSfDesktop
private

Definition at line 72 of file CFindFolder.h.

Referenced by GetFSFolderAndChild(), and Initialize().

◆ m_SearchId

UINT CFindFolder::m_SearchId = 0
private

Definition at line 76 of file CFindFolder.h.

Referenced by AddResult(), StartSearch(), and UpdateStatus().

◆ m_shellBrowser

CComPtr<IShellBrowser> CFindFolder::m_shellBrowser
private

Definition at line 74 of file CFindFolder.h.

Referenced by MessageSFVCB(), and UpdateStatus().

◆ m_shellFolderView

CComPtr<IShellFolderView> CFindFolder::m_shellFolderView
private

Definition at line 73 of file CFindFolder.h.

Referenced by AddResult(), CreateViewObject(), GetUIObjectOf(), MessageSFVCB(), and StartSearch().


The documentation for this class was generated from the following files: