ReactOS
0.4.16-dev-927-g467dec4
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
SHGetUserDisplayName.cpp
Go to the documentation of this file.
1
/*
2
* PROJECT: ReactOS API tests
3
* LICENSE: GPL-2.0+ (https://spdx.org/licenses/GPL-2.0+)
4
* PURPOSE: Test for SHGetUserDisplayName
5
* COPYRIGHT: Copyright 2025 Katayama Hirofumi MZ (katayama.hirofumi.mz@gmail.com)
6
*/
7
8
#include "
shelltest.h
"
9
#include <
undocshell.h
>
10
11
START_TEST
(
SHGetUserDisplayName
)
12
{
13
HRESULT
hr
;
14
WCHAR
szBuf[
MAX_PATH
];
15
ULONG
cchBuf;
16
17
hr
=
SHGetUserDisplayName
(
NULL
,
NULL
);
18
ok_hex
(
hr
,
E_INVALIDARG
);
19
20
hr
=
SHGetUserDisplayName
(szBuf,
NULL
);
21
ok_hex
(
hr
,
E_INVALIDARG
);
22
23
cchBuf =
_countof
(szBuf);
24
hr
=
SHGetUserDisplayName
(
NULL
, &cchBuf);
25
ok_hex
(
hr
,
E_INVALIDARG
);
26
27
cchBuf =
_countof
(szBuf);
28
hr
=
SHGetUserDisplayName
(szBuf, &cchBuf);
29
ok_hex
(
hr
,
S_OK
);
30
}
ok_hex
#define ok_hex(expression, result)
Definition:
atltest.h:94
START_TEST
#define START_TEST(x)
Definition:
atltest.h:75
E_INVALIDARG
#define E_INVALIDARG
Definition:
ddrawi.h:101
NULL
#define NULL
Definition:
types.h:112
MAX_PATH
#define MAX_PATH
Definition:
compat.h:34
SHGetUserDisplayName
EXTERN_C HRESULT WINAPI SHGetUserDisplayName(_Out_writes_to_(*puSize, *puSize) PWSTR pName, _Inout_ PULONG puSize)
Definition:
utils.cpp:1844
HRESULT
Definition:
mshtmhst.idl:286
S_OK
#define S_OK
Definition:
intsafe.h:52
shelltest.h
hr
HRESULT hr
Definition:
shlfolder.c:183
_countof
#define _countof(array)
Definition:
sndvol32.h:70
ULONG
uint32_t ULONG
Definition:
typedefs.h:59
undocshell.h
WCHAR
__wchar_t WCHAR
Definition:
xmlstorage.h:180
modules
rostests
apitests
shell32
SHGetUserDisplayName.cpp
Generated on Sun Mar 30 2025 06:08:03 for ReactOS by
1.9.6