ReactOS
0.4.16-dev-1097-g530d26a
Toggle main menu visibility
Main Page
Related Pages
Modules
Namespaces
Namespace List
Namespace Members
All
_
a
b
c
d
e
f
g
h
i
l
m
n
o
p
r
s
t
u
v
w
x
Functions
_
a
b
c
d
e
f
g
h
i
l
m
o
p
r
s
t
u
v
w
Variables
_
c
d
e
f
g
h
i
l
m
n
o
p
s
t
u
x
Typedefs
_
a
b
c
d
e
f
g
h
i
l
m
o
p
r
s
t
u
v
w
x
Enumerations
_
a
b
c
d
f
i
l
m
o
p
s
t
w
x
Enumerator
a
b
c
d
e
f
g
h
i
m
n
o
p
r
s
t
u
v
w
x
Classes
Class List
Class Index
Class Hierarchy
Class Members
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Enumerations
_
a
b
c
d
e
f
h
i
k
l
m
n
o
p
r
s
t
u
v
w
z
Enumerator
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Properties
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
Related Functions
_
a
b
c
d
e
f
g
h
i
l
m
n
o
p
q
r
s
t
v
x
Files
File List
File Members
All
$
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Functions
$
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Variables
$
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Enumerations
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Enumerator
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Macros
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Examples
shellfind.h
Go to the documentation of this file.
1
#ifndef _SHELLFIND_PCH_
2
#define _SHELLFIND_PCH_
3
4
#define WIN32_NO_STATUS
5
#define _INC_WINDOWS
6
#define COM_NO_WINDOWS_H
7
8
#include <
windef.h
>
9
#include <
winbase.h
>
10
#include <
shlobj.h
>
11
#include <
shlobj_undoc.h
>
12
#include <
shlguid_undoc.h
>
13
#include <shdeprecated.h>
14
#include <tchar.h>
15
#include <atlbase.h>
16
#include <atlcom.h>
17
#include <atlwin.h>
18
#include <
atlsimpcoll.h
>
19
#include <
atlstr.h
>
20
#include <
shlwapi.h
>
21
#include <
shlwapi_undoc.h
>
22
#include <
undocshell.h
>
23
#include <
shellutils.h
>
24
#include <
strsafe.h
>
25
#include <
wine/debug.h
>
26
27
#include "../resource.h"
28
29
#define WM_SEARCH_START WM_USER + 0
30
#define WM_SEARCH_STOP WM_USER + 1
31
#define WM_SEARCH_ADD_RESULT WM_USER + 2
32
#define WM_SEARCH_UPDATE_STATUS WM_USER + 3
33
34
typedef
struct
tagLOCATIONITEM
35
{
36
struct
tagLOCATIONITEM
*
pNext
;
37
WCHAR
szPath
[
ANYSIZE_ARRAY
];
38
}
LOCATIONITEM
;
39
40
void
FreeList
(
LOCATIONITEM
*pLI);
41
42
struct
ScopedFreeLocationItems
43
{
44
LOCATIONITEM
*
m_ptr
;
45
ScopedFreeLocationItems
(
LOCATIONITEM
*
ptr
) :
m_ptr
(
ptr
) {}
46
~ScopedFreeLocationItems
() {
FreeList
(
m_ptr
); }
47
void
Detach
() {
m_ptr
=
NULL
; }
48
};
49
50
struct
SearchStart
51
{
52
LOCATIONITEM
*
pPaths
;
53
WCHAR
szFileName
[
MAX_PATH
];
54
WCHAR
szQuery
[
MAX_PATH
];
55
BOOL
SearchHidden
;
56
};
57
58
template
<
class
T,
class
F,
class
R>
59
static
INT_PTR
FindItemInComboEx
(
HWND
hCombo, T &FindItem,
F
CompareFunc
,
R
RetMatch)
60
{
61
COMBOBOXEXITEMW
item
;
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
}
71
72
static
inline
bool
PathIsOnDrive
(
PCWSTR
Path
)
73
{
74
return
PathGetDriveNumberW
(
Path
) >= 0 && (
Path
[2] ==
'\\'
|| !
Path
[2]);
75
}
76
77
static
inline
BOOL
PathIsOnUnc
(
PCWSTR
Path
)
78
{
79
return
PathIsUNCW
(
Path
);
// FIXME: Verify the path starts with <\\Server\Share>[\]
80
}
81
82
static
inline
bool
PathIsAbsolute
(
PCWSTR
Path
)
83
{
84
// Note: PathIsRelativeW is too forgiving
85
return
PathIsOnDrive
(
Path
) ||
PathIsOnUnc
(
Path
);
86
}
87
88
#endif
/* _SHELLFIND_PCH_ */
Path
PRTL_UNICODE_STRING_BUFFER Path
Definition:
RtlNtPathNameToDosPathName.c:10
atlsimpcoll.h
atlstr.h
CompareFunc
static INT CALLBACK CompareFunc(LPARAM lParam1, LPARAM lParam2, LPARAM lParamSort)
Definition:
mainwnd.c:243
NULL
#define NULL
Definition:
types.h:112
MAX_PATH
#define MAX_PATH
Definition:
compat.h:34
PathGetDriveNumberW
int WINAPI PathGetDriveNumberW(const WCHAR *path)
Definition:
path.c:553
PathIsUNCW
BOOL WINAPI PathIsUNCW(LPCWSTR lpszPath)
Definition:
path.c:2272
BOOL
unsigned int BOOL
Definition:
ntddk_ex.h:94
void
Definition:
nsiface.idl:2307
T
#define T
Definition:
mbstring.h:31
ptr
static PVOID ptr
Definition:
dispmode.c:27
item
static ATOM item
Definition:
dde.c:856
CBEM_GETITEMW
#define CBEM_GETITEMW
Definition:
commctrl.h:3848
CBEIF_LPARAM
#define CBEIF_LPARAM
Definition:
commctrl.h:3796
debug.h
F
#define F(x, y, z)
Definition:
md5.c:51
R
#define R(b, x)
Definition:
sha2.c:134
PathIsAbsolute
static bool PathIsAbsolute(PCWSTR Path)
Definition:
shellfind.h:82
PathIsOnDrive
static bool PathIsOnDrive(PCWSTR Path)
Definition:
shellfind.h:72
PathIsOnUnc
static BOOL PathIsOnUnc(PCWSTR Path)
Definition:
shellfind.h:77
FreeList
void FreeList(LOCATIONITEM *pLI)
Definition:
CSearchBar.cpp:95
LOCATIONITEM
struct tagLOCATIONITEM LOCATIONITEM
FindItemInComboEx
static INT_PTR FindItemInComboEx(HWND hCombo, T &FindItem, F CompareFunc, R RetMatch)
Definition:
shellfind.h:59
shellutils.h
shlguid_undoc.h
shlobj.h
shlobj_undoc.h
shlwapi.h
shlwapi_undoc.h
strsafe.h
ScopedFreeLocationItems
Definition:
shellfind.h:43
ScopedFreeLocationItems::m_ptr
LOCATIONITEM * m_ptr
Definition:
shellfind.h:44
ScopedFreeLocationItems::Detach
void Detach()
Definition:
shellfind.h:47
ScopedFreeLocationItems::ScopedFreeLocationItems
ScopedFreeLocationItems(LOCATIONITEM *ptr)
Definition:
shellfind.h:45
ScopedFreeLocationItems::~ScopedFreeLocationItems
~ScopedFreeLocationItems()
Definition:
shellfind.h:46
SearchStart
Definition:
shellfind.h:51
SearchStart::szFileName
WCHAR szFileName[MAX_PATH]
Definition:
shellfind.h:53
SearchStart::pPaths
LOCATIONITEM * pPaths
Definition:
shellfind.h:52
SearchStart::SearchHidden
BOOL SearchHidden
Definition:
shellfind.h:55
SearchStart::szQuery
WCHAR szQuery[MAX_PATH]
Definition:
shellfind.h:54
tagCOMBOBOXEXITEMW
Definition:
commctrl.h:3814
tagLOCATIONITEM
Definition:
shellfind.h:35
tagLOCATIONITEM::szPath
WCHAR szPath[ANYSIZE_ARRAY]
Definition:
shellfind.h:37
tagLOCATIONITEM::pNext
struct tagLOCATIONITEM * pNext
Definition:
shellfind.h:36
INT_PTR
int32_t INT_PTR
Definition:
typedefs.h:64
PCWSTR
const uint16_t * PCWSTR
Definition:
typedefs.h:57
ANYSIZE_ARRAY
#define ANYSIZE_ARRAY
Definition:
typedefs.h:46
undocshell.h
winbase.h
windef.h
LPARAM
LONG_PTR LPARAM
Definition:
windef.h:208
SendMessageW
LRESULT WINAPI SendMessageW(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
WCHAR
__wchar_t WCHAR
Definition:
xmlstorage.h:180
dll
win32
browseui
shellfind
shellfind.h
Generated on Tue May 6 2025 06:03:46 for ReactOS by
1.9.6