ReactOS 0.4.16-dev-1020-gf135cab
shellfind.h File Reference
#include <windef.h>
#include <winbase.h>
#include <shlobj.h>
#include <shlobj_undoc.h>
#include <shlguid_undoc.h>
#include <shdeprecated.h>
#include <tchar.h>
#include <atlbase.h>
#include <atlcom.h>
#include <atlwin.h>
#include <atlsimpcoll.h>
#include <atlstr.h>
#include <shlwapi.h>
#include <shlwapi_undoc.h>
#include <undocshell.h>
#include <shellutils.h>
#include <strsafe.h>
#include <wine/debug.h>
#include "../resource.h"
Include dependency graph for shellfind.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  tagLOCATIONITEM
 
struct  ScopedFreeLocationItems
 
struct  SearchStart
 

Macros

#define WIN32_NO_STATUS
 
#define _INC_WINDOWS
 
#define COM_NO_WINDOWS_H
 
#define WM_SEARCH_START   WM_USER + 0
 
#define WM_SEARCH_STOP   WM_USER + 1
 
#define WM_SEARCH_ADD_RESULT   WM_USER + 2
 
#define WM_SEARCH_UPDATE_STATUS   WM_USER + 3
 

Typedefs

typedef struct tagLOCATIONITEM LOCATIONITEM
 

Functions

void FreeList (LOCATIONITEM *pLI)
 
template<class T , class F , class R >
static INT_PTR FindItemInComboEx (HWND hCombo, T &FindItem, F CompareFunc, R RetMatch)
 
static bool PathIsOnDrive (PCWSTR Path)
 
static BOOL PathIsOnUnc (PCWSTR Path)
 
static bool PathIsAbsolute (PCWSTR Path)
 

Macro Definition Documentation

◆ _INC_WINDOWS

#define _INC_WINDOWS

Definition at line 5 of file shellfind.h.

◆ COM_NO_WINDOWS_H

#define COM_NO_WINDOWS_H

Definition at line 6 of file shellfind.h.

◆ WIN32_NO_STATUS

#define WIN32_NO_STATUS

Definition at line 4 of file shellfind.h.

◆ WM_SEARCH_ADD_RESULT

#define WM_SEARCH_ADD_RESULT   WM_USER + 2

Definition at line 31 of file shellfind.h.

◆ WM_SEARCH_START

#define WM_SEARCH_START   WM_USER + 0

Definition at line 29 of file shellfind.h.

◆ WM_SEARCH_STOP

#define WM_SEARCH_STOP   WM_USER + 1

Definition at line 30 of file shellfind.h.

◆ WM_SEARCH_UPDATE_STATUS

#define WM_SEARCH_UPDATE_STATUS   WM_USER + 3

Definition at line 32 of file shellfind.h.

Typedef Documentation

◆ LOCATIONITEM

Function Documentation

◆ FindItemInComboEx()

template<class T , class F , class R >
static INT_PTR FindItemInComboEx ( HWND  hCombo,
T FindItem,
F  CompareFunc,
R  RetMatch 
)
static

Definition at line 59 of file shellfind.h.

60{
62 item.mask = CBEIF_LPARAM;
63 item.cchTextMax = 0;
64 for (item.iItem = 0; SendMessageW(hCombo, CBEM_GETITEMW, 0, (LPARAM)&item); item.iItem++)
65 {
66 if (CompareFunc((T&)item.lParam, FindItem) == RetMatch)
67 return item.iItem;
68 }
69 return -1;
70}
static INT CALLBACK CompareFunc(LPARAM lParam1, LPARAM lParam2, LPARAM lParamSort)
Definition: mainwnd.c:243
static ATOM item
Definition: dde.c:856
#define CBEM_GETITEMW
Definition: commctrl.h:3848
#define CBEIF_LPARAM
Definition: commctrl.h:3796
LONG_PTR LPARAM
Definition: windef.h:208
LRESULT WINAPI SendMessageW(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)

Referenced by CSearchBar::Invoke(), and CSearchBar::OnLocationEditChange().

◆ FreeList()

void FreeList ( LOCATIONITEM pLI)

Definition at line 95 of file CSearchBar.cpp.

96{
97 while (pItems)
98 {
99 LOCATIONITEM *pNext = pItems->pNext;
101 pItems = pNext;
102 }
103}
VOID WINAPI CoTaskMemFree(LPVOID ptr)
Definition: ifs.c:442
static int int const SCRIPT_CONTROL const SCRIPT_STATE SCRIPT_ITEM * pItems
Definition: usp10.c:62

Referenced by BuildLocationList(), CcPurgeCacheSection(), CcRosTrimCache(), NdisDprFreePacketNonInterlocked(), RtlAllocateHeap(), RtlpAllocateNonDedicated(), RtlpInsertFreeBlockHelper(), RtlpRemoveFreeBlock(), RtlpValidateHeap(), _SearchData::~_SearchData(), and ScopedFreeLocationItems::~ScopedFreeLocationItems().

◆ PathIsAbsolute()

static bool PathIsAbsolute ( PCWSTR  Path)
inlinestatic

Definition at line 82 of file shellfind.h.

83{
84 // Note: PathIsRelativeW is too forgiving
86}
PRTL_UNICODE_STRING_BUFFER Path
static bool PathIsOnDrive(PCWSTR Path)
Definition: shellfind.h:72
static BOOL PathIsOnUnc(PCWSTR Path)
Definition: shellfind.h:77

Referenced by CSearchBar::GetAddressEditBoxLocations().

◆ PathIsOnDrive()

static bool PathIsOnDrive ( PCWSTR  Path)
inlinestatic

Definition at line 72 of file shellfind.h.

73{
74 return PathGetDriveNumberW(Path) >= 0 && (Path[2] == '\\' || !Path[2]);
75}
int WINAPI PathGetDriveNumberW(const WCHAR *path)
Definition: path.c:553

Referenced by PathIsAbsolute().

◆ PathIsOnUnc()

static BOOL PathIsOnUnc ( PCWSTR  Path)
inlinestatic

Definition at line 77 of file shellfind.h.

78{
79 return PathIsUNCW(Path); // FIXME: Verify the path starts with <\\Server\Share>[\]
80}
BOOL WINAPI PathIsUNCW(LPCWSTR lpszPath)
Definition: path.c:2272

Referenced by PathIsAbsolute().