Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
0e37ca14
Commit
0e37ca14
authored
Nov 05, 2013
by
Frédéric Delanoy
Committed by
Alexandre Julliard
Nov 06, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
user32/tests: Use BOOL type where appropriate.
parent
4f6bd491
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
159 additions
and
162 deletions
+159
-162
menu.c
dlls/user32/tests/menu.c
+5
-4
msg.c
dlls/user32/tests/msg.c
+18
-20
sysparams.c
dlls/user32/tests/sysparams.c
+130
-132
wsprintf.c
dlls/user32/tests/wsprintf.c
+6
-6
No files found.
dlls/user32/tests/menu.c
View file @
0e37ca14
...
...
@@ -144,7 +144,7 @@ static int MOD_avec, MOD_hic;
static
int
MOD_odheight
;
static
SIZE
MODsizes
[
MOD_NRMENUS
]
=
{
{
MOD_SIZE
,
MOD_SIZE
},{
MOD_SIZE
,
MOD_SIZE
},
{
MOD_SIZE
,
MOD_SIZE
},{
MOD_SIZE
,
MOD_SIZE
}};
static
int
MOD_GotDrawItemMsg
=
FALSE
;
static
BOOL
MOD_GotDrawItemMsg
=
FALSE
;
static
int
gflag_initmenupopup
,
gflag_entermenuloop
,
gflag_initmenu
;
...
...
@@ -652,7 +652,7 @@ static void test_mbs_help( int ispop, int hassub, int mnuopt,
RECT
rc
;
CHAR
text_copy
[
16
];
int
hastab
,
expect
;
int
failed
=
0
;
BOOL
failed
=
FALSE
;
MOD_GotDrawItemMsg
=
FALSE
;
mii
.
fMask
=
MIIM_FTYPE
|
MIIM_DATA
|
MIIM_STATE
;
...
...
@@ -1203,7 +1203,7 @@ static void set_menu_item_info( int line, HMENU hmenu, BOOL ansi, UINT mask, UIN
static
void
test_menu_iteminfo
(
void
)
{
int
ansi
=
TRUE
;
BOOL
ansi
=
TRUE
;
char
txtA
[]
=
"wine"
;
char
initA
[]
=
"XYZ"
;
char
emptyA
[]
=
""
;
...
...
@@ -2110,7 +2110,8 @@ static DWORD WINAPI test_menu_input_thread(LPVOID lpParameter)
/* mixed keyboard/mouse test */
for
(
i
=
0
;
menu_tests
[
i
].
type
!=
-
1
;
i
++
)
{
int
ret
=
TRUE
,
elapsed
=
0
;
BOOL
ret
=
TRUE
;
int
elapsed
=
0
;
got_input
=
i
&&
menu_tests
[
i
-
1
].
bMenuVisible
;
...
...
dlls/user32/tests/msg.c
View file @
0e37ca14
...
...
@@ -1719,11 +1719,10 @@ static const struct message WmSHOWNATopInvisible[] = {
{
0
}
};
static
int
after_end_dialog
,
test_def_id
;
static
BOOL
after_end_dialog
,
test_def_id
,
paint_loop_done
;
static
int
sequence_cnt
,
sequence_size
;
static
struct
recvd_message
*
sequence
;
static
int
log_all_parent_messages
;
static
int
paint_loop_done
;
/* user32 functions */
static
HWND
(
WINAPI
*
pGetAncestor
)(
HWND
,
UINT
);
...
...
@@ -2030,7 +2029,7 @@ static void dump_sequence(const struct message *expected, const char *context, c
ok_sequence_( (exp), (contx), (todo), __FILE__, __LINE__)
static
void
ok_sequence_
(
const
struct
message
*
expected_list
,
const
char
*
context
,
int
todo
,
static
void
ok_sequence_
(
const
struct
message
*
expected_list
,
const
char
*
context
,
BOOL
todo
,
const
char
*
file
,
int
line
)
{
static
const
struct
recvd_message
end_of_sequence
;
...
...
@@ -4762,17 +4761,17 @@ static void test_messages(void)
flush_sequence
();
test_def_id
=
1
;
test_def_id
=
TRUE
;
SendMessageA
(
hwnd
,
WM_NULL
,
0
,
0
);
flush_sequence
();
after_end_dialog
=
1
;
after_end_dialog
=
TRUE
;
EndDialog
(
hwnd
,
0
);
ok_sequence
(
WmEndCustomDialogSeq
,
"EndCustomDialog"
,
FALSE
);
DestroyWindow
(
hwnd
);
after_end_dialog
=
0
;
test_def_id
=
0
;
after_end_dialog
=
FALSE
;
test_def_id
=
FALSE
;
hwnd
=
CreateWindowExA
(
0
,
"TestDialogClass"
,
NULL
,
WS_POPUP
,
0
,
0
,
100
,
100
,
0
,
0
,
GetModuleHandleA
(
0
),
NULL
);
...
...
@@ -7886,7 +7885,7 @@ static LRESULT WINAPI PaintLoopProcA(HWND hWnd, UINT msg, WPARAM wParam, LPARAM
}
else
ok
(
broken
(
1
),
"infinite loop
\n
"
);
if
(
i
==
0
)
paint_loop_done
=
1
;
paint_loop_done
=
TRUE
;
return
DefWindowProcA
(
hWnd
,
msg
,
wParam
,
lParam
);
}
}
...
...
@@ -9040,22 +9039,22 @@ static void test_scrollwindowex(void)
trace
(
"start scroll
\n
"
);
ScrollWindowEx
(
hwnd
,
10
,
10
,
&
rect
,
NULL
,
NULL
,
NULL
,
SW_ERASE
|
SW_INVALIDATE
);
ok_sequence
(
WmEmptySeq
,
"ScrollWindowEx"
,
0
);
ok_sequence
(
WmEmptySeq
,
"ScrollWindowEx"
,
FALSE
);
trace
(
"end scroll
\n
"
);
flush_sequence
();
flush_events
();
ok_sequence
(
ScrollWindowPaint1
,
"ScrollWindowEx"
,
0
);
ok_sequence
(
ScrollWindowPaint1
,
"ScrollWindowEx"
,
FALSE
);
flush_events
();
flush_sequence
();
/* Now without the SW_ERASE flag */
trace
(
"start scroll
\n
"
);
ScrollWindowEx
(
hwnd
,
10
,
10
,
&
rect
,
NULL
,
NULL
,
NULL
,
SW_INVALIDATE
);
ok_sequence
(
WmEmptySeq
,
"ScrollWindowEx"
,
0
);
ok_sequence
(
WmEmptySeq
,
"ScrollWindowEx"
,
FALSE
);
trace
(
"end scroll
\n
"
);
flush_sequence
();
flush_events
();
ok_sequence
(
ScrollWindowPaint2
,
"ScrollWindowEx"
,
0
);
ok_sequence
(
ScrollWindowPaint2
,
"ScrollWindowEx"
,
FALSE
);
flush_events
();
flush_sequence
();
...
...
@@ -9069,7 +9068,7 @@ static void test_scrollwindowex(void)
trace
(
"end scroll
\n
"
);
flush_sequence
();
flush_events
();
ok_sequence
(
ScrollWindowPaint1
,
"ScrollWindowEx"
,
0
);
ok_sequence
(
ScrollWindowPaint1
,
"ScrollWindowEx"
,
FALSE
);
flush_events
();
flush_sequence
();
...
...
@@ -9079,7 +9078,7 @@ static void test_scrollwindowex(void)
trace
(
"end scroll
\n
"
);
flush_sequence
();
flush_events
();
ok_sequence
(
ScrollWindowPaint1
,
"ScrollWindow"
,
0
);
ok_sequence
(
ScrollWindowPaint1
,
"ScrollWindow"
,
FALSE
);
ok
(
DestroyWindow
(
hchild
),
"failed to destroy window
\n
"
);
ok
(
DestroyWindow
(
hwnd
),
"failed to destroy window
\n
"
);
...
...
@@ -9212,7 +9211,7 @@ static void test_DestroyWindow(void)
ret
=
DestroyWindow
(
parent
);
ok
(
ret
,
"DestroyWindow() error %d
\n
"
,
GetLastError
());
test_DestroyWindow_flag
=
FALSE
;
ok_sequence
(
destroy_window_with_children
,
"destroy window with children"
,
0
);
ok_sequence
(
destroy_window_with_children
,
"destroy window with children"
,
FALSE
);
ok
(
!
IsWindow
(
parent
),
"parent still exists
\n
"
);
ok
(
!
IsWindow
(
child1
),
"child1 still exists
\n
"
);
...
...
@@ -10229,8 +10228,7 @@ static void wait_move_event(HWND hwnd, int x, int y)
{
MSG
msg
;
DWORD
time
;
BOOL
ret
;
int
go
=
0
;
BOOL
ret
,
go
=
FALSE
;
time
=
GetTickCount
();
while
(
GetTickCount
()
-
time
<
200
&&
!
go
)
{
...
...
@@ -12708,7 +12706,7 @@ static void test_paintingloop(void)
{
HWND
hwnd
;
paint_loop_done
=
0
;
paint_loop_done
=
FALSE
;
hwnd
=
CreateWindowExA
(
0x0
,
"PaintLoopWindowClass"
,
"PaintLoopWindowClass"
,
WS_OVERLAPPEDWINDOW
,
100
,
100
,
100
,
100
,
0
,
0
,
0
,
NULL
);
...
...
@@ -12732,7 +12730,7 @@ static void test_defwinproc(void)
{
HWND
hwnd
;
MSG
msg
;
int
gotwmquit
=
FALSE
;
BOOL
gotwmquit
=
FALSE
;
hwnd
=
CreateWindowExA
(
0
,
"static"
,
"test_defwndproc"
,
WS_POPUP
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
NULL
);
assert
(
hwnd
);
DefWindowProcA
(
hwnd
,
WM_ENDSESSION
,
1
,
0
);
...
...
@@ -12740,7 +12738,7 @@ static void test_defwinproc(void)
if
(
msg
.
message
==
WM_QUIT
)
gotwmquit
=
TRUE
;
DispatchMessageA
(
&
msg
);
}
ok
(
gotwmquit
==
FALSE
,
"Unexpected WM_QUIT message!
\n
"
);
ok
(
!
gotwmquit
,
"Unexpected WM_QUIT message!
\n
"
);
DestroyWindow
(
hwnd
);
}
...
...
dlls/user32/tests/sysparams.c
View file @
0e37ca14
...
...
@@ -40,9 +40,9 @@
static
LONG
(
WINAPI
*
pChangeDisplaySettingsExA
)(
LPCSTR
,
LPDEVMODEA
,
HWND
,
DWORD
,
LPVOID
);
static
int
strict
;
static
BOOL
strict
;
static
int
dpi
;
static
int
iswin9x
;
static
BOOL
iswin9x
;
static
HDC
hdc
;
#define eq(received, expected, label, type) \
...
...
@@ -529,48 +529,48 @@ static void test_SPI_SETBEEP( void ) /* 2 */
curr_val
=
TRUE
;
rc
=
SystemParametersInfoA
(
SPI_SETBEEP
,
curr_val
,
0
,
SPIF_UPDATEINIFILE
|
SPIF_SENDCHANGE
);
if
(
!
test_error_msg
(
rc
,
"SPI_SETBEEP"
))
return
;
ok
(
rc
!=
0
,
"SystemParametersInfoA: rc=%d err=%d
\n
"
,
rc
,
GetLastError
());
ok
(
rc
,
"SystemParametersInfoA: rc=%d err=%d
\n
"
,
rc
,
GetLastError
());
test_change_message
(
SPI_SETBEEP
,
0
);
test_reg_key
(
SPI_SETBEEP_REGKEY
,
SPI_SETBEEP_VALNAME
,
curr_val
?
"Yes"
:
"No"
);
rc
=
SystemParametersInfoA
(
SPI_GETBEEP
,
0
,
&
b
,
0
);
ok
(
rc
!=
0
,
"SystemParametersInfoA: rc=%d err=%d
\n
"
,
rc
,
GetLastError
());
ok
(
rc
,
"SystemParametersInfoA: rc=%d err=%d
\n
"
,
rc
,
GetLastError
());
eq
(
b
,
curr_val
,
"SPI_{GET,SET}BEEP"
,
"%d"
);
rc
=
SystemParametersInfoW
(
SPI_GETBEEP
,
0
,
&
b
,
0
);
if
(
rc
!=
0
||
GetLastError
()
!=
ERROR_CALL_NOT_IMPLEMENTED
)
if
(
rc
||
GetLastError
()
!=
ERROR_CALL_NOT_IMPLEMENTED
)
{
ok
(
rc
!=
0
,
"SystemParametersInfoW: rc=%d err=%d
\n
"
,
rc
,
GetLastError
());
ok
(
rc
,
"SystemParametersInfoW: rc=%d err=%d
\n
"
,
rc
,
GetLastError
());
eq
(
b
,
curr_val
,
"SystemParametersInfoW"
,
"%d"
);
}
/* is a message sent for the second change? */
rc
=
SystemParametersInfoA
(
SPI_SETBEEP
,
curr_val
,
0
,
SPIF_UPDATEINIFILE
|
SPIF_SENDCHANGE
);
ok
(
rc
!=
0
,
"SystemParametersInfoA: rc=%d err=%d
\n
"
,
rc
,
GetLastError
());
ok
(
rc
,
"SystemParametersInfoA: rc=%d err=%d
\n
"
,
rc
,
GetLastError
());
test_change_message
(
SPI_SETBEEP
,
0
);
curr_val
=
FALSE
;
rc
=
SystemParametersInfoW
(
SPI_SETBEEP
,
curr_val
,
0
,
SPIF_UPDATEINIFILE
|
SPIF_SENDCHANGE
);
if
(
rc
==
0
&&
GetLastError
()
==
ERROR_CALL_NOT_IMPLEMENTED
)
if
(
rc
==
FALSE
&&
GetLastError
()
==
ERROR_CALL_NOT_IMPLEMENTED
)
rc
=
SystemParametersInfoA
(
SPI_SETBEEP
,
curr_val
,
0
,
SPIF_UPDATEINIFILE
|
SPIF_SENDCHANGE
);
ok
(
rc
!=
0
,
"SystemParametersInfo: rc=%d err=%d
\n
"
,
rc
,
GetLastError
());
ok
(
rc
,
"SystemParametersInfo: rc=%d err=%d
\n
"
,
rc
,
GetLastError
());
test_change_message
(
SPI_SETBEEP
,
0
);
test_reg_key
(
SPI_SETBEEP_REGKEY
,
SPI_SETBEEP_VALNAME
,
curr_val
?
"Yes"
:
"No"
);
rc
=
SystemParametersInfoA
(
SPI_GETBEEP
,
0
,
&
b
,
0
);
ok
(
rc
!=
0
,
"SystemParametersInfoA: rc=%d err=%d
\n
"
,
rc
,
GetLastError
());
ok
(
rc
,
"SystemParametersInfoA: rc=%d err=%d
\n
"
,
rc
,
GetLastError
());
eq
(
b
,
curr_val
,
"SPI_{GET,SET}BEEP"
,
"%d"
);
rc
=
SystemParametersInfoW
(
SPI_GETBEEP
,
0
,
&
b
,
0
);
if
(
rc
!=
0
||
GetLastError
()
!=
ERROR_CALL_NOT_IMPLEMENTED
)
if
(
rc
||
GetLastError
()
!=
ERROR_CALL_NOT_IMPLEMENTED
)
{
ok
(
rc
!=
0
,
"SystemParametersInfoW: rc=%d err=%d
\n
"
,
rc
,
GetLastError
());
ok
(
rc
,
"SystemParametersInfoW: rc=%d err=%d
\n
"
,
rc
,
GetLastError
());
eq
(
b
,
curr_val
,
"SystemParametersInfoW"
,
"%d"
);
}
ok
(
MessageBeep
(
MB_OK
),
"Return value of MessageBeep when sound is disabled
\n
"
);
rc
=
SystemParametersInfoA
(
SPI_SETBEEP
,
old_b
,
0
,
SPIF_UPDATEINIFILE
);
ok
(
rc
!=
0
,
"***warning*** failed to restore the original value: rc=%d err=%d
\n
"
,
rc
,
GetLastError
());
ok
(
rc
,
"***warning*** failed to restore the original value: rc=%d err=%d
\n
"
,
rc
,
GetLastError
());
}
static
const
char
*
setmouse_valuenames
[
3
]
=
{
...
...
@@ -587,21 +587,21 @@ static BOOL run_spi_setmouse_test( int curr_val[], POINT *req_change, POINT *pro
BOOL
rc
;
INT
mi
[
3
];
static
int
aw_turn
=
0
;
static
BOOL
w_implemented
=
1
;
static
BOOL
w_implemented
=
TRUE
;
char
buf
[
20
];
int
i
;
aw_turn
++
;
rc
=
0
;
rc
=
FALSE
;
if
((
aw_turn
%
2
!=
0
)
&&
(
w_implemented
))
{
/* call unicode on odd (non even) calls */
SetLastError
(
0xdeadbeef
);
rc
=
SystemParametersInfoW
(
SPI_SETMOUSE
,
0
,
curr_val
,
SPIF_UPDATEINIFILE
|
SPIF_SENDCHANGE
);
if
(
rc
==
0
&&
GetLastError
()
==
ERROR_CALL_NOT_IMPLEMENTED
)
if
(
rc
==
FALSE
&&
GetLastError
()
==
ERROR_CALL_NOT_IMPLEMENTED
)
{
w_implemented
=
0
;
w_implemented
=
FALSE
;
trace
(
"SystemParametersInfoW not supported on this platform
\n
"
);
}
}
...
...
@@ -613,7 +613,7 @@ static BOOL run_spi_setmouse_test( int curr_val[], POINT *req_change, POINT *pro
}
if
(
!
test_error_msg
(
rc
,
"SPI_SETMOUSE"
))
return
FALSE
;
ok
(
rc
!=
0
,
"SystemParametersInfo: rc=%d err=%d
\n
"
,
rc
,
GetLastError
());
ok
(
rc
,
"SystemParametersInfo: rc=%d err=%d
\n
"
,
rc
,
GetLastError
());
test_change_message
(
SPI_SETMOUSE
,
0
);
for
(
i
=
0
;
i
<
3
;
i
++
)
{
...
...
@@ -622,7 +622,7 @@ static BOOL run_spi_setmouse_test( int curr_val[], POINT *req_change, POINT *pro
}
rc
=
SystemParametersInfoA
(
SPI_GETMOUSE
,
0
,
mi
,
0
);
ok
(
rc
!=
0
,
"SystemParametersInfoA: rc=%d err=%d
\n
"
,
rc
,
GetLastError
());
ok
(
rc
,
"SystemParametersInfoA: rc=%d err=%d
\n
"
,
rc
,
GetLastError
());
for
(
i
=
0
;
i
<
3
;
i
++
)
{
ok
(
mi
[
i
]
==
curr_val
[
i
],
...
...
@@ -632,7 +632,7 @@ static BOOL run_spi_setmouse_test( int curr_val[], POINT *req_change, POINT *pro
if
(
w_implemented
)
{
rc
=
SystemParametersInfoW
(
SPI_GETMOUSE
,
0
,
mi
,
0
);
ok
(
rc
!=
0
,
"SystemParametersInfoW: rc=%d err=%d
\n
"
,
rc
,
GetLastError
());
ok
(
rc
,
"SystemParametersInfoW: rc=%d err=%d
\n
"
,
rc
,
GetLastError
());
for
(
i
=
0
;
i
<
3
;
i
++
)
{
ok
(
mi
[
i
]
==
curr_val
[
i
],
...
...
@@ -717,7 +717,7 @@ static void test_SPI_SETMOUSE( void ) /* 4 */
run_spi_setmouse_test
(
curr_val
,
req_change
,
proj_change8
,
nchange
);
rc
=
SystemParametersInfoA
(
SPI_SETMOUSE
,
0
,
old_mi
,
SPIF_UPDATEINIFILE
);
ok
(
rc
!=
0
,
"***warning*** failed to restore the original value: rc=%d err=%d
\n
"
,
rc
,
GetLastError
());
ok
(
rc
,
"***warning*** failed to restore the original value: rc=%d err=%d
\n
"
,
rc
,
GetLastError
());
}
static
BOOL
test_setborder
(
UINT
curr_val
,
int
usesetborder
,
int
dpi
)
...
...
@@ -729,18 +729,18 @@ static BOOL test_setborder(UINT curr_val, int usesetborder, int dpi)
ncm
.
cbSize
=
FIELD_OFFSET
(
NONCLIENTMETRICSA
,
iPaddedBorderWidth
);
rc
=
SystemParametersInfoA
(
SPI_GETNONCLIENTMETRICS
,
0
,
&
ncm
,
0
);
ok
(
rc
!=
0
,
"SystemParametersInfoA: rc=%d err=%d
\n
"
,
rc
,
GetLastError
());
ok
(
rc
,
"SystemParametersInfoA: rc=%d err=%d
\n
"
,
rc
,
GetLastError
());
if
(
usesetborder
)
{
rc
=
SystemParametersInfoA
(
SPI_SETBORDER
,
curr_val
,
0
,
SPIF_UPDATEINIFILE
|
SPIF_SENDCHANGE
);
if
(
!
test_error_msg
(
rc
,
"SPI_SETBORDER"
))
return
FALSE
;
ok
(
rc
!=
0
,
"SystemParametersInfoA: rc=%d err=%d
\n
"
,
rc
,
GetLastError
());
ok
(
rc
,
"SystemParametersInfoA: rc=%d err=%d
\n
"
,
rc
,
GetLastError
());
test_change_message
(
SPI_SETBORDER
,
1
);
}
else
{
/* set non client metrics */
ncm
.
iBorderWidth
=
curr_val
;
rc
=
SystemParametersInfoA
(
SPI_SETNONCLIENTMETRICS
,
0
,
&
ncm
,
SPIF_UPDATEINIFILE
|
SPIF_SENDCHANGE
);
if
(
!
test_error_msg
(
rc
,
"SPI_SETNONCLIENTMETRICS"
))
return
FALSE
;
ok
(
rc
!=
0
,
"SystemParametersInfoA: rc=%d err=%d
\n
"
,
rc
,
GetLastError
());
ok
(
rc
,
"SystemParametersInfoA: rc=%d err=%d
\n
"
,
rc
,
GetLastError
());
test_change_message
(
SPI_SETNONCLIENTMETRICS
,
1
);
}
if
(
curr_val
)
{
/* skip if 0, some windows versions return 0 others 1 */
...
...
@@ -753,11 +753,11 @@ static BOOL test_setborder(UINT curr_val, int usesetborder, int dpi)
if
(
curr_val
==
0
)
curr_val
=
1
;
/* should be the same as the non client metrics */
rc
=
SystemParametersInfoA
(
SPI_GETNONCLIENTMETRICS
,
0
,
&
ncm
,
0
);
ok
(
rc
!=
0
,
"SystemParametersInfoA: rc=%d err=%d
\n
"
,
rc
,
GetLastError
());
ok
(
rc
,
"SystemParametersInfoA: rc=%d err=%d
\n
"
,
rc
,
GetLastError
());
eq
(
(
UINT
)
ncm
.
iBorderWidth
,
curr_val
,
"NonClientMetric.iBorderWidth"
,
"%d"
);
/* and from SPI_GETBORDER */
rc
=
SystemParametersInfoA
(
SPI_GETBORDER
,
0
,
&
border
,
0
);
ok
(
rc
!=
0
,
"SystemParametersInfoA: rc=%d err=%d
\n
"
,
rc
,
GetLastError
());
ok
(
rc
,
"SystemParametersInfoA: rc=%d err=%d
\n
"
,
rc
,
GetLastError
());
eq
(
border
,
curr_val
,
"SPI_{GET,SET}BORDER"
,
"%d"
);
/* test some SystemMetrics */
frame
=
curr_val
+
GetSystemMetrics
(
SM_CXDLGFRAME
);
...
...
@@ -829,8 +829,7 @@ static void test_SPI_SETBORDER( void ) /* 6 */
rc
=
SystemParametersInfoA
(
SPI_SETNONCLIENTMETRICS
,
0
,
&
ncmsave
,
SPIF_UPDATEINIFILE
|
SPIF_SENDCHANGE
);
test_change_message
(
SPI_SETNONCLIENTMETRICS
,
1
);
ok
(
rc
!=
0
,
"***warning*** failed to restore the original value: rc=%d err=%d
\n
"
,
rc
,
GetLastError
());
ok
(
rc
,
"***warning*** failed to restore the original value: rc=%d err=%d
\n
"
,
rc
,
GetLastError
());
}
static
void
test_SPI_SETKEYBOARDSPEED
(
void
)
/* 10 */
...
...
@@ -854,18 +853,18 @@ static void test_SPI_SETKEYBOARDSPEED( void ) /* 10 */
rc
=
SystemParametersInfoA
(
SPI_SETKEYBOARDSPEED
,
vals
[
i
],
0
,
SPIF_UPDATEINIFILE
|
SPIF_SENDCHANGE
);
if
(
!
test_error_msg
(
rc
,
"SPI_SETKEYBOARDSPEED"
))
return
;
ok
(
rc
!=
0
,
"%d: rc=%d err=%d
\n
"
,
i
,
rc
,
GetLastError
());
ok
(
rc
,
"%d: rc=%d err=%d
\n
"
,
i
,
rc
,
GetLastError
());
test_change_message
(
SPI_SETKEYBOARDSPEED
,
0
);
sprintf
(
buf
,
"%d"
,
vals
[
i
]
);
test_reg_key
(
SPI_SETKEYBOARDSPEED_REGKEY
,
SPI_SETKEYBOARDSPEED_VALNAME
,
buf
);
rc
=
SystemParametersInfoA
(
SPI_GETKEYBOARDSPEED
,
0
,
&
v
,
0
);
ok
(
rc
!=
0
,
"%d: rc=%d err=%d
\n
"
,
i
,
rc
,
GetLastError
());
ok
(
rc
,
"%d: rc=%d err=%d
\n
"
,
i
,
rc
,
GetLastError
());
eq
(
v
,
vals
[
i
],
"SPI_{GET,SET}KEYBOARDSPEED"
,
"%d"
);
}
rc
=
SystemParametersInfoA
(
SPI_SETKEYBOARDSPEED
,
old_speed
,
0
,
SPIF_UPDATEINIFILE
);
ok
(
rc
!=
0
,
"***warning*** failed to restore the original value: rc=%d err=%d
\n
"
,
rc
,
GetLastError
());
ok
(
rc
,
"***warning*** failed to restore the original value: rc=%d err=%d
\n
"
,
rc
,
GetLastError
());
}
/* test_SPI_ICONHORIZONTALSPACING helper */
...
...
@@ -878,7 +877,7 @@ static BOOL dotest_spi_iconhorizontalspacing( INT curr_val)
rc
=
SystemParametersInfoA
(
SPI_ICONHORIZONTALSPACING
,
curr_val
,
0
,
SPIF_UPDATEINIFILE
|
SPIF_SENDCHANGE
);
if
(
!
test_error_msg
(
rc
,
"SPI_ICONHORIZONTALSPACING"
))
return
FALSE
;
ok
(
rc
!=
0
,
"SystemParametersInfoA: rc=%d err=%d
\n
"
,
rc
,
GetLastError
());
ok
(
rc
,
"SystemParametersInfoA: rc=%d err=%d
\n
"
,
rc
,
GetLastError
());
test_change_message
(
SPI_ICONHORIZONTALSPACING
,
0
);
if
(
curr_val
<
32
)
curr_val
=
32
;
/* The registry keys depend on the Windows version and the values too
...
...
@@ -891,14 +890,14 @@ static BOOL dotest_spi_iconhorizontalspacing( INT curr_val)
"wrong value in registry %d, expected %d
\n
"
,
regval
,
curr_val
);
/* compare with what SPI_ICONHORIZONTALSPACING returns */
rc
=
SystemParametersInfoA
(
SPI_ICONHORIZONTALSPACING
,
0
,
&
spacing
,
0
);
ok
(
rc
!=
0
,
"SystemParametersInfoA: rc=%d err=%d
\n
"
,
rc
,
GetLastError
());
ok
(
rc
,
"SystemParametersInfoA: rc=%d err=%d
\n
"
,
rc
,
GetLastError
());
eq
(
spacing
,
curr_val
,
"ICONHORIZONTALSPACING"
,
"%d"
);
/* and with a system metrics */
eq
(
GetSystemMetrics
(
SM_CXICONSPACING
),
curr_val
,
"SM_CXICONSPACING"
,
"%d"
);
/* and with what SPI_GETICONMETRICS returns */
im
.
cbSize
=
sizeof
(
ICONMETRICSA
);
rc
=
SystemParametersInfoA
(
SPI_GETICONMETRICS
,
sizeof
(
ICONMETRICSA
),
&
im
,
FALSE
);
ok
(
rc
!=
0
,
"SystemParametersInfoA: rc=%d err=%d
\n
"
,
rc
,
GetLastError
());
ok
(
rc
,
"SystemParametersInfoA: rc=%d err=%d
\n
"
,
rc
,
GetLastError
());
eq
(
im
.
iHorzSpacing
,
curr_val
,
"SPI_GETICONMETRICS"
,
"%d"
);
return
TRUE
;
}
...
...
@@ -919,7 +918,7 @@ static void test_SPI_ICONHORIZONTALSPACING( void ) /* 13 */
dotest_spi_iconhorizontalspacing
(
10
);
/* minimum is 32 */
/* restore */
rc
=
SystemParametersInfoA
(
SPI_ICONHORIZONTALSPACING
,
old_spacing
,
0
,
SPIF_UPDATEINIFILE
);
ok
(
rc
!=
0
,
"***warning*** failed to restore the original value: rc=%d err=%d
\n
"
,
rc
,
GetLastError
());
ok
(
rc
,
"***warning*** failed to restore the original value: rc=%d err=%d
\n
"
,
rc
,
GetLastError
());
}
static
void
test_SPI_SETSCREENSAVETIMEOUT
(
void
)
/* 14 */
...
...
@@ -943,20 +942,20 @@ static void test_SPI_SETSCREENSAVETIMEOUT( void ) /* 14 */
rc
=
SystemParametersInfoA
(
SPI_SETSCREENSAVETIMEOUT
,
vals
[
i
],
0
,
SPIF_UPDATEINIFILE
|
SPIF_SENDCHANGE
);
if
(
!
test_error_msg
(
rc
,
"SPI_SETSCREENSAVETIMEOUT"
))
return
;
ok
(
rc
!=
0
,
"%d: rc=%d err=%d
\n
"
,
i
,
rc
,
GetLastError
());
ok
(
rc
,
"%d: rc=%d err=%d
\n
"
,
i
,
rc
,
GetLastError
());
test_change_message
(
SPI_SETSCREENSAVETIMEOUT
,
0
);
sprintf
(
buf
,
"%d"
,
vals
[
i
]
);
test_reg_key
(
SPI_SETSCREENSAVETIMEOUT_REGKEY
,
SPI_SETSCREENSAVETIMEOUT_VALNAME
,
buf
);
rc
=
SystemParametersInfoA
(
SPI_GETSCREENSAVETIMEOUT
,
0
,
&
v
,
0
);
ok
(
rc
!=
0
,
"%d: rc=%d err=%d
\n
"
,
i
,
rc
,
GetLastError
());
ok
(
rc
,
"%d: rc=%d err=%d
\n
"
,
i
,
rc
,
GetLastError
());
eq
(
v
,
vals
[
i
],
"SPI_{GET,SET}SCREENSAVETIMEOUT"
,
"%d"
);
}
rc
=
SystemParametersInfoA
(
SPI_SETSCREENSAVETIMEOUT
,
old_timeout
,
0
,
SPIF_UPDATEINIFILE
);
ok
(
rc
!=
0
,
"***warning*** failed to restore the original value: rc=%d err=%d
\n
"
,
rc
,
GetLastError
());
ok
(
rc
,
"***warning*** failed to restore the original value: rc=%d err=%d
\n
"
,
rc
,
GetLastError
());
}
static
void
test_SPI_SETSCREENSAVEACTIVE
(
void
)
/* 17 */
...
...
@@ -979,20 +978,20 @@ static void test_SPI_SETSCREENSAVEACTIVE( void ) /* 17 */
rc
=
SystemParametersInfoA
(
SPI_SETSCREENSAVEACTIVE
,
vals
[
i
],
0
,
SPIF_UPDATEINIFILE
|
SPIF_SENDCHANGE
);
if
(
!
test_error_msg
(
rc
,
"SPI_SETSCREENSAVEACTIVE"
))
return
;
ok
(
rc
!=
0
,
"%d: rc=%d err=%d
\n
"
,
i
,
rc
,
GetLastError
());
ok
(
rc
,
"%d: rc=%d err=%d
\n
"
,
i
,
rc
,
GetLastError
());
test_change_message
(
SPI_SETSCREENSAVEACTIVE
,
0
);
test_reg_key
(
SPI_SETSCREENSAVEACTIVE_REGKEY
,
SPI_SETSCREENSAVEACTIVE_VALNAME
,
vals
[
i
]
?
"1"
:
"0"
);
rc
=
SystemParametersInfoA
(
SPI_GETSCREENSAVEACTIVE
,
0
,
&
v
,
0
);
ok
(
rc
!=
0
,
"%d: rc=%d err=%d
\n
"
,
i
,
rc
,
GetLastError
());
ok
(
rc
,
"%d: rc=%d err=%d
\n
"
,
i
,
rc
,
GetLastError
());
ok
(
v
==
vals
[
i
]
||
broken
(
!
v
)
/* Win 7 */
,
"SPI_{GET,SET}SCREENSAVEACTIVE: got %d instead of %d
\n
"
,
v
,
vals
[
i
]);
}
rc
=
SystemParametersInfoA
(
SPI_SETSCREENSAVEACTIVE
,
old_b
,
0
,
SPIF_UPDATEINIFILE
);
ok
(
rc
!=
0
,
"***warning*** failed to restore the original value: rc=%d err=%d
\n
"
,
rc
,
GetLastError
());
ok
(
rc
,
"***warning*** failed to restore the original value: rc=%d err=%d
\n
"
,
rc
,
GetLastError
());
}
static
void
test_SPI_SETGRIDGRANULARITY
(
void
)
/* 19 */
...
...
@@ -1021,19 +1020,19 @@ static void test_SPI_SETKEYBOARDDELAY( void ) /* 23 */
rc
=
SystemParametersInfoA
(
SPI_SETKEYBOARDDELAY
,
vals
[
i
],
0
,
SPIF_UPDATEINIFILE
|
SPIF_SENDCHANGE
);
if
(
!
test_error_msg
(
rc
,
"SPI_SETKEYBOARDDELAY"
))
return
;
ok
(
rc
!=
0
,
"%d: rc=%d err=%d
\n
"
,
i
,
rc
,
GetLastError
());
ok
(
rc
,
"%d: rc=%d err=%d
\n
"
,
i
,
rc
,
GetLastError
());
test_change_message
(
SPI_SETKEYBOARDDELAY
,
0
);
sprintf
(
buf
,
"%d"
,
vals
[
i
]
);
test_reg_key
(
SPI_SETKEYBOARDDELAY_REGKEY
,
SPI_SETKEYBOARDDELAY_VALNAME
,
buf
);
rc
=
SystemParametersInfoA
(
SPI_GETKEYBOARDDELAY
,
0
,
&
delay
,
0
);
ok
(
rc
!=
0
,
"%d: rc=%d err=%d
\n
"
,
i
,
rc
,
GetLastError
());
ok
(
rc
,
"%d: rc=%d err=%d
\n
"
,
i
,
rc
,
GetLastError
());
eq
(
delay
,
vals
[
i
],
"SPI_{GET,SET}KEYBOARDDELAY"
,
"%d"
);
}
rc
=
SystemParametersInfoA
(
SPI_SETKEYBOARDDELAY
,
old_delay
,
0
,
SPIF_UPDATEINIFILE
);
ok
(
rc
!=
0
,
"***warning*** failed to restore the original value: rc=%d err=%d
\n
"
,
rc
,
GetLastError
());
ok
(
rc
,
"***warning*** failed to restore the original value: rc=%d err=%d
\n
"
,
rc
,
GetLastError
());
}
...
...
@@ -1047,7 +1046,7 @@ static BOOL dotest_spi_iconverticalspacing( INT curr_val)
rc
=
SystemParametersInfoA
(
SPI_ICONVERTICALSPACING
,
curr_val
,
0
,
SPIF_UPDATEINIFILE
|
SPIF_SENDCHANGE
);
if
(
!
test_error_msg
(
rc
,
"SPI_ICONVERTICALSPACING"
))
return
FALSE
;
ok
(
rc
!=
0
,
"SystemParametersInfoA: rc=%d err=%d
\n
"
,
rc
,
GetLastError
());
ok
(
rc
,
"SystemParametersInfoA: rc=%d err=%d
\n
"
,
rc
,
GetLastError
());
test_change_message
(
SPI_ICONVERTICALSPACING
,
0
);
if
(
curr_val
<
32
)
curr_val
=
32
;
/* The registry keys depend on the Windows version and the values too
...
...
@@ -1060,14 +1059,14 @@ static BOOL dotest_spi_iconverticalspacing( INT curr_val)
"wrong value in registry %d, expected %d
\n
"
,
regval
,
curr_val
);
/* compare with what SPI_ICONVERTICALSPACING returns */
rc
=
SystemParametersInfoA
(
SPI_ICONVERTICALSPACING
,
0
,
&
spacing
,
0
);
ok
(
rc
!=
0
,
"SystemParametersInfoA: rc=%d err=%d
\n
"
,
rc
,
GetLastError
());
ok
(
rc
,
"SystemParametersInfoA: rc=%d err=%d
\n
"
,
rc
,
GetLastError
());
eq
(
spacing
,
curr_val
,
"ICONVERTICALSPACING"
,
"%d"
);
/* and with a system metrics */
eq
(
GetSystemMetrics
(
SM_CYICONSPACING
),
curr_val
,
"SM_CYICONSPACING"
,
"%d"
);
/* and with what SPI_GETICONMETRICS returns */
im
.
cbSize
=
sizeof
(
ICONMETRICSA
);
rc
=
SystemParametersInfoA
(
SPI_GETICONMETRICS
,
sizeof
(
ICONMETRICSA
),
&
im
,
FALSE
);
ok
(
rc
!=
0
,
"SystemParametersInfoA: rc=%d err=%d
\n
"
,
rc
,
GetLastError
());
ok
(
rc
,
"SystemParametersInfoA: rc=%d err=%d
\n
"
,
rc
,
GetLastError
());
eq
(
im
.
iVertSpacing
,
curr_val
,
"SPI_GETICONMETRICS"
,
"%d"
);
return
TRUE
;
}
...
...
@@ -1090,8 +1089,7 @@ static void test_SPI_ICONVERTICALSPACING( void ) /* 24 */
/* restore */
rc
=
SystemParametersInfoA
(
SPI_ICONVERTICALSPACING
,
old_spacing
,
0
,
SPIF_UPDATEINIFILE
);
ok
(
rc
!=
0
,
"***warning*** failed to restore the original value: rc=%d err=%d
\n
"
,
rc
,
GetLastError
());
ok
(
rc
,
"***warning*** failed to restore the original value: rc=%d err=%d
\n
"
,
rc
,
GetLastError
());
}
static
void
test_SPI_SETICONTITLEWRAP
(
void
)
/* 26 */
...
...
@@ -1123,7 +1121,7 @@ static void test_SPI_SETICONTITLEWRAP( void ) /* 26 */
rc
=
SystemParametersInfoA
(
SPI_SETICONTITLEWRAP
,
vals
[
i
],
0
,
SPIF_UPDATEINIFILE
|
SPIF_SENDCHANGE
);
if
(
!
test_error_msg
(
rc
,
"SPI_SETICONTITLEWRAP"
))
return
;
ok
(
rc
!=
0
,
"%d: rc=%d err=%d
\n
"
,
i
,
rc
,
GetLastError
());
ok
(
rc
,
"%d: rc=%d err=%d
\n
"
,
i
,
rc
,
GetLastError
());
test_change_message
(
SPI_SETICONTITLEWRAP
,
1
);
regval
=
metricfromreg
(
SPI_SETICONTITLEWRAP_REGKEY2
,
SPI_SETICONTITLEWRAP_VALNAME
,
dpi
);
...
...
@@ -1134,17 +1132,17 @@ static void test_SPI_SETICONTITLEWRAP( void ) /* 26 */
"wrong value in registry %d, expected %d
\n
"
,
regval
,
vals
[
i
]
);
rc
=
SystemParametersInfoA
(
SPI_GETICONTITLEWRAP
,
0
,
&
v
,
0
);
ok
(
rc
!=
0
,
"%d: rc=%d err=%d
\n
"
,
i
,
rc
,
GetLastError
());
ok
(
rc
,
"%d: rc=%d err=%d
\n
"
,
i
,
rc
,
GetLastError
());
eq
(
v
,
vals
[
i
],
"SPI_{GET,SET}ICONTITLEWRAP"
,
"%d"
);
/* and test with what SPI_GETICONMETRICS returns */
im
.
cbSize
=
sizeof
(
ICONMETRICSA
);
rc
=
SystemParametersInfoA
(
SPI_GETICONMETRICS
,
sizeof
(
ICONMETRICSA
),
&
im
,
FALSE
);
ok
(
rc
!=
0
,
"SystemParametersInfoA: rc=%d err=%d
\n
"
,
rc
,
GetLastError
());
ok
(
rc
,
"SystemParametersInfoA: rc=%d err=%d
\n
"
,
rc
,
GetLastError
());
eq
(
im
.
iTitleWrap
,
(
BOOL
)
vals
[
i
],
"SPI_GETICONMETRICS"
,
"%d"
);
}
rc
=
SystemParametersInfoA
(
SPI_SETICONTITLEWRAP
,
old_b
,
0
,
SPIF_UPDATEINIFILE
);
ok
(
rc
!=
0
,
"***warning*** failed to restore the original value: rc=%d err=%d
\n
"
,
rc
,
GetLastError
());
ok
(
rc
,
"***warning*** failed to restore the original value: rc=%d err=%d
\n
"
,
rc
,
GetLastError
());
}
static
void
test_SPI_SETMENUDROPALIGNMENT
(
void
)
/* 28 */
...
...
@@ -1167,7 +1165,7 @@ static void test_SPI_SETMENUDROPALIGNMENT( void ) /* 28 */
rc
=
SystemParametersInfoA
(
SPI_SETMENUDROPALIGNMENT
,
vals
[
i
],
0
,
SPIF_UPDATEINIFILE
|
SPIF_SENDCHANGE
);
if
(
!
test_error_msg
(
rc
,
"SPI_SETMENUDROPALIGNMENT"
))
return
;
ok
(
rc
!=
0
,
"%d: rc=%d err=%d
\n
"
,
i
,
rc
,
GetLastError
());
ok
(
rc
,
"%d: rc=%d err=%d
\n
"
,
i
,
rc
,
GetLastError
());
test_change_message
(
SPI_SETMENUDROPALIGNMENT
,
0
);
test_reg_key_ex
(
SPI_SETMENUDROPALIGNMENT_REGKEY1
,
SPI_SETMENUDROPALIGNMENT_REGKEY2
,
...
...
@@ -1175,7 +1173,7 @@ static void test_SPI_SETMENUDROPALIGNMENT( void ) /* 28 */
vals
[
i
]
?
"1"
:
"0"
);
rc
=
SystemParametersInfoA
(
SPI_GETMENUDROPALIGNMENT
,
0
,
&
v
,
0
);
ok
(
rc
!=
0
,
"%d: rc=%d err=%d
\n
"
,
i
,
rc
,
GetLastError
());
ok
(
rc
,
"%d: rc=%d err=%d
\n
"
,
i
,
rc
,
GetLastError
());
eq
(
v
,
vals
[
i
],
"SPI_{GET,SET}MENUDROPALIGNMENT"
,
"%d"
);
eq
(
GetSystemMetrics
(
SM_MENUDROPALIGNMENT
),
(
int
)
vals
[
i
],
"SM_MENUDROPALIGNMENT"
,
"%d"
);
...
...
@@ -1183,7 +1181,7 @@ static void test_SPI_SETMENUDROPALIGNMENT( void ) /* 28 */
rc
=
SystemParametersInfoA
(
SPI_SETMENUDROPALIGNMENT
,
old_b
,
0
,
SPIF_UPDATEINIFILE
);
ok
(
rc
!=
0
,
"***warning*** failed to restore the original value: rc=%d err=%d
\n
"
,
rc
,
GetLastError
());
ok
(
rc
,
"***warning*** failed to restore the original value: rc=%d err=%d
\n
"
,
rc
,
GetLastError
());
}
static
void
test_SPI_SETDOUBLECLKWIDTH
(
void
)
/* 29 */
...
...
@@ -1217,7 +1215,7 @@ static void test_SPI_SETDOUBLECLKWIDTH( void ) /* 29 */
rc
=
SystemParametersInfoA
(
SPI_SETDOUBLECLKWIDTH
,
old_width
,
0
,
SPIF_UPDATEINIFILE
);
ok
(
rc
!=
0
,
"***warning*** failed to restore the original value: rc=%d err=%d
\n
"
,
rc
,
GetLastError
());
ok
(
rc
,
"***warning*** failed to restore the original value: rc=%d err=%d
\n
"
,
rc
,
GetLastError
());
}
static
void
test_SPI_SETDOUBLECLKHEIGHT
(
void
)
/* 30 */
...
...
@@ -1251,7 +1249,7 @@ static void test_SPI_SETDOUBLECLKHEIGHT( void ) /* 30 */
rc
=
SystemParametersInfoA
(
SPI_SETDOUBLECLKHEIGHT
,
old_height
,
0
,
SPIF_UPDATEINIFILE
);
ok
(
rc
!=
0
,
"***warning*** failed to restore the original value: rc=%d err=%d
\n
"
,
rc
,
GetLastError
());
ok
(
rc
,
"***warning*** failed to restore the original value: rc=%d err=%d
\n
"
,
rc
,
GetLastError
());
}
static
void
test_SPI_SETDOUBLECLICKTIME
(
void
)
/* 32 */
...
...
@@ -1282,7 +1280,7 @@ static void test_SPI_SETDOUBLECLICKTIME( void ) /* 32 */
curr_val
=
1000
;
rc
=
SystemParametersInfoA
(
SPI_SETDOUBLECLICKTIME
,
curr_val
,
0
,
SPIF_UPDATEINIFILE
|
SPIF_SENDCHANGE
);
ok
(
rc
!=
0
,
"SystemParametersInfoA: rc=%d err=%d
\n
"
,
rc
,
GetLastError
());
ok
(
rc
,
"SystemParametersInfoA: rc=%d err=%d
\n
"
,
rc
,
GetLastError
());
test_change_message
(
SPI_SETDOUBLECLICKTIME
,
0
);
sprintf
(
buf
,
"%d"
,
curr_val
);
test_reg_key
(
SPI_SETDOUBLECLICKTIME_REGKEY
,
...
...
@@ -1307,7 +1305,7 @@ static void test_SPI_SETDOUBLECLICKTIME( void ) /* 32 */
eq
(
GetDoubleClickTime
(),
curr_val
,
"GetDoubleClickTime"
,
"%d"
);
rc
=
SystemParametersInfoA
(
SPI_SETDOUBLECLICKTIME
,
old_time
,
0
,
SPIF_UPDATEINIFILE
);
ok
(
rc
!=
0
,
"***warning*** failed to restore the original value: rc=%d err=%d
\n
"
,
rc
,
GetLastError
());
ok
(
rc
,
"***warning*** failed to restore the original value: rc=%d err=%d
\n
"
,
rc
,
GetLastError
());
}
static
void
test_SPI_SETMOUSEBUTTONSWAP
(
void
)
/* 33 */
...
...
@@ -1341,7 +1339,7 @@ static void test_SPI_SETMOUSEBUTTONSWAP( void ) /* 33 */
rc
=
SystemParametersInfoA
(
SPI_SETMOUSEBUTTONSWAP
,
old_b
,
0
,
SPIF_UPDATEINIFILE
);
ok
(
rc
!=
0
,
"***warning*** failed to restore the original value: rc=%d err=%d
\n
"
,
rc
,
GetLastError
());
ok
(
rc
,
"***warning*** failed to restore the original value: rc=%d err=%d
\n
"
,
rc
,
GetLastError
());
}
static
void
test_SPI_SETFASTTASKSWITCH
(
void
)
/* 36 */
...
...
@@ -1382,19 +1380,19 @@ static void test_SPI_SETDRAGFULLWINDOWS( void ) /* 37 */
rc
=
SystemParametersInfoA
(
SPI_SETDRAGFULLWINDOWS
,
vals
[
i
],
0
,
SPIF_UPDATEINIFILE
|
SPIF_SENDCHANGE
);
if
(
!
test_error_msg
(
rc
,
"SPI_SETDRAGFULLWINDOWS"
))
return
;
ok
(
rc
!=
0
,
"%d: rc=%d err=%d
\n
"
,
i
,
rc
,
GetLastError
());
ok
(
rc
,
"%d: rc=%d err=%d
\n
"
,
i
,
rc
,
GetLastError
());
test_change_message
(
SPI_SETDRAGFULLWINDOWS
,
0
);
test_reg_key
(
SPI_SETDRAGFULLWINDOWS_REGKEY
,
SPI_SETDRAGFULLWINDOWS_VALNAME
,
vals
[
i
]
?
"1"
:
"0"
);
rc
=
SystemParametersInfoA
(
SPI_GETDRAGFULLWINDOWS
,
0
,
&
v
,
0
);
ok
(
rc
!=
0
,
"%d: rc=%d err=%d
\n
"
,
i
,
rc
,
GetLastError
());
ok
(
rc
,
"%d: rc=%d err=%d
\n
"
,
i
,
rc
,
GetLastError
());
eq
(
v
,
vals
[
i
],
"SPI_{GET,SET}DRAGFULLWINDOWS"
,
"%d"
);
}
rc
=
SystemParametersInfoA
(
SPI_SETDRAGFULLWINDOWS
,
old_b
,
0
,
SPIF_UPDATEINIFILE
);
ok
(
rc
!=
0
,
"***warning*** failed to restore the original value: rc=%d err=%d
\n
"
,
rc
,
GetLastError
());
ok
(
rc
,
"***warning*** failed to restore the original value: rc=%d err=%d
\n
"
,
rc
,
GetLastError
());
}
#define test_reg_metric( KEY, VAL, val) \
...
...
@@ -1513,11 +1511,11 @@ static void test_SPI_SETNONCLIENTMETRICS( void ) /* 44 */
rc
=
SystemParametersInfoA
(
SPI_SETNONCLIENTMETRICS
,
0
,
&
Ncmnew
,
SPIF_UPDATEINIFILE
|
SPIF_SENDCHANGE
);
if
(
!
test_error_msg
(
rc
,
"SPI_SETNONCLIENTMETRICS"
))
return
;
ok
(
rc
!=
0
,
"SystemParametersInfoA: rc=%d err=%d
\n
"
,
rc
,
GetLastError
());
ok
(
rc
,
"SystemParametersInfoA: rc=%d err=%d
\n
"
,
rc
,
GetLastError
());
test_change_message
(
SPI_SETNONCLIENTMETRICS
,
1
);
/* get them back */
rc
=
SystemParametersInfoA
(
SPI_GETNONCLIENTMETRICS
,
sizeof
(
NONCLIENTMETRICSA
),
&
Ncmcur
,
FALSE
);
ok
(
rc
!=
0
,
"SystemParametersInfoA: rc=%d err=%d
\n
"
,
rc
,
GetLastError
());
ok
(
rc
,
"SystemParametersInfoA: rc=%d err=%d
\n
"
,
rc
,
GetLastError
());
/* test registry entries */
TEST_NONCLIENTMETRICS_REG
(
Ncmcur
)
/* test the system metrics with these settings */
...
...
@@ -1536,13 +1534,13 @@ static void test_SPI_SETNONCLIENTMETRICS( void ) /* 44 */
rc
=
SystemParametersInfoA
(
SPI_SETNONCLIENTMETRICS
,
0
,
&
Ncmnew
,
SPIF_UPDATEINIFILE
|
SPIF_SENDCHANGE
);
ok
(
rc
!=
0
,
"SystemParametersInfoA: rc=%d err=%d
\n
"
,
rc
,
GetLastError
());
ok
(
rc
,
"SystemParametersInfoA: rc=%d err=%d
\n
"
,
rc
,
GetLastError
());
test_change_message
(
SPI_SETNONCLIENTMETRICS
,
1
);
/* raw values are in registry */
TEST_NONCLIENTMETRICS_REG
(
Ncmnew
)
/* get them back */
rc
=
SystemParametersInfoA
(
SPI_GETNONCLIENTMETRICS
,
sizeof
(
NONCLIENTMETRICSA
),
&
Ncmcur
,
FALSE
);
ok
(
rc
!=
0
,
"SystemParametersInfoA: rc=%d err=%d
\n
"
,
rc
,
GetLastError
());
ok
(
rc
,
"SystemParametersInfoA: rc=%d err=%d
\n
"
,
rc
,
GetLastError
());
/* cooked values are returned */
expect
=
max
(
Ncmnew
.
iMenuHeight
,
2
+
get_tmheight
(
&
Ncmnew
.
lfMenuFont
,
1
));
ok
(
Ncmcur
.
iMenuHeight
==
expect
,
...
...
@@ -1568,7 +1566,7 @@ static void test_SPI_SETNONCLIENTMETRICS( void ) /* 44 */
rc
=
SystemParametersInfoA
(
SPI_SETNONCLIENTMETRICS
,
sizeof
(
NONCLIENTMETRICSA
),
&
Ncmorig
,
SPIF_UPDATEINIFILE
|
SPIF_SENDCHANGE
);
test_change_message
(
SPI_SETNONCLIENTMETRICS
,
0
);
ok
(
rc
!=
0
,
"***warning*** failed to restore the original value: rc=%d err=%d
\n
"
,
rc
,
GetLastError
());
ok
(
rc
,
"***warning*** failed to restore the original value: rc=%d err=%d
\n
"
,
rc
,
GetLastError
());
/* test the system metrics with these settings */
test_GetSystemMetrics
();
}
...
...
@@ -1613,10 +1611,10 @@ static void test_SPI_SETMINIMIZEDMETRICS( void ) /* 44 */
rc
=
SystemParametersInfoA
(
SPI_SETMINIMIZEDMETRICS
,
sizeof
(
MINIMIZEDMETRICS
),
&
lpMm_cur
,
SPIF_UPDATEINIFILE
);
if
(
!
test_error_msg
(
rc
,
"SPI_SETMINIMIZEDMETRICS"
))
return
;
ok
(
rc
!=
0
,
"SystemParametersInfoA: rc=%d err=%d
\n
"
,
rc
,
GetLastError
());
ok
(
rc
,
"SystemParametersInfoA: rc=%d err=%d
\n
"
,
rc
,
GetLastError
());
/* read them back */
rc
=
SystemParametersInfoA
(
SPI_GETMINIMIZEDMETRICS
,
sizeof
(
MINIMIZEDMETRICS
),
&
lpMm_new
,
FALSE
);
ok
(
rc
!=
0
,
"SystemParametersInfoA: rc=%d err=%d
\n
"
,
rc
,
GetLastError
());
ok
(
rc
,
"SystemParametersInfoA: rc=%d err=%d
\n
"
,
rc
,
GetLastError
());
/* and compare */
eq
(
lpMm_new
.
iWidth
,
lpMm_cur
.
iWidth
,
"iWidth"
,
"%d"
);
eq
(
lpMm_new
.
iHorzGap
,
lpMm_cur
.
iHorzGap
,
"iHorzGap"
,
"%d"
);
...
...
@@ -1651,10 +1649,10 @@ static void test_SPI_SETMINIMIZEDMETRICS( void ) /* 44 */
lpMm_cur
.
iArrange
=
-
1
;
rc
=
SystemParametersInfoA
(
SPI_SETMINIMIZEDMETRICS
,
sizeof
(
MINIMIZEDMETRICS
),
&
lpMm_cur
,
SPIF_UPDATEINIFILE
);
ok
(
rc
!=
0
,
"SystemParametersInfoA: rc=%d err=%d
\n
"
,
rc
,
GetLastError
());
ok
(
rc
,
"SystemParametersInfoA: rc=%d err=%d
\n
"
,
rc
,
GetLastError
());
/* read back */
rc
=
SystemParametersInfoA
(
SPI_GETMINIMIZEDMETRICS
,
sizeof
(
MINIMIZEDMETRICS
),
&
lpMm_new
,
FALSE
);
ok
(
rc
!=
0
,
"SystemParametersInfoA: rc=%d err=%d
\n
"
,
rc
,
GetLastError
());
ok
(
rc
,
"SystemParametersInfoA: rc=%d err=%d
\n
"
,
rc
,
GetLastError
());
/* the width and H/V gaps have minimum 0, arrange is and'd with 0xf */
eq
(
lpMm_new
.
iWidth
,
0
,
"iWidth"
,
"%d"
);
eq
(
lpMm_new
.
iHorzGap
,
0
,
"iHorzGap"
,
"%d"
);
...
...
@@ -1689,10 +1687,10 @@ static void test_SPI_SETMINIMIZEDMETRICS( void ) /* 44 */
/* restore */
rc
=
SystemParametersInfoA
(
SPI_SETMINIMIZEDMETRICS
,
sizeof
(
MINIMIZEDMETRICS
),
&
lpMm_orig
,
SPIF_UPDATEINIFILE
);
ok
(
rc
!=
0
,
"***warning*** failed to restore the original value: rc=%d err=%d
\n
"
,
rc
,
GetLastError
());
ok
(
rc
,
"***warning*** failed to restore the original value: rc=%d err=%d
\n
"
,
rc
,
GetLastError
());
/* check that */
rc
=
SystemParametersInfoA
(
SPI_GETMINIMIZEDMETRICS
,
sizeof
(
MINIMIZEDMETRICS
),
&
lpMm_new
,
FALSE
);
ok
(
rc
!=
0
,
"SystemParametersInfoA: rc=%d err=%d
\n
"
,
rc
,
GetLastError
());
ok
(
rc
,
"SystemParametersInfoA: rc=%d err=%d
\n
"
,
rc
,
GetLastError
());
eq
(
lpMm_new
.
iWidth
,
lpMm_orig
.
iWidth
,
"iWidth"
,
"%d"
);
eq
(
lpMm_new
.
iHorzGap
,
lpMm_orig
.
iHorzGap
,
"iHorzGap"
,
"%d"
);
eq
(
lpMm_new
.
iVertGap
,
lpMm_orig
.
iVertGap
,
"iVertGap"
,
"%d"
);
...
...
@@ -1756,10 +1754,10 @@ static void test_SPI_SETICONMETRICS( void ) /* 46 */
rc
=
SystemParametersInfoA
(
SPI_SETICONMETRICS
,
sizeof
(
ICONMETRICSA
),
&
im_cur
,
SPIF_UPDATEINIFILE
);
if
(
!
test_error_msg
(
rc
,
"SPI_SETICONMETRICS"
))
return
;
ok
(
rc
!=
0
,
"SystemParametersInfoA: rc=%d err=%d
\n
"
,
rc
,
GetLastError
());
ok
(
rc
,
"SystemParametersInfoA: rc=%d err=%d
\n
"
,
rc
,
GetLastError
());
rc
=
SystemParametersInfoA
(
SPI_GETICONMETRICS
,
sizeof
(
ICONMETRICSA
),
&
im_new
,
FALSE
);
ok
(
rc
!=
0
,
"SystemParametersInfoA: rc=%d err=%d
\n
"
,
rc
,
GetLastError
());
ok
(
rc
,
"SystemParametersInfoA: rc=%d err=%d
\n
"
,
rc
,
GetLastError
());
/* test GET <-> SETICONMETRICS */
eq
(
im_new
.
iHorzSpacing
,
im_cur
.
iHorzSpacing
,
"iHorzSpacing"
,
"%d"
);
eq
(
im_new
.
iVertSpacing
,
im_cur
.
iVertSpacing
,
"iVertSpacing"
,
"%d"
);
...
...
@@ -1808,10 +1806,10 @@ static void test_SPI_SETICONMETRICS( void ) /* 46 */
wrap
,
im_cur
.
iTitleWrap
);
/* restore old values */
rc
=
SystemParametersInfoA
(
SPI_SETICONMETRICS
,
sizeof
(
ICONMETRICSA
),
&
im_orig
,
SPIF_UPDATEINIFILE
);
ok
(
rc
!=
0
,
"***warning*** failed to restore the original value: rc=%d err=%d
\n
"
,
rc
,
GetLastError
());
ok
(
rc
,
"***warning*** failed to restore the original value: rc=%d err=%d
\n
"
,
rc
,
GetLastError
());
rc
=
SystemParametersInfoA
(
SPI_GETICONMETRICS
,
sizeof
(
ICONMETRICSA
),
&
im_new
,
FALSE
);
ok
(
rc
!=
0
,
"SystemParametersInfoA: rc=%d err=%d
\n
"
,
rc
,
GetLastError
());
ok
(
rc
,
"SystemParametersInfoA: rc=%d err=%d
\n
"
,
rc
,
GetLastError
());
eq
(
im_new
.
iHorzSpacing
,
im_orig
.
iHorzSpacing
,
"iHorzSpacing"
,
"%d"
);
eq
(
im_new
.
iVertSpacing
,
im_orig
.
iVertSpacing
,
"iVertSpacing"
,
"%d"
);
...
...
@@ -1844,9 +1842,9 @@ static void test_SPI_SETWORKAREA( void ) /* 47 */
rc
=
SystemParametersInfoA
(
SPI_SETWORKAREA
,
0
,
&
curr_val
,
SPIF_UPDATEINIFILE
|
SPIF_SENDCHANGE
);
if
(
!
test_error_msg
(
rc
,
"SPI_SETWORKAREA"
))
return
;
ok
(
rc
!=
0
,
"SystemParametersInfoA: rc=%d err=%d
\n
"
,
rc
,
GetLastError
());
ok
(
rc
,
"SystemParametersInfoA: rc=%d err=%d
\n
"
,
rc
,
GetLastError
());
rc
=
SystemParametersInfoA
(
SPI_GETWORKAREA
,
0
,
&
area
,
0
);
ok
(
rc
!=
0
,
"SystemParametersInfoA: rc=%d err=%d
\n
"
,
rc
,
GetLastError
());
ok
(
rc
,
"SystemParametersInfoA: rc=%d err=%d
\n
"
,
rc
,
GetLastError
());
if
(
!
EqualRect
(
&
area
,
&
curr_val
))
/* no message if rect has not changed */
test_change_message
(
SPI_SETWORKAREA
,
0
);
eq
(
area
.
left
,
curr_val
.
left
,
"left"
,
"%d"
);
...
...
@@ -1859,9 +1857,9 @@ static void test_SPI_SETWORKAREA( void ) /* 47 */
curr_val
=
area
;
rc
=
SystemParametersInfoA
(
SPI_SETWORKAREA
,
0
,
&
old_area
,
SPIF_UPDATEINIFILE
|
SPIF_SENDCHANGE
);
ok
(
rc
!=
0
,
"***warning*** failed to restore the original value: rc=%d err=%d
\n
"
,
rc
,
GetLastError
());
ok
(
rc
,
"***warning*** failed to restore the original value: rc=%d err=%d
\n
"
,
rc
,
GetLastError
());
rc
=
SystemParametersInfoA
(
SPI_GETWORKAREA
,
0
,
&
area
,
0
);
ok
(
rc
!=
0
,
"SystemParametersInfoA: rc=%d err=%d
\n
"
,
rc
,
GetLastError
());
ok
(
rc
,
"SystemParametersInfoA: rc=%d err=%d
\n
"
,
rc
,
GetLastError
());
if
(
!
EqualRect
(
&
area
,
&
curr_val
))
/* no message if rect has not changed */
test_change_message
(
SPI_SETWORKAREA
,
0
);
eq
(
area
.
left
,
old_area
.
left
,
"left"
,
"%d"
);
...
...
@@ -1894,21 +1892,21 @@ static void test_SPI_SETSHOWSOUNDS( void ) /* 57 */
rc
=
SystemParametersInfoA
(
SPI_SETSHOWSOUNDS
,
vals
[
i
],
0
,
SPIF_UPDATEINIFILE
|
SPIF_SENDCHANGE
);
if
(
!
test_error_msg
(
rc
,
"SPI_SETSHOWSOUNDS"
))
return
;
ok
(
rc
!=
0
,
"%d: rc=%d err=%d
\n
"
,
i
,
rc
,
GetLastError
());
ok
(
rc
,
"%d: rc=%d err=%d
\n
"
,
i
,
rc
,
GetLastError
());
test_change_message
(
SPI_SETSHOWSOUNDS
,
1
);
test_reg_key
(
SPI_SETSHOWSOUNDS_REGKEY
,
SPI_SETSHOWSOUNDS_VALNAME
,
vals
[
i
]
?
"1"
:
"0"
);
rc
=
SystemParametersInfoA
(
SPI_GETSHOWSOUNDS
,
0
,
&
v
,
0
);
ok
(
rc
!=
0
,
"%d: rc=%d err=%d
\n
"
,
i
,
rc
,
GetLastError
());
ok
(
rc
,
"%d: rc=%d err=%d
\n
"
,
i
,
rc
,
GetLastError
());
eq
(
v
,
vals
[
i
],
"SPI_GETSHOWSOUNDS"
,
"%d"
);
eq
(
GetSystemMetrics
(
SM_SHOWSOUNDS
),
(
int
)
vals
[
i
],
"SM_SHOWSOUNDS"
,
"%d"
);
}
rc
=
SystemParametersInfoA
(
SPI_SETSHOWSOUNDS
,
old_b
,
0
,
SPIF_UPDATEINIFILE
);
ok
(
rc
!=
0
,
"***warning*** failed to restore the original value: rc=%d err=%d
\n
"
,
rc
,
GetLastError
());
ok
(
rc
,
"***warning*** failed to restore the original value: rc=%d err=%d
\n
"
,
rc
,
GetLastError
());
}
static
void
test_SPI_SETKEYBOARDPREF
(
void
)
/* 69 */
...
...
@@ -1931,19 +1929,19 @@ static void test_SPI_SETKEYBOARDPREF( void ) /* 69 */
rc
=
SystemParametersInfoA
(
SPI_SETKEYBOARDPREF
,
vals
[
i
],
0
,
SPIF_UPDATEINIFILE
|
SPIF_SENDCHANGE
);
if
(
!
test_error_msg
(
rc
,
"SPI_SETKEYBOARDPREF"
))
return
;
ok
(
rc
!=
0
,
"%d: rc=%d err=%d
\n
"
,
i
,
rc
,
GetLastError
());
ok
(
rc
,
"%d: rc=%d err=%d
\n
"
,
i
,
rc
,
GetLastError
());
test_change_message
(
SPI_SETKEYBOARDPREF
,
1
);
test_reg_key_ex2
(
SPI_SETKEYBOARDPREF_REGKEY
,
SPI_SETKEYBOARDPREF_REGKEY_LEGACY
,
SPI_SETKEYBOARDPREF_VALNAME
,
SPI_SETKEYBOARDPREF_VALNAME_LEGACY
,
vals
[
i
]
?
"1"
:
"0"
);
rc
=
SystemParametersInfoA
(
SPI_GETKEYBOARDPREF
,
0
,
&
v
,
0
);
ok
(
rc
!=
0
,
"%d: rc=%d err=%d
\n
"
,
i
,
rc
,
GetLastError
());
ok
(
rc
,
"%d: rc=%d err=%d
\n
"
,
i
,
rc
,
GetLastError
());
eq
(
v
,
(
BOOL
)
vals
[
i
],
"SPI_GETKEYBOARDPREF"
,
"%d"
);
}
rc
=
SystemParametersInfoA
(
SPI_SETKEYBOARDPREF
,
old_b
,
0
,
SPIF_UPDATEINIFILE
);
ok
(
rc
!=
0
,
"***warning*** failed to restore the original value: rc=%d err=%d
\n
"
,
rc
,
GetLastError
());
ok
(
rc
,
"***warning*** failed to restore the original value: rc=%d err=%d
\n
"
,
rc
,
GetLastError
());
}
static
void
test_SPI_SETSCREENREADER
(
void
)
/* 71 */
...
...
@@ -1966,19 +1964,19 @@ static void test_SPI_SETSCREENREADER( void ) /* 71 */
rc
=
SystemParametersInfoA
(
SPI_SETSCREENREADER
,
vals
[
i
],
0
,
SPIF_UPDATEINIFILE
|
SPIF_SENDCHANGE
);
if
(
!
test_error_msg
(
rc
,
"SPI_SETSCREENREADER"
))
return
;
ok
(
rc
!=
0
,
"%d: rc=%d err=%d
\n
"
,
i
,
rc
,
GetLastError
());
ok
(
rc
,
"%d: rc=%d err=%d
\n
"
,
i
,
rc
,
GetLastError
());
test_change_message
(
SPI_SETSCREENREADER
,
1
);
test_reg_key_ex2_optional
(
SPI_SETSCREENREADER_REGKEY
,
SPI_SETSCREENREADER_REGKEY_LEGACY
,
SPI_SETSCREENREADER_VALNAME
,
SPI_SETSCREENREADER_VALNAME_LEGACY
,
vals
[
i
]
?
"1"
:
"0"
);
rc
=
SystemParametersInfoA
(
SPI_GETSCREENREADER
,
0
,
&
v
,
0
);
ok
(
rc
!=
0
,
"%d: rc=%d err=%d
\n
"
,
i
,
rc
,
GetLastError
());
ok
(
rc
,
"%d: rc=%d err=%d
\n
"
,
i
,
rc
,
GetLastError
());
eq
(
v
,
(
BOOL
)
vals
[
i
],
"SPI_GETSCREENREADER"
,
"%d"
);
}
rc
=
SystemParametersInfoA
(
SPI_SETSCREENREADER
,
old_b
,
0
,
SPIF_UPDATEINIFILE
);
ok
(
rc
!=
0
,
"***warning*** failed to restore the original value: rc=%d err=%d
\n
"
,
rc
,
GetLastError
());
ok
(
rc
,
"***warning*** failed to restore the original value: rc=%d err=%d
\n
"
,
rc
,
GetLastError
());
}
static
void
test_SPI_SETFONTSMOOTHING
(
void
)
/* 75 */
...
...
@@ -2006,7 +2004,7 @@ static void test_SPI_SETFONTSMOOTHING( void ) /* 75 */
rc
=
SystemParametersInfoA
(
SPI_SETFONTSMOOTHING
,
vals
[
i
],
0
,
SPIF_UPDATEINIFILE
|
SPIF_SENDCHANGE
);
if
(
!
test_error_msg
(
rc
,
"SPI_SETFONTSMOOTHING"
))
return
;
ok
(
rc
!=
0
,
"%d: rc=%d err=%d
\n
"
,
i
,
rc
,
GetLastError
());
ok
(
rc
,
"%d: rc=%d err=%d
\n
"
,
i
,
rc
,
GetLastError
());
test_change_message
(
SPI_SETFONTSMOOTHING
,
0
);
test_reg_key
(
SPI_SETFONTSMOOTHING_REGKEY
,
SPI_SETFONTSMOOTHING_VALNAME
,
...
...
@@ -2015,7 +2013,7 @@ static void test_SPI_SETFONTSMOOTHING( void ) /* 75 */
rc
=
SystemParametersInfoA
(
SPI_SETFONTSMOOTHINGTYPE
,
0
,
UlongToPtr
(
vals
[
i
]),
SPIF_UPDATEINIFILE
|
SPIF_SENDCHANGE
);
if
(
!
test_error_msg
(
rc
,
"SPI_SETFONTSMOOTHINGTYPE"
))
return
;
ok
(
rc
!=
0
,
"%d: rc=%d err=%d
\n
"
,
i
,
rc
,
GetLastError
());
ok
(
rc
,
"%d: rc=%d err=%d
\n
"
,
i
,
rc
,
GetLastError
());
test_change_message
(
SPI_SETFONTSMOOTHINGTYPE
,
0
);
test_reg_key_dword
(
SPI_SETFONTSMOOTHING_REGKEY
,
SPI_SETFONTSMOOTHINGTYPE_VALNAME
,
&
vals
[
i
]
);
...
...
@@ -2023,7 +2021,7 @@ static void test_SPI_SETFONTSMOOTHING( void ) /* 75 */
rc
=
SystemParametersInfoA
(
SPI_SETFONTSMOOTHINGCONTRAST
,
0
,
UlongToPtr
(
vals
[
i
]),
SPIF_UPDATEINIFILE
|
SPIF_SENDCHANGE
);
if
(
!
test_error_msg
(
rc
,
"SPI_SETFONTSMOOTHINGCONTRAST"
))
return
;
ok
(
rc
!=
0
,
"%d: rc=%d err=%d
\n
"
,
i
,
rc
,
GetLastError
());
ok
(
rc
,
"%d: rc=%d err=%d
\n
"
,
i
,
rc
,
GetLastError
());
test_change_message
(
SPI_SETFONTSMOOTHINGCONTRAST
,
0
);
test_reg_key_dword
(
SPI_SETFONTSMOOTHING_REGKEY
,
SPI_SETFONTSMOOTHINGCONTRAST_VALNAME
,
&
vals
[
i
]
);
...
...
@@ -2031,36 +2029,36 @@ static void test_SPI_SETFONTSMOOTHING( void ) /* 75 */
rc
=
SystemParametersInfoA
(
SPI_SETFONTSMOOTHINGORIENTATION
,
0
,
UlongToPtr
(
vals
[
i
]),
SPIF_UPDATEINIFILE
|
SPIF_SENDCHANGE
);
if
(
!
test_error_msg
(
rc
,
"SPI_SETFONTSMOOTHINGORIENTATION"
))
return
;
ok
(
rc
!=
0
,
"%d: rc=%d err=%d
\n
"
,
i
,
rc
,
GetLastError
());
ok
(
rc
,
"%d: rc=%d err=%d
\n
"
,
i
,
rc
,
GetLastError
());
test_change_message
(
SPI_SETFONTSMOOTHINGORIENTATION
,
0
);
test_reg_key_dword
(
SPI_SETFONTSMOOTHING_REGKEY
,
SPI_SETFONTSMOOTHINGORIENTATION_VALNAME
,
&
vals
[
i
]
);
rc
=
SystemParametersInfoA
(
SPI_GETFONTSMOOTHING
,
0
,
&
v
,
0
);
ok
(
rc
!=
0
,
"%d: rc=%d err=%d
\n
"
,
i
,
rc
,
GetLastError
());
ok
(
rc
,
"%d: rc=%d err=%d
\n
"
,
i
,
rc
,
GetLastError
());
eq
(
v
,
vals
[
i
]
?
1
:
0
,
"SPI_GETFONTSMOOTHING"
,
"%d"
);
rc
=
SystemParametersInfoA
(
SPI_GETFONTSMOOTHINGTYPE
,
0
,
&
v
,
0
);
ok
(
rc
!=
0
,
"%d: rc=%d err=%d
\n
"
,
i
,
rc
,
GetLastError
());
ok
(
rc
,
"%d: rc=%d err=%d
\n
"
,
i
,
rc
,
GetLastError
());
ok
(
v
==
vals
[
i
],
"wrong value %x/%x
\n
"
,
v
,
vals
[
i
]
);
rc
=
SystemParametersInfoA
(
SPI_GETFONTSMOOTHINGCONTRAST
,
0
,
&
v
,
0
);
ok
(
rc
!=
0
,
"%d: rc=%d err=%d
\n
"
,
i
,
rc
,
GetLastError
());
ok
(
rc
,
"%d: rc=%d err=%d
\n
"
,
i
,
rc
,
GetLastError
());
ok
(
v
==
vals
[
i
],
"wrong value %x/%x
\n
"
,
v
,
vals
[
i
]
);
rc
=
SystemParametersInfoA
(
SPI_GETFONTSMOOTHINGORIENTATION
,
0
,
&
v
,
0
);
ok
(
rc
!=
0
,
"%d: rc=%d err=%d
\n
"
,
i
,
rc
,
GetLastError
());
ok
(
rc
,
"%d: rc=%d err=%d
\n
"
,
i
,
rc
,
GetLastError
());
ok
(
v
==
vals
[
i
],
"wrong value %x/%x
\n
"
,
v
,
vals
[
i
]
);
}
rc
=
SystemParametersInfoA
(
SPI_SETFONTSMOOTHING
,
old_b
,
0
,
SPIF_UPDATEINIFILE
);
ok
(
rc
!=
0
,
"***warning*** failed to restore the original value: rc=%d err=%d
\n
"
,
rc
,
GetLastError
());
ok
(
rc
,
"***warning*** failed to restore the original value: rc=%d err=%d
\n
"
,
rc
,
GetLastError
());
rc
=
SystemParametersInfoA
(
SPI_SETFONTSMOOTHINGTYPE
,
old_type
,
0
,
SPIF_UPDATEINIFILE
);
ok
(
rc
!=
0
,
"***warning*** failed to restore the original value: rc=%d err=%d
\n
"
,
rc
,
GetLastError
());
ok
(
rc
,
"***warning*** failed to restore the original value: rc=%d err=%d
\n
"
,
rc
,
GetLastError
());
rc
=
SystemParametersInfoA
(
SPI_SETFONTSMOOTHINGCONTRAST
,
old_contrast
,
0
,
SPIF_UPDATEINIFILE
);
ok
(
rc
!=
0
,
"***warning*** failed to restore the original value: rc=%d err=%d
\n
"
,
rc
,
GetLastError
());
ok
(
rc
,
"***warning*** failed to restore the original value: rc=%d err=%d
\n
"
,
rc
,
GetLastError
());
rc
=
SystemParametersInfoA
(
SPI_SETFONTSMOOTHINGORIENTATION
,
old_orient
,
0
,
SPIF_UPDATEINIFILE
);
ok
(
rc
!=
0
,
"***warning*** failed to restore the original value: rc=%d err=%d
\n
"
,
rc
,
GetLastError
());
ok
(
rc
,
"***warning*** failed to restore the original value: rc=%d err=%d
\n
"
,
rc
,
GetLastError
());
}
static
void
test_SPI_SETLOWPOWERACTIVE
(
void
)
/* 85 */
...
...
@@ -2083,7 +2081,7 @@ static void test_SPI_SETLOWPOWERACTIVE( void ) /* 85 */
rc
=
SystemParametersInfoA
(
SPI_SETLOWPOWERACTIVE
,
vals
[
i
],
0
,
SPIF_UPDATEINIFILE
|
SPIF_SENDCHANGE
);
if
(
!
test_error_msg
(
rc
,
"SPI_SETLOWPOWERACTIVE"
))
return
;
ok
(
rc
!=
0
,
"%d: rc=%d err=%d
\n
"
,
i
,
rc
,
GetLastError
());
ok
(
rc
,
"%d: rc=%d err=%d
\n
"
,
i
,
rc
,
GetLastError
());
test_change_message
(
SPI_SETLOWPOWERACTIVE
,
1
);
test_reg_key_optional
(
SPI_SETLOWPOWERACTIVE_REGKEY
,
SPI_SETLOWPOWERACTIVE_VALNAME
,
...
...
@@ -2092,7 +2090,7 @@ static void test_SPI_SETLOWPOWERACTIVE( void ) /* 85 */
/* SPI_SETLOWPOWERACTIVE is not persistent in win2k3 and above */
v
=
0xdeadbeef
;
rc
=
SystemParametersInfoA
(
SPI_GETLOWPOWERACTIVE
,
0
,
&
v
,
0
);
ok
(
rc
!=
0
,
"%d: rc=%d err=%d
\n
"
,
i
,
rc
,
GetLastError
());
ok
(
rc
,
"%d: rc=%d err=%d
\n
"
,
i
,
rc
,
GetLastError
());
ok
(
v
==
vals
[
i
]
||
broken
(
v
==
(
0xdead0000
|
vals
[
i
]))
||
/* win98 only sets the low word */
v
==
0
,
/* win2k3 */
...
...
@@ -2100,7 +2098,7 @@ static void test_SPI_SETLOWPOWERACTIVE( void ) /* 85 */
}
rc
=
SystemParametersInfoA
(
SPI_SETLOWPOWERACTIVE
,
old_b
,
0
,
SPIF_UPDATEINIFILE
);
ok
(
rc
!=
0
,
"***warning*** failed to restore the original value: rc=%d err=%d
\n
"
,
rc
,
GetLastError
());
ok
(
rc
,
"***warning*** failed to restore the original value: rc=%d err=%d
\n
"
,
rc
,
GetLastError
());
}
static
void
test_SPI_SETPOWEROFFACTIVE
(
void
)
/* 86 */
...
...
@@ -2123,7 +2121,7 @@ static void test_SPI_SETPOWEROFFACTIVE( void ) /* 86 */
rc
=
SystemParametersInfoA
(
SPI_SETPOWEROFFACTIVE
,
vals
[
i
],
0
,
SPIF_UPDATEINIFILE
|
SPIF_SENDCHANGE
);
if
(
!
test_error_msg
(
rc
,
"SPI_SETPOWEROFFACTIVE"
))
return
;
ok
(
rc
!=
0
,
"%d: rc=%d err=%d
\n
"
,
i
,
rc
,
GetLastError
());
ok
(
rc
,
"%d: rc=%d err=%d
\n
"
,
i
,
rc
,
GetLastError
());
test_change_message
(
SPI_SETPOWEROFFACTIVE
,
1
);
test_reg_key_optional
(
SPI_SETPOWEROFFACTIVE_REGKEY
,
SPI_SETPOWEROFFACTIVE_VALNAME
,
...
...
@@ -2132,7 +2130,7 @@ static void test_SPI_SETPOWEROFFACTIVE( void ) /* 86 */
/* SPI_SETPOWEROFFACTIVE is not persistent in win2k3 and above */
v
=
0xdeadbeef
;
rc
=
SystemParametersInfoA
(
SPI_GETPOWEROFFACTIVE
,
0
,
&
v
,
0
);
ok
(
rc
!=
0
,
"%d: rc=%d err=%d
\n
"
,
i
,
rc
,
GetLastError
());
ok
(
rc
,
"%d: rc=%d err=%d
\n
"
,
i
,
rc
,
GetLastError
());
ok
(
v
==
vals
[
i
]
||
broken
(
v
==
(
0xdead0000
|
vals
[
i
]))
||
/* win98 only sets the low word */
v
==
0
,
/* win2k3 */
...
...
@@ -2140,7 +2138,7 @@ static void test_SPI_SETPOWEROFFACTIVE( void ) /* 86 */
}
rc
=
SystemParametersInfoA
(
SPI_SETPOWEROFFACTIVE
,
old_b
,
0
,
SPIF_UPDATEINIFILE
);
ok
(
rc
!=
0
,
"***warning*** failed to restore the original value: rc=%d err=%d
\n
"
,
rc
,
GetLastError
());
ok
(
rc
,
"***warning*** failed to restore the original value: rc=%d err=%d
\n
"
,
rc
,
GetLastError
());
}
static
void
test_SPI_SETSNAPTODEFBUTTON
(
void
)
/* 95 */
...
...
@@ -2163,19 +2161,19 @@ static void test_SPI_SETSNAPTODEFBUTTON( void ) /* 95 */
rc
=
SystemParametersInfoA
(
SPI_SETSNAPTODEFBUTTON
,
vals
[
i
],
0
,
SPIF_UPDATEINIFILE
|
SPIF_SENDCHANGE
);
if
(
!
test_error_msg
(
rc
,
"SPI_SETSNAPTODEFBUTTON"
))
return
;
ok
(
rc
!=
0
,
"%d: rc=%d err=%d
\n
"
,
i
,
rc
,
GetLastError
());
ok
(
rc
,
"%d: rc=%d err=%d
\n
"
,
i
,
rc
,
GetLastError
());
test_change_message
(
SPI_SETSNAPTODEFBUTTON
,
0
);
test_reg_key_optional
(
SPI_SETSNAPTODEFBUTTON_REGKEY
,
SPI_SETSNAPTODEFBUTTON_VALNAME
,
vals
[
i
]
?
"1"
:
"0"
);
rc
=
SystemParametersInfoA
(
SPI_GETSNAPTODEFBUTTON
,
0
,
&
v
,
0
);
ok
(
rc
!=
0
,
"%d: rc=%d err=%d
\n
"
,
i
,
rc
,
GetLastError
());
ok
(
rc
,
"%d: rc=%d err=%d
\n
"
,
i
,
rc
,
GetLastError
());
eq
(
v
,
vals
[
i
],
"SPI_GETSNAPTODEFBUTTON"
,
"%d"
);
}
rc
=
SystemParametersInfoA
(
SPI_SETSNAPTODEFBUTTON
,
old_b
,
0
,
SPIF_UPDATEINIFILE
);
ok
(
rc
!=
0
,
"***warning*** failed to restore the original value: rc=%d err=%d
\n
"
,
rc
,
GetLastError
());
ok
(
rc
,
"***warning*** failed to restore the original value: rc=%d err=%d
\n
"
,
rc
,
GetLastError
());
}
static
void
test_SPI_SETMOUSEHOVERWIDTH
(
void
)
/* 99 */
...
...
@@ -2202,20 +2200,20 @@ static void test_SPI_SETMOUSEHOVERWIDTH( void ) /* 99 */
rc
=
SystemParametersInfoA
(
SPI_SETMOUSEHOVERWIDTH
,
vals
[
i
],
0
,
SPIF_UPDATEINIFILE
|
SPIF_SENDCHANGE
);
if
(
!
test_error_msg
(
rc
,
"SPI_SETMOUSEHOVERWIDTH"
))
return
;
ok
(
rc
!=
0
,
"%d: rc=%d err=%d
\n
"
,
i
,
rc
,
GetLastError
());
ok
(
rc
,
"%d: rc=%d err=%d
\n
"
,
i
,
rc
,
GetLastError
());
test_change_message
(
SPI_SETMOUSEHOVERWIDTH
,
0
);
sprintf
(
buf
,
"%d"
,
vals
[
i
]
);
test_reg_key
(
SPI_SETMOUSEHOVERWIDTH_REGKEY
,
SPI_SETMOUSEHOVERWIDTH_VALNAME
,
buf
);
SystemParametersInfoA
(
SPI_GETMOUSEHOVERWIDTH
,
0
,
&
v
,
0
);
ok
(
rc
!=
0
,
"%d: rc=%d err=%d
\n
"
,
i
,
rc
,
GetLastError
());
ok
(
rc
,
"%d: rc=%d err=%d
\n
"
,
i
,
rc
,
GetLastError
());
eq
(
v
,
vals
[
i
],
"SPI_{GET,SET}MOUSEHOVERWIDTH"
,
"%d"
);
}
rc
=
SystemParametersInfoA
(
SPI_SETMOUSEHOVERWIDTH
,
old_width
,
0
,
SPIF_UPDATEINIFILE
);
ok
(
rc
!=
0
,
"***warning*** failed to restore the original value: rc=%d err=%d
\n
"
,
rc
,
GetLastError
());
ok
(
rc
,
"***warning*** failed to restore the original value: rc=%d err=%d
\n
"
,
rc
,
GetLastError
());
}
static
void
test_SPI_SETMOUSEHOVERHEIGHT
(
void
)
/* 101 */
...
...
@@ -2242,20 +2240,20 @@ static void test_SPI_SETMOUSEHOVERHEIGHT( void ) /* 101 */
rc
=
SystemParametersInfoA
(
SPI_SETMOUSEHOVERHEIGHT
,
vals
[
i
],
0
,
SPIF_UPDATEINIFILE
|
SPIF_SENDCHANGE
);
if
(
!
test_error_msg
(
rc
,
"SPI_SETMOUSEHOVERHEIGHT"
))
return
;
ok
(
rc
!=
0
,
"%d: rc=%d err=%d
\n
"
,
i
,
rc
,
GetLastError
());
ok
(
rc
,
"%d: rc=%d err=%d
\n
"
,
i
,
rc
,
GetLastError
());
test_change_message
(
SPI_SETMOUSEHOVERHEIGHT
,
0
);
sprintf
(
buf
,
"%d"
,
vals
[
i
]
);
test_reg_key
(
SPI_SETMOUSEHOVERHEIGHT_REGKEY
,
SPI_SETMOUSEHOVERHEIGHT_VALNAME
,
buf
);
SystemParametersInfoA
(
SPI_GETMOUSEHOVERHEIGHT
,
0
,
&
v
,
0
);
ok
(
rc
!=
0
,
"%d: rc=%d err=%d
\n
"
,
i
,
rc
,
GetLastError
());
ok
(
rc
,
"%d: rc=%d err=%d
\n
"
,
i
,
rc
,
GetLastError
());
eq
(
v
,
vals
[
i
],
"SPI_{GET,SET}MOUSEHOVERHEIGHT"
,
"%d"
);
}
rc
=
SystemParametersInfoA
(
SPI_SETMOUSEHOVERHEIGHT
,
old_height
,
0
,
SPIF_UPDATEINIFILE
);
ok
(
rc
!=
0
,
"***warning*** failed to restore the original value: rc=%d err=%d
\n
"
,
rc
,
GetLastError
());
ok
(
rc
,
"***warning*** failed to restore the original value: rc=%d err=%d
\n
"
,
rc
,
GetLastError
());
}
static
void
test_SPI_SETMOUSEHOVERTIME
(
void
)
/* 103 */
...
...
@@ -2286,20 +2284,20 @@ static void test_SPI_SETMOUSEHOVERTIME( void ) /* 103 */
rc
=
SystemParametersInfoA
(
SPI_SETMOUSEHOVERTIME
,
vals
[
i
],
0
,
SPIF_UPDATEINIFILE
|
SPIF_SENDCHANGE
);
if
(
!
test_error_msg
(
rc
,
"SPI_SETMOUSEHOVERTIME"
))
return
;
ok
(
rc
!=
0
,
"%d: rc=%d err=%d
\n
"
,
i
,
rc
,
GetLastError
());
ok
(
rc
,
"%d: rc=%d err=%d
\n
"
,
i
,
rc
,
GetLastError
());
test_change_message
(
SPI_SETMOUSEHOVERTIME
,
0
);
sprintf
(
buf
,
"%d"
,
vals
[
i
]
);
test_reg_key
(
SPI_SETMOUSEHOVERTIME_REGKEY
,
SPI_SETMOUSEHOVERTIME_VALNAME
,
buf
);
SystemParametersInfoA
(
SPI_GETMOUSEHOVERTIME
,
0
,
&
v
,
0
);
ok
(
rc
!=
0
,
"%d: rc=%d err=%d
\n
"
,
i
,
rc
,
GetLastError
());
ok
(
rc
,
"%d: rc=%d err=%d
\n
"
,
i
,
rc
,
GetLastError
());
eq
(
v
,
vals
[
i
],
"SPI_{GET,SET}MOUSEHOVERTIME"
,
"%d"
);
}
rc
=
SystemParametersInfoA
(
SPI_SETMOUSEHOVERTIME
,
old_time
,
0
,
SPIF_UPDATEINIFILE
);
ok
(
rc
!=
0
,
"***warning*** failed to restore the original value: rc=%d err=%d
\n
"
,
rc
,
GetLastError
());
ok
(
rc
,
"***warning*** failed to restore the original value: rc=%d err=%d
\n
"
,
rc
,
GetLastError
());
}
static
void
test_SPI_SETWHEELSCROLLLINES
(
void
)
/* 105 */
...
...
@@ -2325,20 +2323,20 @@ static void test_SPI_SETWHEELSCROLLLINES( void ) /* 105 */
rc
=
SystemParametersInfoA
(
SPI_SETWHEELSCROLLLINES
,
vals
[
i
],
0
,
SPIF_UPDATEINIFILE
|
SPIF_SENDCHANGE
);
if
(
!
test_error_msg
(
rc
,
"SPI_SETWHEELSCROLLLINES"
))
return
;
ok
(
rc
!=
0
,
"%d: rc=%d err=%d
\n
"
,
i
,
rc
,
GetLastError
());
ok
(
rc
,
"%d: rc=%d err=%d
\n
"
,
i
,
rc
,
GetLastError
());
test_change_message
(
SPI_SETWHEELSCROLLLINES
,
0
);
sprintf
(
buf
,
"%d"
,
vals
[
i
]
);
test_reg_key
(
SPI_SETMOUSESCROLLLINES_REGKEY
,
SPI_SETMOUSESCROLLLINES_VALNAME
,
buf
);
SystemParametersInfoA
(
SPI_GETWHEELSCROLLLINES
,
0
,
&
v
,
0
);
ok
(
rc
!=
0
,
"%d: rc=%d err=%d
\n
"
,
i
,
rc
,
GetLastError
());
ok
(
rc
,
"%d: rc=%d err=%d
\n
"
,
i
,
rc
,
GetLastError
());
eq
(
v
,
vals
[
i
],
"SPI_{GET,SET}WHEELSCROLLLINES"
,
"%d"
);
}
rc
=
SystemParametersInfoA
(
SPI_SETWHEELSCROLLLINES
,
old_lines
,
0
,
SPIF_UPDATEINIFILE
);
ok
(
rc
!=
0
,
"***warning*** failed to restore the original value: rc=%d err=%d
\n
"
,
rc
,
GetLastError
());
ok
(
rc
,
"***warning*** failed to restore the original value: rc=%d err=%d
\n
"
,
rc
,
GetLastError
());
}
static
void
test_SPI_SETMENUSHOWDELAY
(
void
)
/* 107 */
...
...
@@ -2364,20 +2362,20 @@ static void test_SPI_SETMENUSHOWDELAY( void ) /* 107 */
rc
=
SystemParametersInfoA
(
SPI_SETMENUSHOWDELAY
,
vals
[
i
],
0
,
SPIF_UPDATEINIFILE
|
SPIF_SENDCHANGE
);
if
(
!
test_error_msg
(
rc
,
"SPI_SETMENUSHOWDELAY"
))
return
;
ok
(
rc
!=
0
,
"%d: rc=%d err=%d
\n
"
,
i
,
rc
,
GetLastError
());
ok
(
rc
,
"%d: rc=%d err=%d
\n
"
,
i
,
rc
,
GetLastError
());
test_change_message
(
SPI_SETMENUSHOWDELAY
,
0
);
sprintf
(
buf
,
"%d"
,
vals
[
i
]
);
test_reg_key
(
SPI_SETMENUSHOWDELAY_REGKEY
,
SPI_SETMENUSHOWDELAY_VALNAME
,
buf
);
SystemParametersInfoA
(
SPI_GETMENUSHOWDELAY
,
0
,
&
v
,
0
);
ok
(
rc
!=
0
,
"%d: rc=%d err=%d
\n
"
,
i
,
rc
,
GetLastError
());
ok
(
rc
,
"%d: rc=%d err=%d
\n
"
,
i
,
rc
,
GetLastError
());
eq
(
v
,
vals
[
i
],
"SPI_{GET,SET}MENUSHOWDELAY"
,
"%d"
);
}
rc
=
SystemParametersInfoA
(
SPI_SETMENUSHOWDELAY
,
old_delay
,
0
,
SPIF_UPDATEINIFILE
);
ok
(
rc
!=
0
,
"***warning*** failed to restore the original value: rc=%d err=%d
\n
"
,
rc
,
GetLastError
());
ok
(
rc
,
"***warning*** failed to restore the original value: rc=%d err=%d
\n
"
,
rc
,
GetLastError
());
}
static
void
test_SPI_SETWHEELSCROLLCHARS
(
void
)
/* 108 */
...
...
@@ -2409,13 +2407,13 @@ static void test_SPI_SETWHEELSCROLLCHARS( void ) /* 108 */
SPI_SETMOUSESCROLLCHARS_VALNAME
,
buf
);
SystemParametersInfoA
(
SPI_GETWHEELSCROLLCHARS
,
0
,
&
v
,
0
);
ok
(
rc
!=
0
,
"%d: rc=%d err=%d
\n
"
,
i
,
rc
,
GetLastError
());
ok
(
rc
,
"%d: rc=%d err=%d
\n
"
,
i
,
rc
,
GetLastError
());
eq
(
v
,
vals
[
i
],
"SPI_{GET,SET}WHEELSCROLLCHARS"
,
"%d"
);
}
rc
=
SystemParametersInfoA
(
SPI_SETWHEELSCROLLCHARS
,
old_chars
,
0
,
SPIF_UPDATEINIFILE
);
ok
(
rc
!=
0
,
"***warning*** failed to restore the original value: rc=%d err=%d
\n
"
,
rc
,
GetLastError
());
ok
(
rc
,
"***warning*** failed to restore the original value: rc=%d err=%d
\n
"
,
rc
,
GetLastError
());
}
static
void
test_SPI_SETWALLPAPER
(
void
)
/* 115 */
...
...
@@ -2436,11 +2434,11 @@ static void test_SPI_SETWALLPAPER( void ) /* 115 */
strcpy
(
newval
,
""
);
rc
=
SystemParametersInfoA
(
SPI_SETDESKWALLPAPER
,
0
,
newval
,
SPIF_UPDATEINIFILE
|
SPIF_SENDCHANGE
);
if
(
!
test_error_msg
(
rc
,
"SPI_SETDESKWALLPAPER"
))
return
;
ok
(
rc
!=
0
,
"SystemParametersInfoA: rc=%d err=%d
\n
"
,
rc
,
GetLastError
());
ok
(
rc
,
"SystemParametersInfoA: rc=%d err=%d
\n
"
,
rc
,
GetLastError
());
test_change_message
(
SPI_SETDESKWALLPAPER
,
0
);
rc
=
SystemParametersInfoA
(
SPI_SETDESKWALLPAPER
,
0
,
oldval
,
SPIF_UPDATEINIFILE
);
ok
(
rc
!=
0
,
"***warning*** failed to restore the original value: rc=%d err=%d
\n
"
,
rc
,
GetLastError
());
ok
(
rc
,
"***warning*** failed to restore the original value: rc=%d err=%d
\n
"
,
rc
,
GetLastError
());
test_reg_key
(
SPI_SETDESKWALLPAPER_REGKEY
,
SPI_SETDESKWALLPAPER_VALNAME
,
oldval
);
}
...
...
dlls/user32/tests/wsprintf.c
View file @
0e37ca14
...
...
@@ -113,16 +113,16 @@ static void wsprintfWTest(void)
static
void
CharUpperTest
(
void
)
{
INT_PTR
i
,
out
,
failed
;
INT_PTR
i
,
out
;
BOOL
failed
=
FALSE
;
failed
=
0
;
for
(
i
=
0
;
i
<
256
;
i
++
)
{
out
=
(
INT_PTR
)
CharUpperA
((
LPSTR
)
i
);
/* printf("%0x ",out); */
if
((
out
>>
16
)
!=
0
)
{
failed
=
1
;
failed
=
TRUE
;
break
;
}
}
...
...
@@ -131,16 +131,16 @@ static void CharUpperTest(void)
static
void
CharLowerTest
(
void
)
{
INT_PTR
i
,
out
,
failed
;
INT_PTR
i
,
out
;
BOOL
failed
=
FALSE
;
failed
=
0
;
for
(
i
=
0
;
i
<
256
;
i
++
)
{
out
=
(
INT_PTR
)
CharLowerA
((
LPSTR
)
i
);
/* printf("%0x ",out); */
if
((
out
>>
16
)
!=
0
)
{
failed
=
1
;
failed
=
TRUE
;
break
;
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment