ReactOS 0.4.15-dev-8236-g99f0937
NtUserSystemParametersInfo.c
Go to the documentation of this file.
1/*
2 * PROJECT: ReactOS api tests
3 * LICENSE: GPL - See COPYING in the top level directory
4 * PURPOSE: Test for NtUserSystemParametersInfo
5 * PROGRAMMERS:
6 */
7
8#include "../win32nt.h"
9
10#include <winreg.h>
11
12static const WCHAR* KEY_MOUSE = L"Control Panel\\Mouse";
13//static const WCHAR* VAL_MOUSE1 = L"MouseThreshold1";
14//static const WCHAR* VAL_MOUSE2 = L"MouseThreshold2";
15//static const WCHAR* VAL_MOUSE3 = L"MouseSpeed";
16//static const WCHAR* VAL_DBLCLKWIDTH = L"DoubleClickWidth";
17//static const WCHAR* VAL_DBLCLKHEIGHT = L"DoubleClickHeight";
18//static const WCHAR* VAL_DBLCLKTIME = L"DoubleClickSpeed";
19static const WCHAR* VAL_SWAP = L"SwapMouseButtons";
20
21static const WCHAR* KEY_DESKTOP = L"Control Panel\\Desktop";
22//static const WCHAR* VAL_SCRTO = L"ScreenSaveTimeOut";
23//static const WCHAR* VAL_SCRACT = L"ScreenSaveActive";
24//static const WCHAR* VAL_GRID = L"GridGranularity";
25//static const WCHAR* VAL_DRAG = L"DragFullWindows";
26//static const WCHAR* VAL_DRAGHEIGHT = L"DragHeight";
27//static const WCHAR* VAL_DRAGWIDTH = L"DragWidth";
28//static const WCHAR* VAL_FNTSMOOTH = L"FontSmoothing";
29static const WCHAR* VAL_PREFMASK = L"UserPreferencesMask";
30
31enum
32{
41 UPM_RESERVED = 0x100,
42 UPM_MENUFADE = 0x200,
47 UPM_CLICKLOCK = 0x8000,
48 // room for more
49 UPM_UIEFFECTS = 0x80000000,
50 UPM_DEFAULT = 0x80003E9E
52
53
54//static const WCHAR* KEY_MDALIGN = L"Software\\Microsoft\\Windows NT\\CurrentVersion\\Windows";
55//static const WCHAR* VAL_MDALIGN = L"MenuDropAlignment";
56
57static const WCHAR* KEY_METRIC = L"Control Panel\\Desktop\\WindowMetrics";
58//static const WCHAR* VAL_BORDER = L"BorderWidth";
59//static const WCHAR* VAL_ICONSPC = L"IconSpacing";
60//static const WCHAR* VAL_ICONVSPC = L"IconVerticalspacing";
61//static const WCHAR* VAL_ITWRAP = L"IconTitleWrap";
62
63static const WCHAR* KEY_SOUND = L"Control Panel\\Sound";
64static const WCHAR* VAL_BEEP = L"Beep";
65
66//static const WCHAR* KEY_KBD = L"Control Panel\\Keyboard";
67//static const WCHAR* VAL_KBDSPD = L"KeyboardSpeed";
68//static const WCHAR* VAL_KBDDELAY = L"KeyboardDelay";
69
70//static const WCHAR* KEY_SHOWSNDS = L"Control Panel\\Accessibility\\ShowSounds";
71//static const WCHAR* KEY_KDBPREF = L"Control Panel\\Accessibility\\Keyboard Preference";
72//static const WCHAR* KEY_SCRREAD = L"Control Panel\\Accessibility\\Blind Access";
73//static const WCHAR* VAL_ON = L"On";
74
75LONG
76QueryUserRegValueW(PCWSTR pszSubKey, PCWSTR pszValueName, PVOID pData, LPDWORD cbSize, LPDWORD pType)
77{
78 HKEY hKey;
79 LONG ret;
80
82 ret = RegQueryValueExW(hKey, pszValueName, NULL, pType, (LPBYTE)pData, cbSize);
84 return ret;
85}
86
87
88HWND
90{
92 WNDCLASSA wc;
93
94 wc.style = 0;
96 wc.cbClsExtra = 0;
97 wc.cbWndExtra = 0;
98 wc.hInstance = hinst;
99 wc.hIcon = NULL;
100 wc.hCursor = NULL;
101 wc.hbrBackground = NULL;
102 wc.lpszMenuName = NULL;
103 wc.lpszClassName = "testclass";
104
105 RegisterClassA(&wc);
106 return CreateWindowA("testclass",
107 "testwnd",
109 0,
110 0,
111 50,
112 30,
113 NULL,
114 NULL,
115 hinst,
116 0);
117}
118
119void
121{
122// UINT uint;
123 DWORD data[1000];
124 UINT i, uint;
125 ACCESSTIMEOUT ato;
126 /* Test normal */
128 TEST(NtUserSystemParametersInfo(SPI_GETFOCUSBORDERHEIGHT, 0, &uint, 0) == TRUE);
130
131 /* Test invalid SPI code */
135
136 /* Test wrong cbSize member */
137 ato.cbSize = 1;
138 SetLastError(0xdeadbeef);
140 TEST(GetLastError() == 0xdeadbeef);
141#if 0
142 /* Test undocumented, but valid SPI codes */
143 for(i = 0; i < 1000; i++) data[i] = 0xdeadbeef;
145 TEST(NtUserSystemParametersInfo(0x1010, 0, &data, 0) == TRUE);
147 TEST(data[0] <= 1);
148 TEST(data[1] == 0xdeadbeef);
149
150 for(i = 0; i < 1000; i++) data[i] = 0xbeefdead;
152 TEST(NtUserSystemParametersInfo(0x1011, 0, &data, 0) == TRUE);
154 TEST(data[0] == 0xbeefdead);
155 TEST(data[1] == 0xbeefdead);
156 data[0] = 0;
157 NtUserSystemParametersInfo(0x1010, 0, &data, 0);
158 TEST(data[0] == 1);
159
160 for(i = 0; i < 1000; i++) data[i] = 0xdeadbeef;
162 TEST(NtUserSystemParametersInfo(0x1028, 0, &data, 0) == TRUE);
164 TEST(data[0] != 0xdeadbeef);
165 TEST(data[1] == 0xdeadbeef);
166
167 for(i = 0; i < 1000; i++) data[i] = 0xbeefdead;
169 TEST(NtUserSystemParametersInfo(0x1029, 0, &data, 0) == TRUE);
171 TEST(data[0] == 0xbeefdead);
172 TEST(data[1] == 0xbeefdead);
173
174 for(i = 0; i < 1000; i++) data[i] = 0xdeadbeef;
176 TEST(NtUserSystemParametersInfo(0x102A, 0, &data, 0) == TRUE);
178 TEST(data[0] != 0xdeadbeef);
179 TEST(data[1] == 0xdeadbeef);
180
181 for(i = 0; i < 1000; i++) data[i] = 0xbeefdead;
183 TEST(NtUserSystemParametersInfo(4139, 0, &data, 0) == TRUE);
185 TEST(data[0] == 0xbeefdead);
186 TEST(data[1] == 0xbeefdead);
187
188 for(i = 0; i < 1000; i++) data[i] = 0xdeadbeef;
190 TEST(NtUserSystemParametersInfo(4140, 0, &data, 0) == TRUE);
192 TEST(data[0] != 0xdeadbeef);
193 TEST(data[1] == 0xdeadbeef);
194
195 for(i = 0; i < 1000; i++) data[i] = 0xbeefdead;
197 TEST(NtUserSystemParametersInfo(4141, 0, &data, 0) == TRUE);
199 TEST(data[0] == 0xbeefdead);
200 TEST(data[1] == 0xbeefdead);
201
202 for(i = 0; i < 1000; i++) data[i] = 0xdeadbeef;
204 TEST(NtUserSystemParametersInfo(4142, 0, &data, 0) == TRUE);
206 TEST(data[0] != 0xdeadbeef);
207 TEST(data[1] == 0xdeadbeef);
208
209 for(i = 0; i < 1000; i++) data[i] = 0xbeefdead;
211 TEST(NtUserSystemParametersInfo(4143, 0, &data, 0) == TRUE);
213 TEST(data[0] == 0xbeefdead);
214 TEST(data[1] == 0xbeefdead);
215
216 for(i = 0; i < 1000; i++) data[i] = 0xdeadbeef;
218 TEST(NtUserSystemParametersInfo(4144, 0, &data, 0) == TRUE);
220 TEST(data[0] != 0xdeadbeef);
221 TEST(data[1] == 0xdeadbeef);
222
223 for(i = 0; i < 1000; i++) data[i] = 0xbeefdead;
225 TEST(NtUserSystemParametersInfo(4145, 0, &data, 0) == TRUE);
227 TEST(data[0] == 0xbeefdead);
228 TEST(data[1] == 0xbeefdead);
229
230 for(i = 0; i < 1000; i++) data[i] = 0xdeadbeef;
232 TEST(NtUserSystemParametersInfo(4146, 0, &data, 0) == TRUE);
234 TEST(data[0] != 0xdeadbeef);
235 TEST(data[1] == 0xdeadbeef);
236
237 for(i = 0; i < 1000; i++) data[i] = 0xbeefdead;
239 TEST(NtUserSystemParametersInfo(4147, 0, &data, 0) == TRUE);
241 TEST(data[0] == 0xbeefdead);
242 TEST(data[1] == 0xbeefdead);
243
244 for(i = 0; i < 1000; i++) data[i] = 0xdeadbeef;
246 TEST(NtUserSystemParametersInfo(4148, 0, &data, 0) == TRUE);
248 TEST(data[0] != 0xdeadbeef);
249 TEST(data[1] == 0xdeadbeef);
250
251 for(i = 0; i < 1000; i++) data[i] = 0xbeefdead;
253 TEST(NtUserSystemParametersInfo(4149, 0, &data, 0) == TRUE);
255 TEST(data[0] == 0xbeefdead);
256 TEST(data[1] == 0xbeefdead);
257
258 for(i = 0; i < 1000; i++) data[i] = 0xdeadbeef;
260 TEST(NtUserSystemParametersInfo(4150, 0, &data, 0) == TRUE);
262 TEST(data[0] != 0xdeadbeef);
263 TEST(data[1] == 0xdeadbeef);
264
265 for(i = 0; i < 1000; i++) data[i] = 0xbeefdead;
267 TEST(NtUserSystemParametersInfo(4151, 0, &data, 0) == TRUE);
269 TEST(data[0] == 0xbeefdead);
270 TEST(data[1] == 0xbeefdead);
271
272 for(i = 0; i < 1000; i++) data[i] = 0xdeadbeef;
274 TEST(NtUserSystemParametersInfo(4152, 0, &data, 0) == TRUE);
276 TEST(data[0] != 0xdeadbeef);
277 TEST(data[1] == 0xdeadbeef);
278
279 for(i = 0; i < 1000; i++) data[i] = 0xbeefdead;
281 TEST(NtUserSystemParametersInfo(4153, 0, &data, 0) == TRUE);
283 TEST(data[0] == 0xbeefdead);
284 TEST(data[1] == 0xbeefdead);
285
286 for(i = 0; i < 1000; i++) data[i] = 0xdeadbeef;
288 TEST(NtUserSystemParametersInfo(4154, 0, &data, 0) == TRUE);
290 TEST(data[0] != 0xdeadbeef);
291 TEST(data[1] == 0xdeadbeef);
292
293 for(i = 0; i < 1000; i++) data[i] = 0xbeefdead;
295 TEST(NtUserSystemParametersInfo(4155, 0, &data, 0) == TRUE);
297 TEST(data[0] == 0xbeefdead);
298 TEST(data[1] == 0xbeefdead);
299
300 for(i = 0; i < 1000; i++) data[i] = 0xdeadbeef;
302 TEST(NtUserSystemParametersInfo(4156, 0, &data, 0) == TRUE);
304 TEST(data[0] != 0xdeadbeef);
305 TEST(data[1] == 0xdeadbeef);
306
307 for(i = 0; i < 1000; i++) data[i] = 0xbeefdead;
309 TEST(NtUserSystemParametersInfo(4157, 0, &data, 0) == TRUE);
311 TEST(data[0] == 0xbeefdead);
312 TEST(data[1] == 0xbeefdead);
313#endif
314 /* Test invalid pointer */
316 TEST(NtUserSystemParametersInfo(SPI_GETFOCUSBORDERHEIGHT, 0, (PVOID)(LONG_PTR)0x80000000, 0) == FALSE);
318 for(i = 0; i < 1000; i++) data[i] = 0xdeadbeef;
319
320 /* test wrong bools */
321}
322
323void
325{
326 HWINSTA hwinsta, hwinstaOld;
327 INT ai[20];
328 BOOL bRet;
329// INT i;
330
331 hwinstaOld = GetProcessWindowStation();
334 printf("hwinstaOld=%p, hwinsta=%p\n", hwinstaOld, hwinsta);
335
336#if 1 // currently Winsta stuff is broken in ros
337 TEST(SystemParametersInfoA(SPI_GETBEEP, 0, ai, 0) == 0);
339 TEST(SystemParametersInfoA(SPI_SETBEEP, 0, ai, 0) == 0);
341 TEST(SystemParametersInfoA(SPI_GETMOUSE, 0, ai, 0) == 0);
343 TEST(SystemParametersInfoA(SPI_SETMOUSE, 0, ai, 0) == 0);
361 TEST(SystemParametersInfoA(SPI_GETKEYBOARDCUES, 0, &bRet, 0) == 0);
363 TEST(SystemParametersInfoA(SPI_SETKEYBOARDCUES, 0, (PVOID)1, 0) == 0);
365#endif
366
367 SetProcessWindowStation(hwinstaOld);
368}
369
370void
372{
373 ACCESSTIMEOUT ato;
374// UINT uFocusBorderHeight;
375 WCHAR Buffer[6];
376 DWORD cbSize;
377
378 ato.cbSize = sizeof(ato);
380 ato.iTimeOutMSec++;
382 ato.iTimeOutMSec--;
383
384// NtUserSystemParametersInfo(SPI_GETFOCUSBORDERHEIGHT, 0, &uFocusBorderHeight, 0);
385// NtUserSystemParametersInfo(SPI_SETFOCUSBORDERHEIGHT, 0, &uFocusBorderHeight, SPIF_UPDATEINIFILE);
386
388
389 cbSize = 6;
390 QueryUserRegValueW(L"Control Panel\\Accessibility\\TimeOut", L"TimeToWait", &Buffer, &cbSize, NULL);
391
392}
393
394void
396{
397 WCHAR szReg[10];
398 DWORD cbSize;
399
400 cbSize = sizeof(szReg);
401 ok(QueryUserRegValueW(KEY_METRIC, pwszVal, &szReg, &cbSize, NULL) == ERROR_SUCCESS, "Value=%S\n", pwszVal);
402 ok(_wcsicmp(szReg, L"1") == 0, "Value=%S\n", pwszVal);
403
404}
405
406void
407Test_UserPref(UINT uiGet, UINT uiSet, DWORD dwPrefMask)
408{
409 BOOL bOrig, bTemp = 0;
410 DWORD dwUserPref, dwUserPrefOrg;
411 DWORD cbSize;
412
413 /* Get original values */
414 NtUserSystemParametersInfo(uiGet, 0, &bOrig, 0);
415 cbSize = sizeof(dwUserPrefOrg);
416 QueryUserRegValueW(KEY_DESKTOP, VAL_PREFMASK, &dwUserPrefOrg, &cbSize, NULL);
417
418 /* Value 0 */
420 NtUserSystemParametersInfo(uiGet, 0, &bTemp, 0);
421 TEST(bTemp == 0);
422 cbSize = sizeof(dwUserPref);
424 TEST((dwUserPref & dwPrefMask) == 0);
425 TEST((dwUserPref & (~dwPrefMask)) == (dwUserPrefOrg & (~dwPrefMask)));
426
427 /* Value 1 without Registry */
428 NtUserSystemParametersInfo(uiSet, 0, (PVOID)1, 0);
429 NtUserSystemParametersInfo(uiGet, 0, &bTemp, 0);
430 TEST(bTemp == 1);
431 cbSize = sizeof(dwUserPref);
433 TEST((dwUserPref & dwPrefMask) == 0);
434 TEST((dwUserPref & (~dwPrefMask)) == (dwUserPrefOrg & (~dwPrefMask)));
435
436 /* Value 2 without Registry */
437 NtUserSystemParametersInfo(uiSet, 0, (PVOID)2, 0);
438 NtUserSystemParametersInfo(uiGet, 0, &bTemp, 0);
439 TEST(bTemp == 1);
440 cbSize = sizeof(dwUserPref);
442 TEST((dwUserPref & dwPrefMask) == 0);
443 TEST((dwUserPref & (~dwPrefMask)) == (dwUserPrefOrg & (~dwPrefMask)));
444
445 /* Value 1 with Registry */
447 NtUserSystemParametersInfo(uiGet, 0, &bTemp, 0);
448 TEST(bTemp == 1);
449 cbSize = sizeof(dwUserPref);
451 TEST((dwUserPref & dwPrefMask) == dwPrefMask);
452 TEST((dwUserPref & (~dwPrefMask)) == (dwUserPrefOrg & (~dwPrefMask)));
453
454 /* Restore original value */
456
457
458}
459
460
461/******************************************************************************/
462
463void
465{
466 BOOL bOrig, bTemp = 0;
467 WCHAR szReg[10];
468 DWORD cbSize;
469
470 /* Get original value */
472
473 /* Value 0 */
476 TEST(bTemp == 0);
477 cbSize = sizeof(szReg);
479 TEST(_wcsicmp(szReg, L"No") == 0);
480
481 /* Value 1 */
484 TEST(bTemp == 1);
485 cbSize = sizeof(szReg);
487 TEST(_wcsicmp(szReg, L"Yes") == 0);
488
489 /* Value 2 */
492 TEST(bTemp == 1);
493 cbSize = sizeof(szReg);
495 TEST(_wcsicmp(szReg, L"Yes") == 0);
496
497 /* Restore original value */
499}
500
501void
503{
504 INT aiOrig[3], aiTemp[3];
505
506 /* Get original value */
508
509 /* Test uiParam value */
510 TEST(NtUserSystemParametersInfo(SPI_GETMOUSE, 0, aiTemp, 0) == 1);
511 TEST(NtUserSystemParametersInfo(SPI_GETMOUSE, 1, aiTemp, 0) == 1);
512 TEST(NtUserSystemParametersInfo(SPI_GETMOUSE, -1, aiTemp, 0) == 1);
513 TEST(NtUserSystemParametersInfo(SPI_GETMOUSE, 0xdeadbeef, aiTemp, 0) == 1);
514
515 /* Set modified values */
516 aiTemp[0] = aiOrig[0] + 1;
517 aiTemp[1] = aiOrig[1] - 1;
518 aiTemp[2] = aiOrig[2] + 2;
520 aiTemp[0] = aiTemp[1] = aiTemp[2] = 0;
521
522 /* Get new values */
524
525 /* Test modified values */
526 TEST(aiTemp[0] == aiOrig[0] + 1);
527 TEST(aiTemp[1] == aiOrig[1] - 1);
528 TEST(aiTemp[2] == aiOrig[2] + 2);
529
530 // FIXME: Test registry values
531
532 /* Restore original value */
534}
535
536void
538{
539 INT iOrig, iTemp = 0;
540
541 /* Get original value */
543
544 /* Value 0 */
547 TEST(iTemp == 1);
549
550 /* Value 1 */
553 TEST(iTemp == 1);
554// Test_MetricKey(pti, VAL_BORDER, 1);
555
556 /* Value 2 */
559 TEST(iTemp == 2);
561
562 /* Restore original value */
564
565}
566
567// Test_SPI_SETKEYBOARDSPEED();
568// Test_SPI_LANGDRIVER();
569// Test_SPI_ICONHORIZONTALSPACING();
570// Test_SPI_SETSCREENSAVETIMEOUT();
571// Test_SPI_SETSCREENSAVEACTIVE();
572// Test_SPI_SETGRIDGRANULARITY();
573
574void
576{
577 UNICODE_STRING ustrOld, ustrNew;
578 WCHAR szOld[MAX_PATH];
579 WCHAR szNew[MAX_PATH];
580
581 /* Get old Wallpaper */
583 RtlInitUnicodeString(&ustrOld, szOld);
584
585 /* Set no Wallpaper */
588 TEST(szNew[0] == 0);
589
590 /* Set no Wallpaper 2 */
591 RtlInitUnicodeString(&ustrNew, L"");
594 TEST(szNew[0] == 0);
595
596 /* Reset Wallpaper */
599 TEST(wcscmp(szNew, szOld) == 0);
600
601 /* Set new Wallpaper */
602#if 0 // This is broken
603 RtlInitUnicodeString(&ustrNew, L"test.bmp");
606 TEST(wcscmp(szNew, L"test.bmp") == 0);
607#endif
608
609 /* Get Wallpaper, too small buffer */
610 szNew[0] = 0; szNew[1] = 0; szNew[2] = 0;
612 TEST(szNew[0] != 0);
613 TEST(szNew[1] != 0);
614 TEST(szNew[2] != 0);
615
616 /* Set invalid Wallpaper */
617 SetLastError(0xdeadbeef);
618 RtlInitUnicodeString(&ustrNew, L"*#!!-&");
622 TEST(wcscmp(szNew, L"*#!!-&") == 0);
623
624 /* Restore old Wallpaper */
626
627}
628
629// Test_SPI_SETDESKPATTERN();
630// Test_SPI_SETKEYBOARDDELAY();
631// Test_SPI_ICONVERTICALSPACING();
632// Test_SPI_SETICONTITLEWRAP();
633// Test_SPI_SETMENUDROPALIGNMENT();
634// Test_SPI_SETDOUBLECLKWIDTH();
635// Test_SPI_SETDOUBLECLKHEIGHT();
636// Test_SPI_SETDOUBLECLICKTIME();
637
638void
640{
641 BOOL bOrig, bTemp = 0;
642 WCHAR szReg[10];
643 DWORD cbSize;
644
645 /* Get original value */
647
648 /* Value 0 */
651 TEST(bTemp == 0);
652 cbSize = sizeof(szReg);
654 TEST(_wcsicmp(szReg, L"0") == 0);
655
656 /* Value 1 */
659 TEST(bTemp == 1);
660 cbSize = sizeof(szReg);
662 TEST(_wcsicmp(szReg, L"1") == 0);
663
664 /* Value 2 */
667 TEST(bTemp == 1);
668 cbSize = sizeof(szReg);
670 TEST(_wcsicmp(szReg, L"2") == 0);
671
672 /* Value -1 */
675 TEST(bTemp == 1);
676 cbSize = sizeof(szReg);
678 TEST(_wcsicmp(szReg, L"-1") == 0);
679
680 /* Restore original value */
682
683
684}
685
686void
688{
689 LOGFONTW lfOrig;
690 struct
691 {
692 LOGFONTW lf;
693 DWORD dwRedzone;
694 } buf;
695
696 /* Get original value */
697 ASSERT(NtUserSystemParametersInfo(SPI_GETICONTITLELOGFONT, sizeof(lfOrig), &lfOrig, 0));
698
699 /* Test uiParam == 0 */
700 memset(&buf, 0, sizeof(buf));
701 buf.lf.lfFaceName[LF_FACESIZE-1] = 33;
702 buf.dwRedzone = 0xdeadbeef;
704 TEST(buf.lf.lfHeight != 0);
705 TEST(buf.lf.lfWeight != 0);
706 TEST(buf.lf.lfFaceName[0] != 0);
707 TEST(buf.lf.lfFaceName[LF_FACESIZE-1] == 0);
708 TEST(buf.dwRedzone == 0xdeadbeef);
709
710 /* Test uiParam < sizeof(LOGFONTW) */
711 memset(&buf, 0, sizeof(buf));
712 buf.lf.lfFaceName[LF_FACESIZE-1] = 33;
713 buf.dwRedzone = 0xdeadbeef;
715 TEST(buf.lf.lfHeight != 0);
716 TEST(buf.lf.lfWeight != 0);
717 TEST(buf.lf.lfFaceName[0] != 0);
718 TEST(buf.lf.lfFaceName[LF_FACESIZE-1] == 0);
719 TEST(buf.dwRedzone == 0xdeadbeef);
720
721 /* Test uiParam < 0 */
723}
724
725void
727{
728 char buf[10];
731
732
733}
734
735void
737{
738
739}
740
741void
743{
744 NONCLIENTMETRICSW metrics;
745 NONCLIENTMETRICSW origMetrics;
746
747 metrics.cbSize = sizeof(NONCLIENTMETRICSW);
748 TEST(NtUserSystemParametersInfo(SPI_GETNONCLIENTMETRICS, sizeof(NONCLIENTMETRICSW), &metrics, 0) == 1);
749 TEST(NtUserSystemParametersInfo(SPI_GETNONCLIENTMETRICS, sizeof(NONCLIENTMETRICSW), (PVOID)(LONG_PTR)0xdeadbeef, 0) == 0);
750
751 origMetrics = metrics;
752
753 metrics.cbSize = sizeof(NONCLIENTMETRICSW) + 10;
754 TEST(NtUserSystemParametersInfo(SPI_SETNONCLIENTMETRICS, 0, (PVOID)&metrics, 0) == 1);
755 TEST(NtUserSystemParametersInfo(SPI_GETNONCLIENTMETRICS, 0, (PVOID)&metrics, 0) == 1);
756 ok(metrics.cbSize == sizeof(NONCLIENTMETRICSW), "Expected size: %lu, got %lu\n", (ULONG)sizeof(NONCLIENTMETRICSW), (ULONG)metrics.cbSize);
757
758 TEST(NtUserSystemParametersInfo(SPI_SETNONCLIENTMETRICS, 0, (PVOID)&origMetrics, 0) == 1);
759}
760
761void
763{
765 MINIMIZEDMETRICS origMetrics;
766
768 TEST(NtUserSystemParametersInfo(SPI_GETMINIMIZEDMETRICS, sizeof(MINIMIZEDMETRICS), (PVOID)&metrics, 0) == 1);
769 TEST(NtUserSystemParametersInfo(SPI_GETMINIMIZEDMETRICS, sizeof(MINIMIZEDMETRICS), (PVOID)(LONG_PTR)0xdeadbeef, 0) == 0);
770
771 origMetrics = metrics;
772
773 metrics.cbSize = sizeof(MINIMIZEDMETRICS) + 10;
774 TEST(NtUserSystemParametersInfo(SPI_SETMINIMIZEDMETRICS, 0, (PVOID)&metrics, 0) == 1);
775 TEST(NtUserSystemParametersInfo(SPI_GETMINIMIZEDMETRICS, 0, (PVOID)&metrics, 0) == 1);
776 ok(metrics.cbSize == sizeof(MINIMIZEDMETRICS), "Expected size: %lu, got %lu\n", (ULONG)sizeof(MINIMIZEDMETRICS), (ULONG)metrics.cbSize);
777
778 TEST(NtUserSystemParametersInfo(SPI_SETMINIMIZEDMETRICS, 0, (PVOID)&origMetrics, 0) == 1);
779}
780
781void
783{
784 ICONMETRICSW metrics;
785 ICONMETRICSW origMetrics;
786
787 metrics.cbSize = sizeof(ICONMETRICSW);
788 TEST(NtUserSystemParametersInfo(SPI_GETICONMETRICS, sizeof(ICONMETRICSW), (PVOID)&metrics, 0) == 1);
789 TEST(NtUserSystemParametersInfo(SPI_GETICONMETRICS, sizeof(ICONMETRICSW), (PVOID)(LONG_PTR)0xdeadbeef, 0) == 0);
790
791 origMetrics = metrics;
792
793 metrics.cbSize = sizeof(ICONMETRICSW) + 10;
794 TEST(NtUserSystemParametersInfo(SPI_SETICONMETRICS, 0, (PVOID)&metrics, 0) == 1);
795 TEST(NtUserSystemParametersInfo(SPI_GETICONMETRICS, 0, (PVOID)&metrics, 0) == 1);
796 ok(metrics.cbSize == sizeof(ICONMETRICSW), "Expected size: %lu, got %lu\n", (ULONG)sizeof(ICONMETRICSW), (ULONG)metrics.cbSize);
797
798 TEST(NtUserSystemParametersInfo(SPI_SETICONMETRICS, 0, (PVOID)&origMetrics, 0) == 1);
799}
800
801void
803{
804 RECT rcOrig, rc;
805
806 /* Get the original value */
807 ASSERT(NtUserSystemParametersInfo(SPI_GETWORKAREA, 0, &rcOrig, 0) == 1);
808
809 /* Change value */
810 rc = rcOrig;
811 rc.left += 1;
812 rc.top += 2;
813 rc.right -= 3;
814 rc.bottom -= 2;
815 TEST(NtUserSystemParametersInfo(SPI_SETWORKAREA, 1, &rc, 0) == 1);
816 TEST(NtUserSystemParametersInfo(SPI_SETWORKAREA, 0, &rc, 0) == 1);
817 TEST(NtUserSystemParametersInfo(SPI_SETWORKAREA, sizeof(RECT), &rc, 0) == 1);
818
819 TEST(NtUserSystemParametersInfo(SPI_GETWORKAREA, 1, &rc, 0) == 1);
820 TEST(NtUserSystemParametersInfo(SPI_GETWORKAREA, -1, &rc, 0) == 1);
821 TEST(NtUserSystemParametersInfo(SPI_GETWORKAREA, 0xdeadbeef, &rc, 0) == 1);
822 TEST(NtUserSystemParametersInfo(SPI_GETWORKAREA, 0, (PVOID)(LONG_PTR)0xdeadbeef, 0) == 0);
823
824 /* Test values */
825 rc = rcOrig; rc.left = -1;
826 TEST(NtUserSystemParametersInfo(SPI_SETWORKAREA, 0, &rc, 0) == 0);
827 rc = rcOrig; rc.top = -1;
828 TEST(NtUserSystemParametersInfo(SPI_SETWORKAREA, 0, &rc, 0) == 0);
829 rc = rcOrig; rc.top = 10; rc.bottom = 11;
830 TEST(NtUserSystemParametersInfo(SPI_SETWORKAREA, 0, &rc, 0) == 1);
831 rc = rcOrig; rc.top = 10; rc.bottom = 10;
832 TEST(NtUserSystemParametersInfo(SPI_SETWORKAREA, 0, &rc, 0) == 0);
833 rc = rcOrig; rc.top = 10; rc.bottom = 9;
834 TEST(NtUserSystemParametersInfo(SPI_SETWORKAREA, 0, &rc, 0) == 0);
835 rc = rcOrig; rc.left = 10; rc.right = 11;
836 TEST(NtUserSystemParametersInfo(SPI_SETWORKAREA, 0, &rc, 0) == 1);
837 rc = rcOrig; rc.left = 10; rc.right = 10;
838 TEST(NtUserSystemParametersInfo(SPI_SETWORKAREA, 0, &rc, 0) == 0);
839 rc = rcOrig; rc.left = 10; rc.right = 9;
840 TEST(NtUserSystemParametersInfo(SPI_SETWORKAREA, 0, &rc, 0) == 0);
841 rc = rcOrig; rc.bottom = GetSystemMetrics(SM_CYVIRTUALSCREEN);
842 TEST(NtUserSystemParametersInfo(SPI_SETWORKAREA, 0, &rc, 0) == 1);
843 rc = rcOrig; rc.bottom = GetSystemMetrics(SM_CYVIRTUALSCREEN)+1;
844 TEST(NtUserSystemParametersInfo(SPI_SETWORKAREA, 0, &rc, 0) == 0);
845 rc = rcOrig; rc.right = GetSystemMetrics(SM_CXVIRTUALSCREEN);
846 TEST(NtUserSystemParametersInfo(SPI_SETWORKAREA, 0, &rc, 0) == 1);
847 rc = rcOrig; rc.right = GetSystemMetrics(SM_CXVIRTUALSCREEN)+1;
848 TEST(NtUserSystemParametersInfo(SPI_SETWORKAREA, 0, &rc, 0) == 0);
849
850 /* Restore original value */
851 ASSERT(NtUserSystemParametersInfo(SPI_SETWORKAREA, 0, &rcOrig, 0) == 1);
852
853
854}
855
856void
858{
859
860}
861
862void
864{
865
866}
867
868void
870{
871
872}
873
874void
876{
877
878}
879
880void
882{
883
884}
885
886void
888{
889 STICKYKEYS skOrig, sk;
890
891 /* Get original values */
892 skOrig.cbSize = sizeof(STICKYKEYS);
894
895 sk.cbSize = sizeof(STICKYKEYS)+1;
897
898 sk.cbSize = sizeof(STICKYKEYS)-1;
900
901 sk.cbSize = sizeof(STICKYKEYS);
907
908 sk = skOrig;
909 sk.dwFlags = (skOrig.dwFlags ^ 1);
913
914 sk = skOrig;
916 TEST(sk.dwFlags == (skOrig.dwFlags ^ 1));
917
918 /* Restore original values */
919 skOrig.cbSize = sizeof(STICKYKEYS);
921
922}
923
924void
926{
927 ACCESSTIMEOUT atoOrig, atoTmp;
928
929 /* Get original values */
930 atoOrig.cbSize = sizeof(ACCESSTIMEOUT);
932
933 atoTmp.cbSize = sizeof(ACCESSTIMEOUT) - 1;
935 atoTmp.cbSize = sizeof(ACCESSTIMEOUT) + 1;
937 atoTmp.cbSize = sizeof(ACCESSTIMEOUT);
939 atoTmp.cbSize = sizeof(ACCESSTIMEOUT);
941 atoTmp.cbSize = sizeof(ACCESSTIMEOUT);
943 atoTmp.cbSize = sizeof(ACCESSTIMEOUT);
945 atoTmp.cbSize = sizeof(ACCESSTIMEOUT);
947 atoTmp.cbSize = sizeof(ACCESSTIMEOUT);
949
950 /* Restore original values */
951 ASSERT(NtUserSystemParametersInfo(SPI_SETACCESSTIMEOUT, sizeof(atoOrig), &atoOrig, 0) == 1);
952}
953
954void
956{
957
958}
959
960void
962{
963
964}
965
966void
968{
969
970}
971
972void
974{
975
976}
977
978// Test_SPI_SETSCREENREADER();
980// Test_SPI_SETFONTSMOOTHING();
981// Test_SPI_SETDRAGWIDTH();
982// Test_SPI_SETDRAGHEIGHT();
983// Test_SPI_SETHANDHELD();
984// Test_SPI_SETLOWPOWERTIMEOUT();
985// Test_SPI_SETPOWEROFFTIMEOUT();
986// Test_SPI_SETLOWPOWERACTIVE();
987// Test_SPI_SETPOWEROFFACTIVE();
988// Test_SPI_SETCURSORS();
989// Test_SPI_SETICONS();
990// Test_SPI_SETDEFAULTINPUTLANG();
991// Test_SPI_SETLANGTOGGLE();
992// Test_SPI_GETWINDOWSEXTENSION();
993// Test_SPI_SETMOUSETRAILS();
994// Test_SPI_SETSNAPTODEFBUTTON();
995// Test_SPI_GETSCREENSAVERRUNNING();
996// Test_SPI_SETMOUSEHOVERWIDTH();
997// Test_SPI_SETMOUSEHOVERHEIGHT();
998// Test_SPI_SETMOUSEHOVERTIME();
999// Test_SPI_SETWHEELSCROLLLINES();
1000// Test_SPI_SETMENUSHOWDELAY();
1001// Test_SPI_SETWHEELSCROLLCHARS();
1002// Test_SPI_SETSHOWIMEUI();
1003// Test_SPI_SETMOUSESPEED();
1004// Test_SPI_GETSCREENSAVERRUNNING();
1005// Test_SPI_SETAUDIODESCRIPTION();
1006// Test_SPI_SETSCREENSAVESECURE();
1007// Test_SPI_SETACTIVEWINDOWTRACKING();
1008
1009void
1011{
1012 BOOL bOrig, bTemp = 0;
1013 DWORD dwUserPrefMask;
1014 DWORD cbSize;
1015
1016 /* Get original values */
1017 NtUserSystemParametersInfo(SPI_GETMENUANIMATION, 0, &bOrig, 0);
1018
1019 /* Value 0 */
1020 NtUserSystemParametersInfo(SPI_SETMENUANIMATION, 0, NULL, SPIF_UPDATEINIFILE);
1021 NtUserSystemParametersInfo(SPI_GETMENUANIMATION, 0, &bTemp, 0);
1022 TEST(bTemp == 0);
1023 cbSize = sizeof(dwUserPrefMask);
1024 TEST(QueryUserRegValueW(KEY_DESKTOP, VAL_PREFMASK, &dwUserPrefMask, &cbSize, NULL) == ERROR_SUCCESS);
1025 TEST((dwUserPrefMask & UPM_MENUANIMATION) == 0);
1026
1027 /* Value 1 */
1028 NtUserSystemParametersInfo(SPI_SETMENUANIMATION, 0, (PVOID)1, SPIF_UPDATEINIFILE);
1029 NtUserSystemParametersInfo(SPI_GETMENUANIMATION, 0, &bTemp, 0);
1030 TEST(bTemp == 1);
1031 cbSize = sizeof(dwUserPrefMask);
1032 TEST(QueryUserRegValueW(KEY_DESKTOP, VAL_PREFMASK, &dwUserPrefMask, &cbSize, NULL) == ERROR_SUCCESS);
1033 TEST((dwUserPrefMask & UPM_MENUANIMATION) != 0);
1034
1035
1036 /* Restore original values */
1037 NtUserSystemParametersInfo(SPI_SETMENUANIMATION, 0, (PVOID)(ULONG_PTR)bOrig, SPIF_UPDATEINIFILE);
1038}
1039
1040// Test_SPI_SETCOMBOBOXANIMATION();
1041// Test_SPI_SETLISTBOXSMOOTHSCROLLING();
1042// Test_SPI_SETGRADIENTCAPTIONS();
1043
1044void
1046{
1047 Test_UserPref(SPI_GETKEYBOARDCUES, SPI_SETKEYBOARDCUES, UPM_KEYBOARDCUES);
1048}
1049
1050// Test_SPI_SETACTIVEWNDTRKZORDER();
1051// Test_SPI_SETHOTTRACKING();
1052// Test_SPI_SETMENUFADE();
1053// Test_SPI_SETSELECTIONFADE();
1054// Test_SPI_SETTOOLTIPANIMATION();
1055// Test_SPI_SETTOOLTIPFADE();
1056// Test_SPI_SETCURSORSHADOW();
1057// Test_SPI_SETMOUSESONAR();
1058
1059void
1061{
1062 Test_UserPref(SPI_GETMOUSECLICKLOCK, SPI_SETMOUSECLICKLOCK, UPM_CLICKLOCK);
1063}
1064
1065// Test_SPI_SETMOUSEVANISH();
1066// Test_SPI_SETFLATMENU();
1067// Test_SPI_SETDROPSHADOW();
1068// Test_SPI_SETBLOCKSENDINPUTRESETS();
1069// Test_SPI_GETSETUIEFFECTS();
1070// Test_SPI_SETDISABLEOVERLAPPEDCONTENT();
1071// Test_SPI_SETCLIENTAREAANIMATION();
1072// Test_SPI_SETCLEARTYPE();
1073// Test_SPI_SETSPEECHRECOGNITION();
1074// Test_SPI_SETFOREGROUNDLOCKTIMEOUT();
1075// Test_SPI_SETACTIVEWNDTRKTIMEOUT();
1076// Test_SPI_SETFOREGROUNDFLASHCOUNT();
1077// Test_SPI_SETCARETWIDTH();
1078// Test_SPI_SETMOUSECLICKLOCKTIME();
1079// Test_SPI_SETFONTSMOOTHINGTYPE();
1080// Test_SPI_SETFONTSMOOTHINGCONTRAST();
1081// Test_SPI_SETFOCUSBORDERWIDTH();
1082// Test_SPI_SETFOCUSBORDERHEIGHT();
1083// Test_SPI_SETFONTSMOOTHINGORIENTATION();
1084
1085
1087{
1088 HWND hWnd;
1089
1091 ASSERT(hWnd);
1092
1096
1100// Test_SPI_SETKEYBOARDSPEED();
1101// Test_SPI_LANGDRIVER();
1102// Test_SPI_ICONHORIZONTALSPACING();
1103// Test_SPI_SETSCREENSAVETIMEOUT();
1104// Test_SPI_SETSCREENSAVEACTIVE();
1105// Test_SPI_SETGRIDGRANULARITY();
1107// Test_SPI_SETDESKPATTERN();
1108// Test_SPI_SETKEYBOARDDELAY();
1109// Test_SPI_ICONVERTICALSPACING();
1110// Test_SPI_SETICONTITLEWRAP();
1111// Test_SPI_SETMENUDROPALIGNMENT();
1112// Test_SPI_SETDOUBLECLKWIDTH();
1113// Test_SPI_SETDOUBLECLKHEIGHT();
1114// Test_SPI_SETDOUBLECLICKTIME();
1134// Test_SPI_SETSCREENREADER();
1136// Test_SPI_SETFONTSMOOTHING();
1137// Test_SPI_SETDRAGWIDTH();
1138// Test_SPI_SETDRAGHEIGHT();
1139// Test_SPI_SETHANDHELD();
1140// Test_SPI_SETLOWPOWERTIMEOUT();
1141// Test_SPI_SETPOWEROFFTIMEOUT();
1142// Test_SPI_SETLOWPOWERACTIVE();
1143// Test_SPI_SETPOWEROFFACTIVE();
1144// Test_SPI_SETCURSORS();
1145// Test_SPI_SETICONS();
1146// Test_SPI_SETDEFAULTINPUTLANG();
1147// Test_SPI_SETLANGTOGGLE();
1148// Test_SPI_GETWINDOWSEXTENSION();
1149// Test_SPI_SETMOUSETRAILS();
1150// Test_SPI_SETSNAPTODEFBUTTON();
1151// Test_SPI_GETSCREENSAVERRUNNING();
1152// Test_SPI_SETMOUSEHOVERWIDTH();
1153// Test_SPI_SETMOUSEHOVERHEIGHT();
1154// Test_SPI_SETMOUSEHOVERTIME();
1155// Test_SPI_SETWHEELSCROLLLINES();
1156// Test_SPI_SETMENUSHOWDELAY();
1157// Test_SPI_SETWHEELSCROLLCHARS();
1158// Test_SPI_SETSHOWIMEUI();
1159// Test_SPI_SETMOUSESPEED();
1160// Test_SPI_GETSCREENSAVERRUNNING();
1161// Test_SPI_SETAUDIODESCRIPTION();
1162// Test_SPI_SETSCREENSAVESECURE();
1163// Test_SPI_SETACTIVEWINDOWTRACKING();
1165// Test_SPI_SETCOMBOBOXANIMATION();
1166// Test_SPI_SETLISTBOXSMOOTHSCROLLING();
1167// Test_SPI_SETGRADIENTCAPTIONS();
1169// Test_SPI_SETACTIVEWNDTRKZORDER();
1170// Test_SPI_SETHOTTRACKING();
1171// Test_SPI_SETMENUFADE();
1172// Test_SPI_SETSELECTIONFADE();
1173// Test_SPI_SETTOOLTIPANIMATION();
1174// Test_SPI_SETTOOLTIPFADE();
1175// Test_SPI_SETCURSORSHADOW();
1176// Test_SPI_SETMOUSESONAR();
1178// Test_SPI_SETMOUSEVANISH();
1179// Test_SPI_SETFLATMENU();
1180// Test_SPI_SETDROPSHADOW();
1181// Test_SPI_SETBLOCKSENDINPUTRESETS();
1182// Test_SPI_GETSETUIEFFECTS();
1183// Test_SPI_SETDISABLEOVERLAPPEDCONTENT();
1184// Test_SPI_SETCLIENTAREAANIMATION();
1185// Test_SPI_SETCLEARTYPE();
1186// Test_SPI_SETSPEECHRECOGNITION();
1187// Test_SPI_SETFOREGROUNDLOCKTIMEOUT();
1188// Test_SPI_SETACTIVEWNDTRKTIMEOUT();
1189// Test_SPI_SETFOREGROUNDFLASHCOUNT();
1190// Test_SPI_SETCARETWIDTH();
1191// Test_SPI_SETMOUSECLICKLOCKTIME();
1192// Test_SPI_SETFONTSMOOTHINGTYPE();
1193// Test_SPI_SETFONTSMOOTHINGCONTRAST();
1194// Test_SPI_SETFOCUSBORDERWIDTH();
1195// Test_SPI_SETFOCUSBORDERHEIGHT();
1196// Test_SPI_SETFONTSMOOTHINGORIENTATION();
1197
1199}
void Test_NtUserSystemParametersInfo_Winsta(void)
static const WCHAR * KEY_DESKTOP
void Test_SPI_SETSHOWSOUNDS(void)
static const WCHAR * KEY_MOUSE
void Test_SPI_SETBORDER(void)
@ UPM_TOOLTIPANIMATION
@ UPM_COMBOBOXANIMATION
@ UPM_ACTIVEWINDOWTRACKING
@ UPM_GRADIENTCAPTIONS
@ UPM_LISTBOXSMOOTHSCROLLING
@ UPM_ACTIVEWNDTRKZORDER
static const WCHAR * VAL_BEEP
void Test_SPI_SETSTICKYKEYS(void)
void Test_SPI_SETTOGGLEKEYS(void)
static const WCHAR * VAL_SWAP
void Test_MetricKey(PCWSTR pwszVal, INT iVal)
void Test_SPI_SETHIGHCONTRAST(void)
static const WCHAR * KEY_SOUND
void Test_SPI_SETICONTITLELOGFONT(void)
void Test_SPI_SETDESKWALLPAPER(void)
LONG QueryUserRegValueW(PCWSTR pszSubKey, PCWSTR pszValueName, PVOID pData, LPDWORD cbSize, LPDWORD pType)
void Test_SPI_SETWORKAREA(void)
static const WCHAR * KEY_METRIC
void Test_SPI_SETBEEP(void)
void Test_SPI_SETPENWINDOWS(void)
void Test_NtUserSystemParametersInfo_fWinIni(void)
void Test_SPI_SETSOUNDSENTRY(void)
void Test_SPI_SETICONMETRICS(void)
void Test_SPI_SETMINIMIZEDMETRICS(void)
void Test_SPI_SETNONCLIENTMETRICS(void)
void Test_SPI_SETMOUSECLICKLOCK(void)
void Test_SPI_SETMENUANIMATION(void)
Test_SPI_SETANIMATION();.
void Test_NtUserSystemParametersInfo_Params(void)
void Test_SPI_SETKEYBOARDPREF(void)
void Test_SPI_SETACCESSTIMEOUT(void)
enum @1615 USERPREFMASKS
void Test_SPI_SETKEYBOARDCUES(void)
void Test_SPI_SETMOUSE(void)
void Test_SPI_SETSERIALKEYS(void)
void Test_SPI_SETDRAGFULLWINDOWS(void)
HWND CreateTestWindow()
void Test_SPI_SETFASTTASKSWITCH(void)
static const WCHAR * VAL_PREFMASK
void Test_UserPref(UINT uiGet, UINT uiSet, DWORD dwPrefMask)
void Test_SPI_SETMOUSEKEYS(void)
void Test_SPI_SETFILTERKEYS(void)
void Test_SPI_SETMOUSEBUTTONSWAP(void)
#define ok(value,...)
Definition: atltest.h:57
#define START_TEST(x)
Definition: atltest.h:75
HWND hWnd
Definition: settings.c:17
#define RegCloseKey(hKey)
Definition: registry.h:49
Definition: bufpool.h:45
#define ERROR_SUCCESS
Definition: deptool.c:10
#define LF_FACESIZE
Definition: dimm.idl:39
#define NULL
Definition: types.h:112
UINT32 uint
Definition: types.h:83
#define TRUE
Definition: types.h:120
#define FALSE
Definition: types.h:117
LONG WINAPI RegOpenKeyExW(HKEY hKey, LPCWSTR lpSubKey, DWORD ulOptions, REGSAM samDesired, PHKEY phkResult)
Definition: reg.c:3333
LONG WINAPI RegQueryValueExW(_In_ HKEY hkeyorg, _In_ LPCWSTR name, _In_ LPDWORD reserved, _In_ LPDWORD type, _In_ LPBYTE data, _In_ LPDWORD count)
Definition: reg.c:4103
#define ERROR_INVALID_PARAMETER
Definition: compat.h:101
#define SetLastError(x)
Definition: compat.h:752
#define MAX_PATH
Definition: compat.h:34
#define ERROR_ACCESS_DENIED
Definition: compat.h:97
unsigned int BOOL
Definition: ntddk_ex.h:94
unsigned long DWORD
Definition: ntddk_ex.h:95
#define printf
Definition: freeldr.h:97
FxAutoRegKey hKey
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
Definition: gl.h:1950
GLsizei GLenum const GLvoid GLuint GLsizei GLfloat * metrics
Definition: glext.h:11745
GLenum GLuint GLenum GLsizei const GLchar * buf
Definition: glext.h:7751
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
Definition: glfuncs.h:248
BOOL NTAPI NtUserSystemParametersInfo(UINT uiAction, UINT uiParam, PVOID pvParam, UINT fWinIni)
Definition: sysparams.c:2168
#define ASSERT(a)
Definition: mode.c:44
#define ERROR_FILE_NOT_FOUND
Definition: disk.h:79
#define TEST(x)
Definition: precomp.h:20
static HINSTANCE hinst
Definition: edit.c:551
#define SPI_GETDESKWALLPAPER
Definition: sysparams.c:34
__int3264 LONG_PTR
Definition: mstsclib_h.h:276
unsigned int UINT
Definition: ndis.h:50
NTSYSAPI VOID NTAPI RtlInitUnicodeString(PUNICODE_STRING DestinationString, PCWSTR SourceString)
#define KEY_QUERY_VALUE
Definition: nt_native.h:1016
#define READ_CONTROL
Definition: nt_native.h:58
#define L(x)
Definition: ntvdm.h:50
#define WS_VISIBLE
Definition: pedump.c:620
long LONG
Definition: pedump.c:60
_Check_return_ _CRTIMP int __cdecl _wcsicmp(_In_z_ const wchar_t *_Str1, _In_z_ const wchar_t *_Str2)
_Check_return_ _CRTIMP int __cdecl wcscmp(_In_z_ const wchar_t *_Str1, _In_z_ const wchar_t *_Str2)
#define memset(x, y, z)
Definition: compat.h:39
HBRUSH hbrBackground
Definition: winuser.h:3170
HICON hIcon
Definition: winuser.h:3168
HINSTANCE hInstance
Definition: winuser.h:3167
HCURSOR hCursor
Definition: winuser.h:3169
int cbWndExtra
Definition: winuser.h:3166
UINT style
Definition: winuser.h:3163
LPCSTR lpszMenuName
Definition: winuser.h:3171
LPCSTR lpszClassName
Definition: winuser.h:3172
WNDPROC lpfnWndProc
Definition: winuser.h:3164
int cbClsExtra
Definition: winuser.h:3165
DWORD iTimeOutMSec
Definition: winuser.h:2931
LONG right
Definition: windef.h:308
LONG bottom
Definition: windef.h:309
LONG top
Definition: windef.h:307
LONG left
Definition: windef.h:306
DWORD dwFlags
Definition: winuser.h:3530
DWORD cbSize
Definition: winuser.h:3529
TW_UINT32 TW_UINT16 TW_UINT16 TW_MEMREF pData
Definition: twain.h:1830
const uint16_t * PCWSTR
Definition: typedefs.h:57
unsigned char * LPBYTE
Definition: typedefs.h:53
uint32_t * LPDWORD
Definition: typedefs.h:59
int32_t INT
Definition: typedefs.h:58
uint32_t ULONG_PTR
Definition: typedefs.h:65
uint32_t ULONG
Definition: typedefs.h:59
int ret
DWORD WINAPI GetLastError(void)
Definition: except.c:1042
#define GetModuleHandle
Definition: winbase.h:3827
HWINSTA WINAPI GetProcessWindowStation(void)
Definition: ntwrapper.h:124
#define ERROR_REQUIRES_INTERACTIVE_WINDOWSTATION
Definition: winerror.h:940
#define ERROR_NOACCESS
Definition: winerror.h:578
#define HKEY_CURRENT_USER
Definition: winreg.h:11
#define SPI_SETSTICKYKEYS
Definition: winuser.h:1408
#define SPI_GETACCESSTIMEOUT
Definition: winuser.h:1409
#define SM_CYVIRTUALSCREEN
Definition: winuser.h:1039
#define SPI_SETBORDER
Definition: winuser.h:1358
#define SPI_GETBORDER
Definition: winuser.h:1357
LRESULT WINAPI DefWindowProcA(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
#define SPI_SETDESKWALLPAPER
Definition: winuser.h:1369
#define CreateWindowA(a, b, c, d, e, f, g, h, i, j, k)
Definition: winuser.h:4315
#define SPI_SETFASTTASKSWITCH
Definition: winuser.h:1385
#define SPI_SETBEEP
Definition: winuser.h:1354
#define SPI_SETACCESSTIMEOUT
Definition: winuser.h:1410
struct tagSTICKYKEYS STICKYKEYS
#define SPI_GETICONTITLELOGFONT
Definition: winuser.h:1380
BOOL WINAPI SetProcessWindowStation(_In_ HWINSTA)
#define SPI_GETMOUSE
Definition: winuser.h:1355
#define SM_CXVIRTUALSCREEN
Definition: winuser.h:1038
#define SPI_SETKEYBOARDSPEED
Definition: winuser.h:1360
#define SPIF_UPDATEINIFILE
Definition: winuser.h:1571
ATOM WINAPI RegisterClassA(_In_ CONST WNDCLASSA *)
struct tagMINIMIZEDMETRICS MINIMIZEDMETRICS
#define SM_CXBORDER
Definition: winuser.h:964
#define SPI_GETKEYBOARDSPEED
Definition: winuser.h:1359
#define SPI_GETSTICKYKEYS
Definition: winuser.h:1407
#define SPI_SETMOUSEBUTTONSWAP
Definition: winuser.h:1382
BOOL WINAPI SystemParametersInfoA(_In_ UINT uiAction, _In_ UINT uiParam, _Inout_opt_ PVOID pvParam, _In_ UINT fWinIni)
struct tagACCESSTIMEOUT ACCESSTIMEOUT
#define SPI_ICONHORIZONTALSPACING
Definition: winuser.h:1362
#define SM_SWAPBUTTON
Definition: winuser.h:984
#define SPI_GETBEEP
Definition: winuser.h:1353
#define SPI_SETMOUSE
Definition: winuser.h:1356
#define CreateWindowStation
Definition: winuser.h:5765
BOOL WINAPI DestroyWindow(_In_ HWND)
#define SPI_SETSCREENSAVETIMEOUT
Definition: winuser.h:1364
int WINAPI GetSystemMetrics(_In_ int)
#define SPI_GETSCREENSAVETIMEOUT
Definition: winuser.h:1363
__wchar_t WCHAR
Definition: xmlstorage.h:180