29 ppf3->InitializeEx(
NULL, pidlAbsolute, ppfti);
33 ppf->Initialize(pidlAbsolute);
37 return pShellFolder->QueryInterface(
riid, ppvOut);
65 ERR(
"failed to load string %p\n", dwTypeData);
104 ERR(
"Failed to create pidl from path\n");
110 int cbData =
sizeof(
WORD) + pathLen + lpLastFSPidl->mkid.cb;
116 *((
WORD *)
p) = cbData;
120 p += pathLen -
sizeof(
WCHAR);
124 memcpy(
p, lpLastFSPidl, lpLastFSPidl->mkid.cb);
125 p += lpLastFSPidl->mkid.cb;
134 if (!pidl || !pidl->mkid.cb)
136 return (
LPCWSTR) pidl->mkid.abID;
141 if (!pidl || !pidl->mkid.cb)
161template<
typename TChar,
typename TString,
int (&StrNCmp)(const TChar *, const TChar *,
size_t)>
164 if (!lpFirst || lpSrch.IsEmpty() || !
cchMax)
169 if (!
StrNCmp(lpFirst, lpSrch, lpSrch.GetLength()))
170 return (
const TChar*)lpFirst;
179 return StrStrN<CHAR, CStringA, _strnicmp>(lpFirst, lpSrch,
cchMax) !=
NULL;
185 return StrStrN<WCHAR, CStringW, _wcsnicmp>(lpFirst, lpSrch,
cchMax) !=
NULL;
218 if ((
BufferSize >= 2) && (pBytes[0] == 0xFF) && (pBytes[1] == 0xFE))
223 else if ((
BufferSize >= 2) && (pBytes[0] == 0xFE) && (pBytes[1] == 0xFF))
228 else if ((
BufferSize >= 3) && (pBytes[0] == 0xEF) && (pBytes[1] == 0xBB) && (pBytes[2] == 0xBF))
247#define IS_TEXT_UNKNOWN_FLAGS_MASK ((7 << 13) | (1 << 11))
410 UINT uTotalFound = 0;
418#define IS_DOTS(psz) ((psz)[0] == L'.' && ((psz)[1] == 0 || ((psz)[1] == L'.' && (psz)[2] == 0)))
419 if (
IS_DOTS(FindData.cFileName))
490 DISPPARAMS dispatchParams = {0};
493 for (
IUnknown** pSubscriber = subscribers.
begin(); pSubscriber < subscribers.
end(); pSubscriber++)
510 DWORD SearchHiddenValue = 0;
564 SearchHiddenValue = 1;
566 SearchHiddenValue = 0;
575 TRACE(
"SearchHidden is '%d'.\n", SearchHiddenValue);
579 ERR(
"RegSetValueEx for \"Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\SearchHidden\" Failed.\n");
585 ERR(
"RegOpenKey for \"Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\" Failed.\n");
695 return SHSetStrRet(&pDetails->
str,
"");
717 *ppEnumIDList =
NULL;
753 if (
riid == IID_IShellView)
757 sfvparams.
pshf =
this;
774 for (
UINT i = 0;
i < cidl;
i++)
779 return m_pisfInner->GetAttributesOf(cidl, aFSPidl, rgfInOut);
797 return m_pInner->QueryContextMenu(hMenu, indexMenu, idCmdFirst, idCmdLast,
uFlags);
804 return m_pInner->InvokeCommand(lpcmi);
815 for (
UINT i = 0;
i < cidl;
i++)
835 return m_pInner->GetCommandString(idCommand,
uFlags, lpReserved, lpszName, uMaxNameLen);
845 pObj->m_shellFolderView = pShellFolderView;
846 pObj->m_pInner = pInnerContextMenu;
860 return m_pisfInner->GetUIObjectOf(hwndOwner, cidl, apidl,
riid, prgfInOut, ppvOut);
865 for (
UINT i = 0;
i < cidl;
i++)
870 if (
riid == IID_IContextMenu)
884 hResult = pShellFolder->GetUIObjectOf(hwndOwner, cidl, aFSPidl,
riid, prgfInOut, (
LPVOID *)&pContextMenu);
890 return m_pisfInner->GetUIObjectOf(hwndOwner, cidl, aFSPidl,
riid, prgfInOut, ppvOut);
938 return pWebBrowser2->ShowBrowserBar(&searchBar,
NULL,
NULL);
977 &CLSID_ShellFSFolder,
984 if (pClassId ==
NULL)
986 *pClassId = CLSID_FindFolder;
HRESULT WINAPI SHCreateShellFolderView(const SFV_CREATE *pcsfv, IShellView **ppsv)
HRESULT WINAPI SHGetDesktopFolder(IShellFolder **psf)
static HRESULT SHELL32_CoCreateInitSF(LPCITEMIDLIST pidlRoot, PERSIST_FOLDER_TARGET_INFO *ppfti, LPCITEMIDLIST pidlChild, const GUID *clsid, REFIID riid, LPVOID *ppvOut)
static BOOL StrFindNIW(const WCHAR *lpFirst, const CStringW &lpSrch, UINT cchMax)
static const TChar * StrStrN(const TChar *lpFirst, const TString &lpSrch, UINT cchMax)
static BOOL AttribHiddenMatch(DWORD FileAttributes, _SearchData *pSearchData)
static void WINAPI _InsertMenuItemW(HMENU hMenu, UINT indexMenu, BOOL fByPosition, UINT wID, UINT fType, LPCWSTR dwTypeData, UINT fState)
static BOOL SearchFile(LPCWSTR lpFilePath, _SearchData *pSearchData)
static BOOL FileNameMatch(LPCWSTR FindDataFileName, _SearchData *pSearchData)
#define IS_TEXT_UNKNOWN_FLAGS_MASK
static BOOL ContentsMatch(LPCWSTR szPath, _SearchData *pSearchData)
static LPITEMIDLIST _ILCreate(LPCWSTR lpszPath)
static FolderViewColumns g_ColumnDefs[]
static UINT RecursiveFind(LPCWSTR lpPath, _SearchData *pSearchData)
static BOOL IsDataUnicode(IN PVOID Buffer, IN DWORD BufferSize, OUT ENCODING *Encoding OPTIONAL, OUT PDWORD SkipBytes OPTIONAL)
static BOOL StrFindNIA(const CHAR *lpFirst, const CStringA &lpSrch, UINT cchMax)
static LPCWSTR _ILGetPath(LPCITEMIDLIST pidl)
static LPCITEMIDLIST _ILGetFSPidl(LPCITEMIDLIST pidl)
static FolderViewColumns g_ColumnDefs[]
#define SFVM_GETCOMMANDDIR
#define WINE_DEFAULT_DEBUG_CHANNEL(t)
#define RegCloseKey(hKey)
static HRESULT WINAPI CreateInstance(CComObject< Base > **pp)
STDMETHOD() QueryInterface(REFIID iid, void **ppvObject)
bool IsEmpty() const noexcept
void ReleaseBuffer(_In_ int nNewLength=-1)
STDMETHODIMP GetDisplayNameOf(PCUITEMID_CHILD pidl, DWORD dwFlags, LPSTRRET pName)
LRESULT StartSearch(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
STDMETHODIMP GetClassID(CLSID *pClassId)
CComPtr< IShellFolder2 > m_pisfInner
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
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)
STDMETHODIMP Initialize(PCIDLIST_ABSOLUTE pidl)
STDMETHODIMP ParseDisplayName(HWND hwndOwner, LPBC pbc, LPOLESTR lpszDisplayName, ULONG *pchEaten, PIDLIST_RELATIVE *ppidl, ULONG *pdwAttributes)
void NotifyConnections(DISPID id)
STDMETHODIMP BindToStorage(PCUIDLIST_RELATIVE pidl, LPBC pbcReserved, REFIID riid, LPVOID *ppvOut)
STDMETHODIMP GetDefaultSearchGUID(GUID *pguid)
STDMETHODIMP CreateViewObject(HWND hwndOwner, REFIID riid, LPVOID *ppvOut)
CComPtr< IShellBrowser > m_shellBrowser
STDMETHODIMP GetDefaultColumnState(UINT iColumn, DWORD *pcsFlags)
STDMETHODIMP GetUIObjectOf(HWND hwndOwner, UINT cidl, PCUITEMID_CHILD_ARRAY apidl, REFIID riid, UINT *prgfInOut, LPVOID *ppvOut)
bool Allocate(_In_ size_t nElements=1)
BOOL WINAPI IsTextUnicode(IN CONST VOID *lpv, IN INT iSize, IN OUT LPINT lpiResult OPTIONAL)
LONG WINAPI RegSetValueExW(_In_ HKEY hKey, _In_ LPCWSTR lpValueName, _In_ DWORD Reserved, _In_ DWORD dwType, _In_ CONST BYTE *lpData, _In_ DWORD cbData)
#define IDS_COL_RELEVANCE
#define IDS_SEARCH_OPEN_FOLDER
#define COL_RELEVANCE_INDEX
#define IDS_SEARCH_FOLDER
#define COL_LOCATION_INDEX
#define IDS_SEARCH_FILES_FOUND
#define INVALID_HANDLE_VALUE
#define CreateFileMappingW(a, b, c, d, e, f)
#define WideCharToMultiByte
#define FAILED_UNEXPECTEDLY(hr)
DWORD WINAPI GetFileSize(HANDLE hFile, LPDWORD lpFileSizeHigh)
HANDLE WINAPI FindFirstFileW(IN LPCWSTR lpFileName, OUT LPWIN32_FIND_DATAW lpFindFileData)
BOOL WINAPI FindClose(HANDLE hFindFile)
BOOL WINAPI FindNextFileW(IN HANDLE hFindFile, OUT LPWIN32_FIND_DATAW lpFindFileData)
HRESULT WINAPI DECLSPEC_HOTPATCH CoInitializeEx(LPVOID lpReserved, DWORD dwCoInit)
void WINAPI DECLSPEC_HOTPATCH CoUninitialize(void)
INT WINAPI StringFromGUID2(REFGUID id, LPOLESTR str, INT cmax)
void WINAPI SHFree(LPVOID pv)
LPVOID WINAPI SHAlloc(SIZE_T len)
HRESULT WINAPI SHCoCreateInstance(LPCWSTR aclsid, const CLSID *clsid, LPUNKNOWN pUnkOuter, REFIID refiid, LPVOID *ppv)
LPWSTR WINAPI PathFindFileNameW(LPCWSTR lpszPath)
BOOL WINAPI PathMatchSpecW(LPCWSTR lpszPath, LPCWSTR lpszMask)
HRESULT WINAPI SHStrDupW(LPCWSTR src, LPWSTR *dest)
int WINAPI StrCmpW(LPCWSTR lpszStr, LPCWSTR lpszComp)
BOOL WINAPI SHCreateThread(LPTHREAD_START_ROUTINE pfnThreadProc, VOID *pData, DWORD dwFlags, LPTHREAD_START_ROUTINE pfnCallback)
#define DISPID_SEARCHSTART
#define DISPID_SEARCHCOMPLETE
_Must_inspect_result_ _In_opt_ PFLT_INSTANCE _Out_ PHANDLE _In_ ACCESS_MASK _In_ POBJECT_ATTRIBUTES _Out_ PIO_STATUS_BLOCK _In_opt_ PLARGE_INTEGER _In_ ULONG FileAttributes
LPITEMIDLIST _ILCreate(LPCWSTR lpString, ULONG Index)
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
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
HLOCAL NTAPI LocalFree(HLOCAL hMem)
_CRTIMP size_t __cdecl wcslen(_In_z_ const wchar_t *_Str)
HRESULT QueryInterface([in] REFIID riid, [out, iid_is(riid)] void **ppvObject)
#define COM_INTERFACE_ENTRY_IID(iid, x)
#define memcpy(s1, s2, n)
static DWORD DWORD void LPSTR DWORD cch
static const CLSID *static CLSID *static const GUID VARIANT VARIANT *static IServiceProvider DWORD *static HMENU
static VARIANTARG static DISPID
unsigned __int3264 UINT_PTR
#define FILE_ATTRIBUTE_READONLY
#define FILE_ATTRIBUTE_HIDDEN
#define FILE_ATTRIBUTE_DIRECTORY
interface IBindCtx * LPBC
LPITEMIDLIST WINAPI ILClone(LPCITEMIDLIST pidl)
void WINAPI ILFree(LPITEMIDLIST pidl)
LPITEMIDLIST WINAPI ILFindLastID(LPCITEMIDLIST pidl)
LPITEMIDLIST WINAPI ILCombine(LPCITEMIDLIST pidl1, LPCITEMIDLIST pidl2)
LPITEMIDLIST WINAPI ILCreateFromPathW(LPCWSTR path)
#define WM_SEARCH_ADD_RESULT
#define WM_SEARCH_UPDATE_STATUS
#define MAKE_COMPARE_HRESULT(x)
EXTERN_C HRESULT WINAPI SHOpenFolderAndSelectItems(PCIDLIST_ABSOLUTE pidlFolder, UINT cidl, PCUITEMID_CHILD_ARRAY apidl, DWORD dwFlags)
#define SID_SShellBrowser
#define SFVM_WINDOWCREATED
struct _SFV_CREATE SFV_CREATE
ITEMIDLIST UNALIGNED * LPITEMIDLIST
const PCUITEMID_CHILD * PCUITEMID_CHILD_ARRAY
const ITEMID_CHILD UNALIGNED * PCUITEMID_CHILD
const ITEMIDLIST_RELATIVE UNALIGNED * PCUIDLIST_RELATIVE
const ITEMIDLIST UNALIGNED * LPCITEMIDLIST
PULONG MinorVersion OPTIONAL
STRSAFEAPI StringCchCopyW(STRSAFE_LPWSTR pszDest, size_t cchDest, STRSAFE_LPCWSTR pszSrc)
WCHAR szFileName[MAX_PATH]
IShellFolderViewCB * psfvcb
CComPtr< CFindFolder > pFindFolder
DWORD WINAPI WaitForSingleObject(IN HANDLE hHandle, IN DWORD dwMilliseconds)
BOOL WINAPI DECLSPEC_HOTPATCH SetEvent(IN HANDLE hEvent)
_In_ WDFMEMORY _Out_opt_ size_t * BufferSize
#define INVALID_FILE_SIZE
_In_ PCCERT_CONTEXT _In_ DWORD dwFlags
#define SubclassWindow(hwnd, lpfn)
#define IS_TEXT_UNICODE_ILLEGAL_CHARS
#define IS_TEXT_UNICODE_UNICODE_MASK
#define IS_TEXT_UNICODE_NOT_ASCII_MASK
#define IS_TEXT_UNICODE_NULL_BYTES
#define IS_TEXT_UNICODE_REVERSE_MASK
#define IS_TEXT_UNICODE_REVERSE_SIGNATURE
#define IS_TEXT_UNICODE_NOT_UNICODE_MASK
#define IS_TEXT_UNICODE_SIGNATURE
#define HKEY_CURRENT_USER
BOOL WINAPI PostMessageW(_In_opt_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
int WINAPI LoadStringW(_In_opt_ HINSTANCE hInstance, _In_ UINT uID, _Out_writes_to_(cchBufferMax, return+1) LPWSTR lpBuffer, _In_ int cchBufferMax)
#define IS_INTRESOURCE(i)
#define MAKEINTRESOURCEW(i)
LRESULT WINAPI SendMessageW(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
BOOL WINAPI InsertMenuItemW(_In_ HMENU, _In_ UINT, _In_ BOOL, _In_ LPCMENUITEMINFOW)
_Must_inspect_result_ _In_ PHYSICAL_ADDRESS _In_ PHYSICAL_ADDRESS SkipBytes
#define IID_PPV_ARG(Itype, ppType)