source: trunk/src/user32/user32.cpp@ 9586

Last change on this file since 9586 was 9586, checked in by sandervl, 23 years ago

SystemParametersInfoA fix for SPI_GETNONCLIENTMETRICS in OS/2 L&F (font height must be negative)

File size: 80.0 KB
Line 
1/* $Id: user32.cpp,v 1.125 2003-01-02 13:04:45 sandervl Exp $ */
2
3/*
4 * Win32 misc user32 API functions for OS/2
5 *
6 * Copyright 1998 Sander van Leeuwen
7 * Copyright 1998 Patrick Haller
8 * Copyright 1998 Peter Fitzsimmons
9 * Copyright 1999 Christoph Bratschi
10 * Copyright 1999 Daniela Engert (dani@ngrt.de)
11 *
12 * Partly based on Wine code (windows\sysparams.c: SystemParametersInfoA)
13 *
14 * Copyright 1994 Alexandre Julliard
15 *
16 *
17 * Project Odin Software License can be found in LICENSE.TXT
18 *
19 */
20/*****************************************************************************
21 * Name : USER32.CPP
22 * Purpose : This module maps all Win32 functions contained in USER32.DLL
23 * to their OS/2-specific counterparts as far as possible.
24 *****************************************************************************/
25
26//Attention: many functions belong to other subsystems, move them to their
27// right place!
28
29#include <odin.h>
30#include <odinwrap.h>
31#include <os2sel.h>
32
33#include <os2win.h>
34#include <misc.h>
35#include <winuser32.h>
36
37#include "user32.h"
38#include <winicon.h>
39#include "syscolor.h"
40#include "pmwindow.h"
41#include "oslibgdi.h"
42#include "oslibwin.h"
43#include "oslibprf.h"
44
45#include <wchar.h>
46#include <stdlib.h>
47#include <string.h>
48//#include <oslibwin.h>
49#include <win32wnd.h>
50#include <winuser.h>
51#include "initterm.h"
52
53#define DBG_LOCALLOG DBG_user32
54#include "dbglocal.h"
55
56//undocumented stuff
57// WIN32API ClientThreadConnect
58// WIN32API DragObject
59// WIN32API DrawFrame
60// WIN32API EditWndProc
61// WIN32API EndTask
62// WIN32API GetInputDesktop
63// WIN32API GetNextQueueWindow
64// WIN32API GetShellWindow
65// WIN32API InitSharedTable
66// WIN32API InitTask
67// WIN32API IsHungThread
68// WIN32API LockWindowStation
69// WIN32API ModifyAccess
70// WIN32API PlaySoundEvent
71// WIN32API RegisterLogonProcess
72// WIN32API RegisterNetworkCapabilities
73// WIN32API RegisterSystemThread
74// WIN32API SetDeskWallpaper
75// WIN32API SetDesktopBitmap
76// WIN32API SetInternalWindowPos
77// WIN32API SetLogonNotifyWindow
78// WIN32API SetShellWindow
79// WIN32API SetSysColorsTemp
80// WIN32API SetWindowFullScreenState
81// WIN32API SwitchToThisWindow
82// WIN32API SysErrorBox
83// WIN32API UnlockWindowStation
84// WIN32API UserClientDllInitialize
85// WIN32API UserSignalProc
86// WIN32API WinOldAppHackoMatic
87// WIN32API WNDPROC_CALLBACK
88// WIN32API YieldTask
89
90ODINDEBUGCHANNEL(USER32-USER32)
91
92
93/* Coordinate Transformation */
94
95/* Rectangle Functions - parts from wine/windows/rect.c */
96
97BOOL WIN32API CopyRect( PRECT lprcDst, const RECT * lprcSrc)
98{
99 dprintf2(("USER32: CopyRect\n"));
100 if (!lprcDst || !lprcSrc) {
101 SetLastError(ERROR_INVALID_PARAMETER);
102 return FALSE;
103 }
104
105 memcpy(lprcDst,lprcSrc,sizeof(RECT));
106
107 return TRUE;
108}
109//******************************************************************************
110//******************************************************************************
111BOOL WIN32API EqualRect( const RECT *lprc1, const RECT *lprc2)
112{
113 dprintf2(("USER32: EqualRect\n"));
114 if (!lprc1 || !lprc2)
115 {
116 SetLastError(ERROR_INVALID_PARAMETER);
117 return FALSE;
118 }
119
120 return (lprc1->left == lprc2->left &&
121 lprc1->right == lprc2->right &&
122 lprc1->top == lprc2->top &&
123 lprc1->bottom == lprc2->bottom);
124}
125//******************************************************************************
126//******************************************************************************
127BOOL WIN32API InflateRect( PRECT lprc, int dx, int dy)
128{
129 dprintf2(("USER32: InflateRect (%d,%d)(%d,%d) %d,%d", lprc->left, lprc->top, lprc->right, lprc->bottom, dx, dy));
130 if (!lprc)
131 {
132 SetLastError(ERROR_INVALID_PARAMETER);
133 return FALSE;
134 }
135
136 lprc->left -= dx;
137 lprc->right += dx;
138 lprc->top -= dy;
139 lprc->bottom += dy;
140
141 return TRUE;
142}
143//******************************************************************************
144//******************************************************************************
145BOOL WIN32API IntersectRect( PRECT lprcDst, const RECT * lprcSrc1, const RECT * lprcSrc2)
146{
147 dprintf2(("USER32: IntersectRect (%d,%d)(%d,%d) (%d,%d)(%d,%d)", lprcSrc1->left, lprcSrc1->top, lprcSrc1->right, lprcSrc1->bottom, lprcSrc2->left, lprcSrc2->top, lprcSrc2->right, lprcSrc2->bottom));
148 if (!lprcSrc1 || !lprcSrc2)
149 {
150 SetLastError(ERROR_INVALID_PARAMETER);
151 return FALSE;
152 }
153
154 if (IsRectEmpty(lprcSrc1) || IsRectEmpty(lprcSrc2) ||
155 (lprcSrc1->left >= lprcSrc2->right) || (lprcSrc2->left >= lprcSrc1->right) ||
156 (lprcSrc1->top >= lprcSrc2->bottom) || (lprcSrc2->top >= lprcSrc1->bottom))
157 {
158 //SvL: NT doesn't set the last error here
159 //SetLastError(ERROR_INVALID_PARAMETER);
160 if (lprcDst) SetRectEmpty(lprcDst);
161 return FALSE;
162 }
163 if (lprcDst)
164 {
165 lprcDst->left = MAX(lprcSrc1->left,lprcSrc2->left);
166 lprcDst->right = MIN(lprcSrc1->right,lprcSrc2->right);
167 lprcDst->top = MAX(lprcSrc1->top,lprcSrc2->top);
168 lprcDst->bottom = MIN(lprcSrc1->bottom,lprcSrc2->bottom);
169 }
170
171 return TRUE;
172}
173//******************************************************************************
174//******************************************************************************
175BOOL WIN32API IsRectEmpty( const RECT * lprc)
176{
177 if (!lprc)
178 {
179 SetLastError(ERROR_INVALID_PARAMETER);
180 return FALSE;
181 }
182
183 return (lprc->left == lprc->right || lprc->top == lprc->bottom);
184}
185//******************************************************************************
186//******************************************************************************
187BOOL WIN32API OffsetRect( PRECT lprc, int x, int y)
188{
189 dprintf2(("USER32: OffsetRect (%d,%d)(%d,%d) %d %d", lprc->left, lprc->top, lprc->right, lprc->bottom, x, y));
190 if (!lprc)
191 {
192 SetLastError(ERROR_INVALID_PARAMETER);
193 return FALSE;
194 }
195
196 lprc->left += x;
197 lprc->right += x;
198 lprc->top += y;
199 lprc->bottom += y;
200
201 return TRUE;
202}
203//******************************************************************************
204//******************************************************************************
205BOOL WIN32API PtInRect( const RECT *lprc, POINT pt)
206{
207 dprintf2(("USER32: PtInRect (%d,%d)(%d,%d) (%d,%d)", lprc->left, lprc->top, lprc->right, lprc->bottom, pt.x, pt.y));
208 if (!lprc)
209 {
210 SetLastError(ERROR_INVALID_PARAMETER);
211 return FALSE;
212 }
213
214 return (pt.x >= lprc->left &&
215 pt.x < lprc->right &&
216 pt.y >= lprc->top &&
217 pt.y < lprc->bottom);
218}
219//******************************************************************************
220//******************************************************************************
221BOOL WIN32API SetRect( PRECT lprc, int nLeft, int nTop, int nRight, int nBottom)
222{
223 if (!lprc)
224 {
225 SetLastError(ERROR_INVALID_PARAMETER);
226 return FALSE;
227 }
228
229 lprc->left = nLeft;
230 lprc->top = nTop;
231 lprc->right = nRight;
232 lprc->bottom = nBottom;
233
234 return TRUE;
235}
236//******************************************************************************
237//******************************************************************************
238BOOL WIN32API SetRectEmpty( PRECT lprc)
239{
240 if (!lprc)
241 {
242 SetLastError(ERROR_INVALID_PARAMETER);
243 return FALSE;
244 }
245
246 lprc->left = lprc->right = lprc->top = lprc->bottom = 0;
247
248 return TRUE;
249}
250//******************************************************************************
251//******************************************************************************
252BOOL WIN32API SubtractRect( PRECT lprcDest, const RECT * lprcSrc1, const RECT * lprcSrc2)
253{
254 dprintf2(("USER32: SubtractRect"));
255 RECT tmp;
256
257 if (!lprcDest || !lprcSrc1 || !lprcSrc2)
258 {
259 SetLastError(ERROR_INVALID_PARAMETER);
260 return FALSE;
261 }
262
263 if (IsRectEmpty(lprcSrc1))
264 {
265 SetLastError(ERROR_INVALID_PARAMETER);
266 SetRectEmpty(lprcDest);
267 return FALSE;
268 }
269 *lprcDest = *lprcSrc1;
270 if (IntersectRect(&tmp,lprcSrc1,lprcSrc2))
271 {
272 if (EqualRect(&tmp,lprcDest))
273 {
274 SetRectEmpty(lprcDest);
275 return FALSE;
276 }
277 if ((tmp.top == lprcDest->top) && (tmp.bottom == lprcDest->bottom))
278 {
279 if (tmp.left == lprcDest->left) lprcDest->left = tmp.right;
280 else if (tmp.right == lprcDest->right) lprcDest->right = tmp.left;
281 }
282 else if ((tmp.left == lprcDest->left) && (tmp.right == lprcDest->right))
283 {
284 if (tmp.top == lprcDest->top) lprcDest->top = tmp.bottom;
285 else if (tmp.bottom == lprcDest->bottom) lprcDest->bottom = tmp.top;
286 }
287 }
288
289 return TRUE;
290}
291//******************************************************************************
292//******************************************************************************
293BOOL WIN32API UnionRect( PRECT lprcDst, const RECT *lprcSrc1, const RECT *lprcSrc2)
294{
295 dprintf2(("USER32: UnionRect\n"));
296 if (!lprcDst || !lprcSrc1 || !lprcSrc2)
297 {
298 SetLastError(ERROR_INVALID_PARAMETER);
299 return FALSE;
300 }
301
302 if (IsRectEmpty(lprcSrc1))
303 {
304 if (IsRectEmpty(lprcSrc2))
305 {
306 SetLastError(ERROR_INVALID_PARAMETER);
307 SetRectEmpty(lprcDst);
308 return FALSE;
309 }
310 else *lprcDst = *lprcSrc2;
311 }
312 else
313 {
314 if (IsRectEmpty(lprcSrc2)) *lprcDst = *lprcSrc1;
315 else
316 {
317 lprcDst->left = MIN(lprcSrc1->left,lprcSrc2->left);
318 lprcDst->right = MAX(lprcSrc1->right,lprcSrc2->right);
319 lprcDst->top = MIN(lprcSrc1->top,lprcSrc2->top);
320 lprcDst->bottom = MAX(lprcSrc1->bottom,lprcSrc2->bottom);
321 }
322 }
323
324 return TRUE;
325}
326
327/* Mouse Input Functions */
328
329/* Error Functions */
330
331/*****************************************************************************
332 * Name : ExitWindowsEx
333 * Purpose : Shutdown System
334 * Parameters: UINT uFlags
335 * DWORD dwReserved
336 * Variables :
337 * Result : TRUE / FALSE
338 * Remark :
339 * Status :
340 *
341 * Author : Patrick Haller [Tue, 1999/10/20 21:24]
342 *****************************************************************************/
343
344BOOL WIN32API ExitWindowsEx(UINT uFlags, DWORD dwReserved)
345{
346 int rc = MessageBoxA(HWND_DESKTOP,
347 "Are you sure you want to shutdown the OS/2 system?",
348 "Shutdown ...",
349 MB_YESNOCANCEL | MB_ICONQUESTION);
350 switch (rc)
351 {
352 case IDCANCEL: return (FALSE);
353 case IDYES: break;
354 case IDNO:
355 dprintf(("no shutdown!\n"));
356 return TRUE;
357 }
358
359 return O32_ExitWindowsEx(uFlags,dwReserved);
360}
361
362
363//******************************************************************************
364//******************************************************************************
365BOOL WIN32API MessageBeep( UINT uType)
366{
367 INT flStyle;
368
369 dprintf(("USER32: MessageBeep\n"));
370
371 switch (uType)
372 {
373 case 0xFFFFFFFF:
374 Beep(500,50);
375 return TRUE;
376 case MB_ICONASTERISK:
377 flStyle = WAOS_NOTE;
378 break;
379 case MB_ICONEXCLAMATION:
380 flStyle = WAOS_WARNING;
381 break;
382 case MB_ICONHAND:
383 case MB_ICONQUESTION:
384 case MB_OK:
385 flStyle = WAOS_NOTE;
386 break;
387 default:
388 flStyle = WAOS_ERROR; //CB: should be right
389 break;
390 }
391 return OSLibWinAlarm(OSLIB_HWND_DESKTOP,flStyle);
392}
393//******************************************************************************
394//2nd parameter not used according to SDK (yet?)
395//******************************************************************************
396VOID WIN32API SetLastErrorEx(DWORD dwErrCode, DWORD dwType)
397{
398 dprintf(("USER32: SetLastErrorEx %x %x", dwErrCode, dwType));
399 SetLastError(dwErrCode);
400}
401
402/* Accessibility Functions */
403
404int WIN32API GetSystemMetrics(int nIndex)
405{
406 int rc = 0;
407
408 switch(nIndex) {
409 case SM_CXSCREEN:
410 rc = ScreenWidth;
411 break;
412
413 case SM_CYSCREEN:
414 rc = ScreenHeight;
415 break;
416
417 case SM_CXVSCROLL:
418 rc = OSLibWinQuerySysValue(SVOS_CXVSCROLL);
419 break;
420
421 case SM_CYHSCROLL:
422 rc = OSLibWinQuerySysValue(SVOS_CYHSCROLL);
423 break;
424
425 case SM_CYCAPTION:
426 if(fOS2Look) {
427 rc = OSLibWinQuerySysValue(SVOS_CYTITLEBAR);
428 }
429 else rc = 19;
430 break;
431
432 case SM_CXBORDER:
433 case SM_CYBORDER:
434 rc = 1;
435 break;
436
437 case SM_CXDLGFRAME:
438 case SM_CYDLGFRAME:
439 rc = 3;
440 break;
441
442 case SM_CYMENU:
443 case SM_CXMENUSIZE:
444 case SM_CYMENUSIZE:
445 if(fOS2Look) {
446 rc = OSLibWinQuerySysValue(SVOS_CYMENU);
447 }
448 else rc = 19;
449 break;
450
451 case SM_CXSIZE:
452 case SM_CYSIZE:
453 rc = GetSystemMetrics(SM_CYCAPTION)-2;
454 break;
455
456 case SM_CXFRAME:
457 case SM_CYFRAME:
458 rc = 4;
459 break;
460
461 case SM_CXEDGE:
462 case SM_CYEDGE:
463 rc = 2;
464 break;
465
466 case SM_CXMINSPACING:
467 rc = 160;
468 break;
469
470 case SM_CYMINSPACING:
471 rc = 24;
472 break;
473
474 case SM_CXSMICON:
475 case SM_CYSMICON:
476 rc = 16;
477 break;
478
479 case SM_CYSMCAPTION:
480 rc = 16;
481 break;
482
483 case SM_CXSMSIZE:
484 case SM_CYSMSIZE:
485 rc = 15;
486 break;
487
488//CB: todo: add missing metrics
489
490 case SM_CXICONSPACING: //TODO: size of grid cell for large icons
491 rc = OSLibWinQuerySysValue(SVOS_CXICON);
492 //CB: return standard windows icon size?
493 //rc = 32;
494 break;
495 case SM_CYICONSPACING:
496 rc = OSLibWinQuerySysValue(SVOS_CYICON);
497 //read SM_CXICONSPACING comment
498 //rc = 32;
499 break;
500 case SM_PENWINDOWS:
501 rc = FALSE;
502 break;
503 case SM_DBCSENABLED:
504 rc = FALSE;
505 break;
506 case SM_CXICON:
507 case SM_CYICON:
508 rc = 32; //CB: Win32: only 32x32, OS/2 32x32/40x40
509 // we must implement 32x32 for all screen resolutions
510 break;
511 case SM_ARRANGE:
512 rc = ARW_BOTTOMLEFT | ARW_LEFT;
513 break;
514 case SM_CXMINIMIZED:
515 break;
516 case SM_CYMINIMIZED:
517 break;
518
519 case SM_CXMINTRACK:
520 case SM_CXMIN:
521 rc = 112;
522 break;
523
524 case SM_CYMINTRACK:
525 case SM_CYMIN:
526 rc = 27;
527 break;
528
529 case SM_CXMAXTRACK: //max window size
530 case SM_CXMAXIMIZED: //max toplevel window size
531 rc = OSLibWinQuerySysValue(SVOS_CXSCREEN);
532 break;
533
534 case SM_CYMAXTRACK:
535 case SM_CYMAXIMIZED:
536 rc = OSLibWinQuerySysValue(SVOS_CYSCREEN);
537 break;
538
539 case SM_NETWORK:
540 rc = 0x01; //TODO: default = yes
541 break;
542 case SM_CLEANBOOT:
543 rc = 0; //normal boot
544 break;
545 case SM_CXDRAG: //nr of pixels before drag becomes a real one
546 rc = 2;
547 break;
548 case SM_CYDRAG:
549 rc = 2;
550 break;
551 case SM_SHOWSOUNDS: //show instead of play sound
552 rc = FALSE;
553 break;
554 case SM_CXMENUCHECK:
555 rc = 4; //TODO
556 break;
557 case SM_CYMENUCHECK:
558 rc = OSLibWinQuerySysValue(SVOS_CYMENU);
559 break;
560 case SM_SLOWMACHINE:
561 rc = FALSE; //even a slow machine is fast with OS/2 :)
562 break;
563 case SM_MIDEASTENABLED:
564 rc = FALSE;
565 break;
566 case SM_MOUSEWHEELPRESENT:
567 rc = FALSE;
568 break;
569 case SM_XVIRTUALSCREEN:
570 rc = 0;
571 break;
572 case SM_YVIRTUALSCREEN:
573 rc = 0;
574 break;
575
576 case SM_CXVIRTUALSCREEN:
577 rc = OSLibWinQuerySysValue(SVOS_CXSCREEN);
578 break;
579 case SM_CYVIRTUALSCREEN:
580 rc = OSLibWinQuerySysValue(SVOS_CYSCREEN);
581 break;
582 case SM_CMONITORS:
583 rc = 1;
584 break;
585 case SM_SAMEDISPLAYFORMAT:
586 rc = TRUE;
587 break;
588 case SM_CMETRICS:
589 rc = 81;
590 //rc = O32_GetSystemMetrics(44); //Open32 changed this one
591 break;
592 default:
593 //better than nothing
594 rc = O32_GetSystemMetrics(nIndex);
595 break;
596 }
597 dprintf2(("USER32: GetSystemMetrics %d returned %d\n", nIndex, rc));
598 return(rc);
599}
600//******************************************************************************
601/* Not support by Open32 (not included are the new win9x parameters):
602 case SPI_GETFASTTASKSWITCH:
603 case SPI_GETGRIDGRANULARITY:
604 case SPI_GETICONTITLELOGFONT:
605 case SPI_GETICONTITLEWRAP:
606 case SPI_GETMENUDROPALIGNMENT:
607 case SPI_ICONHORIZONTALSPACING:
608 case SPI_ICONVERTICALSPACING:
609 case SPI_LANGDRIVER:
610 case SPI_SETFASTTASKSWITCH:
611 case SPI_SETGRIDGRANULARITY:
612 case SPI_SETICONTITLELOGFONT:
613 case SPI_SETICONTITLEWRAP:
614 case SPI_SETMENUDROPALIGNMENT:
615 case SPI_GETSCREENSAVEACTIVE:
616 case SPI_GETSCREENSAVETIMEOUT:
617 case SPI_SETDESKPATTERN:
618 case SPI_SETDESKWALLPAPER:
619 case SPI_SETSCREENSAVEACTIVE:
620 case SPI_SETSCREENSAVETIMEOUT:
621*/
622static int dwScreenSaveTimeout = 180;
623static BOOL fScreenSaveActive = FALSE;
624//******************************************************************************
625BOOL WIN32API SystemParametersInfoA(UINT uiAction, UINT uiParam, PVOID pvParam, UINT fWinIni)
626{
627 BOOL rc = TRUE;
628
629 dprintf(("USER32: SystemParametersInfoA uiAction: %d, uiParam: %d, pvParam: %d, fWinIni: %d\n",
630 uiAction, uiParam, pvParam, fWinIni));
631
632 switch(uiAction) {
633
634 case SPI_GETBEEP:
635 *(ULONG*)pvParam = OSLibWinQuerySysValue(SVOS_ALARM);
636 break;
637
638 case SPI_GETKEYBOARDDELAY:
639 *(PULONG)pvParam = OSLibPrfQueryProfileInt(OSLIB_HINI_USER, "PM_ControlPanel",
640 "KeyRepeatDelay", 90);
641 break;
642
643 case SPI_GETKEYBOARDSPEED:
644 *(PULONG)pvParam = OSLibPrfQueryProfileInt(OSLIB_HINI_USER, "PM_ControlPanel",
645 "KeyRepeatRate", 19);
646 break;
647
648#if 0
649// TODO: Make OSLib a seperate DLL and use it everywhere?
650 case SPI_GETMOUSE:
651 {
652 ULONG retCode;
653 retCode = OSLibDosOpen(
654 break;
655 }
656#endif
657
658 case SPI_SETBEEP:
659 // we don't do anything here. Win32 apps shouldn't change OS/2 settings
660 dprintf(("USER32: SPI_SETBEEP is ignored!\n"));
661 break;
662
663 case SPI_SETBORDER:
664 // TODO make this for Win32 apps only, Open32 changes OS/2 settings!
665 dprintf(("USER32: SPI_SETBORDER is ignored, implement!\n"));
666 break;
667
668 case SPI_SETDOUBLECLKHEIGHT:
669 // TODO make this for Win32 apps only, Open32 changes OS/2 settings!
670 dprintf(("USER32: SPI_SETDOUBLECLICKHEIGHT is ignored, implement!\n"));
671 break;
672
673 case SPI_SETDOUBLECLKWIDTH:
674 // TODO make this for Win32 apps only, Open32 changes OS/2 settings!
675 dprintf(("USER32: SPI_SETDOUBLECLICKWIDTH is ignored, implement!\n"));
676 break;
677
678 case SPI_SETDOUBLECLICKTIME:
679 // TODO make this for Win32 apps only, Open32 changes OS/2 settings!
680 dprintf(("USER32: SPI_SETDOUBLECLICKTIME is ignored, implement!\n"));
681 break;
682
683 case SPI_SETKEYBOARDDELAY:
684 // TODO make this for Win32 apps only, Open32 changes OS/2 settings!
685 dprintf(("USER32: SPI_SETKEYBOARDDELAY is ignored, implement!\n"));
686 break;
687
688 case SPI_SETKEYBOARDSPEED:
689 // TODO make this for Win32 apps only, Open32 changes OS/2 settings!
690 dprintf(("USER32: SPI_SETKEYBOARDSPEED is ignored, implement!\n"));
691 break;
692
693 case SPI_SETMOUSE:
694 // TODO make this for Win32 apps only, Open32 changes OS/2 settings!
695 dprintf(("USER32: SPI_SETMOUSE is ignored, implement!\n"));
696 break;
697
698 case SPI_SETMOUSEBUTTONSWAP:
699 // TODO make this for Win32 apps only, Open32 changes OS/2 settings!
700 dprintf(("USER32: SPI_SETMOUSEBUTTONSWAP is ignored, implement!\n"));
701 break;
702
703 case SPI_SCREENSAVERRUNNING:
704 *(BOOL *)pvParam = FALSE;
705 break;
706
707 case SPI_GETSCREENSAVETIMEOUT:
708 if(pvParam) {
709 *(DWORD *)pvParam = dwScreenSaveTimeout;
710 }
711 break;
712
713 case SPI_SETSCREENSAVETIMEOUT:
714 if(pvParam) {
715 dwScreenSaveTimeout = *(DWORD *)pvParam;
716 }
717 break;
718
719 case SPI_GETSCREENSAVEACTIVE:
720 if(pvParam) {
721 *(BOOL *)pvParam = fScreenSaveActive;
722 }
723 break;
724
725 case SPI_SETSCREENSAVEACTIVE:
726 if(pvParam) {
727 fScreenSaveActive = *(BOOL *)pvParam;
728 }
729 break;
730
731 case SPI_GETDRAGFULLWINDOWS:
732 *(BOOL *)pvParam = OSLibWinQuerySysValue(SVOS_DYNAMICDRAG);
733 break;
734
735 case SPI_GETNONCLIENTMETRICS:
736 {
737 LPNONCLIENTMETRICSA lpnm = (LPNONCLIENTMETRICSA)pvParam;
738
739 if (lpnm->cbSize == sizeof(NONCLIENTMETRICSA) || uiParam == sizeof(NONCLIENTMETRICSA))
740 {
741 memset(lpnm, 0, sizeof(NONCLIENTMETRICSA));
742 lpnm->cbSize = sizeof(NONCLIENTMETRICSA);
743
744 SystemParametersInfoA(SPI_GETICONTITLELOGFONT, 0, (LPVOID)&(lpnm->lfCaptionFont),0);
745 lpnm->lfCaptionFont.lfWeight = FW_BOLD;
746 lpnm->iCaptionWidth = 32; //TODO
747 lpnm->iCaptionHeight = 32; //TODO
748
749 SystemParametersInfoA(SPI_GETICONTITLELOGFONT, 0, (LPVOID)&(lpnm->lfSmCaptionFont),0);
750 lpnm->iSmCaptionWidth = GetSystemMetrics(SM_CXSMSIZE);
751 lpnm->iSmCaptionHeight = GetSystemMetrics(SM_CYSMSIZE);
752
753 LPLOGFONTA lpLogFont = &(lpnm->lfMenuFont);
754 if(fOS2Look) {
755 char fontname[128];
756 char *pszFontName;
757 BOOL fFound = TRUE;
758
759 if(OSLibPrfQueryProfileString(OSLIB_HINI_USER, "PM_SystemFonts", "Menus", "", fontname, sizeof(fontname)) == 1) {
760 if(OSLibPrfQueryProfileString(OSLIB_HINI_USER, "PM_SystemFonts", "DefaultFont", "", fontname, sizeof(fontname)) == 1) {
761 fFound = FALSE;
762 }
763 }
764 if(fFound) {
765 pszFontName = fontname;
766 while(*pszFontName != '.' && *pszFontName != 0) pszFontName++;
767 if(*pszFontName) {
768 *pszFontName++ = 0;
769
770 strncpy(lpLogFont->lfFaceName, pszFontName, sizeof(lpLogFont->lfFaceName));
771 lpLogFont->lfFaceName[sizeof(lpLogFont->lfFaceName)-1] = 0;
772 lpLogFont->lfWeight = FW_NORMAL;
773
774 // AH 2001-12-26 use the font size returned by the graphics
775 // driver as the font height. This will take font size settings
776 // such as small, medium and large fonts into account
777 //SvL: Must be negative
778 lpLogFont->lfHeight = -CapsCharHeight;
779 }
780 else fFound = FALSE;
781 }
782 if(!fFound) {
783 GetProfileStringA("Desktop", "MenuFont", "WarpSans",
784 lpLogFont->lfFaceName, LF_FACESIZE);
785 lpLogFont->lfWeight = FW_BOLD;
786 // AH 2001-12-26 take graphics driver font size setting
787 lpLogFont->lfHeight = -GetProfileIntA("Desktop","MenuFontSize", CapsCharHeight);
788 }
789 lpLogFont->lfWidth = 0;
790 lpLogFont->lfEscapement = lpLogFont->lfOrientation = 0;
791 }
792 else {
793 GetProfileStringA("Desktop", "MenuFont", "MS Sans Serif",
794 lpLogFont->lfFaceName, LF_FACESIZE);
795 lpLogFont->lfWeight = FW_NORMAL;
796 lpLogFont->lfHeight = -GetProfileIntA("Desktop","MenuFontSize", 13);
797 lpLogFont->lfWidth = 0;
798 lpLogFont->lfEscapement = lpLogFont->lfOrientation = 0;
799 }
800 lpLogFont->lfItalic = FALSE;
801 lpLogFont->lfStrikeOut = FALSE;
802 lpLogFont->lfUnderline = FALSE;
803 lpLogFont->lfCharSet = ANSI_CHARSET;
804 lpLogFont->lfOutPrecision = OUT_DEFAULT_PRECIS;
805 lpLogFont->lfClipPrecision = CLIP_DEFAULT_PRECIS;
806 lpLogFont->lfPitchAndFamily = DEFAULT_PITCH | FF_SWISS;
807
808 SystemParametersInfoA(SPI_GETICONTITLELOGFONT, 0,
809 (LPVOID)&(lpnm->lfStatusFont),0);
810 SystemParametersInfoA(SPI_GETICONTITLELOGFONT, 0,
811 (LPVOID)&(lpnm->lfMessageFont),0);
812
813 lpnm->iBorderWidth = GetSystemMetrics(SM_CXBORDER);
814 lpnm->iScrollWidth = GetSystemMetrics(SM_CXHSCROLL);
815 lpnm->iScrollHeight = GetSystemMetrics(SM_CYHSCROLL);
816 lpnm->iMenuHeight = GetSystemMetrics(SM_CYMENU);
817 lpnm->iMenuWidth = lpnm->iMenuHeight; //TODO
818 }
819 else
820 {
821 dprintf(("SPI_GETNONCLIENTMETRICS: size mismatch !! (is %d; should be %d)\n", lpnm->cbSize, sizeof(NONCLIENTMETRICSA)));
822 /* FIXME: SetLastError? */
823 rc = FALSE;
824 }
825 break;
826 }
827
828 case SPI_GETICONMETRICS: /* 45 WINVER >= 0x400 */
829 {
830 LPICONMETRICSA lpIcon = (LPICONMETRICSA)pvParam;
831 if(lpIcon && lpIcon->cbSize == sizeof(*lpIcon))
832 {
833 SystemParametersInfoA( SPI_ICONHORIZONTALSPACING, 0,
834 &lpIcon->iHorzSpacing, FALSE );
835 SystemParametersInfoA( SPI_ICONVERTICALSPACING, 0,
836 &lpIcon->iVertSpacing, FALSE );
837 SystemParametersInfoA( SPI_GETICONTITLEWRAP, 0,
838 &lpIcon->iTitleWrap, FALSE );
839 SystemParametersInfoA( SPI_GETICONTITLELOGFONT, 0,
840 &lpIcon->lfFont, FALSE );
841 }
842 else
843 {
844 dprintf(("SPI_GETICONMETRICS: size mismatch !! (is %d; should be %d)\n", lpIcon->cbSize, sizeof(ICONMETRICSA)));
845 /* FIXME: SetLastError? */
846 rc = FALSE;
847 }
848 break;
849 }
850
851 case SPI_GETICONTITLELOGFONT:
852 {
853 LPLOGFONTA lpLogFont = (LPLOGFONTA)pvParam;
854
855 /* from now on we always have an alias for MS Sans Serif */
856 strcpy(lpLogFont->lfFaceName, "MS Sans Serif");
857 lpLogFont->lfHeight = -GetProfileIntA("Desktop","IconTitleSize", /*8*/12); //CB: 8 is too small
858 lpLogFont->lfWidth = 0;
859 lpLogFont->lfEscapement = lpLogFont->lfOrientation = 0;
860 lpLogFont->lfWeight = FW_NORMAL;
861 lpLogFont->lfItalic = FALSE;
862 lpLogFont->lfStrikeOut = FALSE;
863 lpLogFont->lfUnderline = FALSE;
864 lpLogFont->lfCharSet = ANSI_CHARSET;
865 lpLogFont->lfOutPrecision = OUT_DEFAULT_PRECIS;
866 lpLogFont->lfClipPrecision = CLIP_DEFAULT_PRECIS;
867 lpLogFont->lfPitchAndFamily = DEFAULT_PITCH | FF_SWISS;
868 break;
869 }
870 case SPI_GETBORDER:
871 *(INT *)pvParam = GetSystemMetrics( SM_CXFRAME );
872 break;
873
874 case SPI_GETWORKAREA:
875 SetRect( (RECT *)pvParam, 0, 0,
876 GetSystemMetrics( SM_CXSCREEN ),
877 GetSystemMetrics( SM_CYSCREEN )
878 );
879 break;
880
881 case SPI_GETWHEELSCROLLLINES: //TODO: Undocumented
882 rc = 16;
883 break;
884
885 default:
886 dprintf(("System parameter value is not supported!\n"));
887 rc = FALSE;
888 // AH: no longer call Open32
889 //rc = O32_SystemParametersInfo(uiAction, uiParam, pvParam, fWinIni);
890 break;
891 }
892 dprintf(("USER32: SystemParametersInfoA %d, returned %d\n", uiAction, rc));
893 return(rc);
894}
895//******************************************************************************
896//TODO: Check for more options that have different structs for Unicode!!!!
897//******************************************************************************
898BOOL WIN32API SystemParametersInfoW(UINT uiAction, UINT uiParam, PVOID pvParam, UINT fWinIni)
899{
900 BOOL rc = TRUE;
901 NONCLIENTMETRICSW *clientMetricsW = (NONCLIENTMETRICSW *)pvParam;
902 NONCLIENTMETRICSA clientMetricsA = {0};
903 PVOID pvParamA;
904 UINT uiParamA;
905
906 switch(uiAction) {
907 case SPI_SETNONCLIENTMETRICS:
908 clientMetricsA.iBorderWidth = clientMetricsW->iBorderWidth;
909 clientMetricsA.iScrollWidth = clientMetricsW->iScrollWidth;
910 clientMetricsA.iScrollHeight = clientMetricsW->iScrollHeight;
911 clientMetricsA.iCaptionWidth = clientMetricsW->iCaptionWidth;
912 clientMetricsA.iCaptionHeight = clientMetricsW->iCaptionHeight;
913 ConvertFontWA(&clientMetricsW->lfCaptionFont, &clientMetricsA.lfCaptionFont);
914 clientMetricsA.iSmCaptionWidth = clientMetricsW->iSmCaptionWidth;
915 clientMetricsA.iSmCaptionHeight = clientMetricsW->iSmCaptionHeight;
916 ConvertFontWA(&clientMetricsW->lfSmCaptionFont, &clientMetricsA.lfSmCaptionFont);
917 clientMetricsA.iMenuWidth = clientMetricsW->iMenuWidth;
918 clientMetricsA.iMenuHeight = clientMetricsW->iMenuHeight;
919 ConvertFontWA(&clientMetricsW->lfMenuFont, &clientMetricsA.lfMenuFont);
920 ConvertFontWA(&clientMetricsW->lfStatusFont, &clientMetricsA.lfStatusFont);
921 ConvertFontWA(&clientMetricsW->lfMessageFont, &clientMetricsA.lfMessageFont);
922 //no break
923 case SPI_GETNONCLIENTMETRICS:
924 // Fix: set the structure size in any case (SET and GET!)
925 clientMetricsA.cbSize = sizeof(NONCLIENTMETRICSA);
926
927 uiParamA = sizeof(NONCLIENTMETRICSA);
928 pvParamA = &clientMetricsA;
929 break;
930
931 case SPI_GETICONMETRICS: /* 45 WINVER >= 0x400 */
932 {
933 LPICONMETRICSW lpIcon = (LPICONMETRICSW)pvParam;
934 if(lpIcon && lpIcon->cbSize == sizeof(*lpIcon))
935 {
936 SystemParametersInfoW( SPI_ICONHORIZONTALSPACING, 0,
937 &lpIcon->iHorzSpacing, FALSE );
938 SystemParametersInfoW( SPI_ICONVERTICALSPACING, 0,
939 &lpIcon->iVertSpacing, FALSE );
940 SystemParametersInfoW( SPI_GETICONTITLEWRAP, 0,
941 &lpIcon->iTitleWrap, FALSE );
942 SystemParametersInfoW( SPI_GETICONTITLELOGFONT, 0,
943 &lpIcon->lfFont, FALSE );
944 return TRUE;
945 }
946 else
947 {
948 dprintf(("SPI_GETICONMETRICS: size mismatch !! (is %d; should be %d)\n", lpIcon->cbSize, sizeof(ICONMETRICSA)));
949 /* FIXME: SetLastError? */
950 return FALSE;
951 }
952 }
953
954 case SPI_GETICONTITLELOGFONT:
955 {
956 LPLOGFONTW lpLogFont = (LPLOGFONTW)pvParam;
957
958 /* from now on we always have an alias for MS Sans Serif */
959 lstrcpyW(lpLogFont->lfFaceName, (LPCWSTR)L"MS Sans Serif");
960 lpLogFont->lfHeight = -GetProfileIntA("Desktop","IconTitleSize", /*8*/12); //CB: 8 is too small
961 lpLogFont->lfWidth = 0;
962 lpLogFont->lfEscapement = lpLogFont->lfOrientation = 0;
963 lpLogFont->lfWeight = FW_NORMAL;
964 lpLogFont->lfItalic = FALSE;
965 lpLogFont->lfStrikeOut = FALSE;
966 lpLogFont->lfUnderline = FALSE;
967 lpLogFont->lfCharSet = ANSI_CHARSET;
968 lpLogFont->lfOutPrecision = OUT_DEFAULT_PRECIS;
969 lpLogFont->lfClipPrecision = CLIP_DEFAULT_PRECIS;
970 lpLogFont->lfPitchAndFamily = DEFAULT_PITCH | FF_SWISS;
971 return TRUE;
972 }
973 default:
974 pvParamA = pvParam;
975 uiParamA = uiParam;
976 break;
977 }
978 rc = SystemParametersInfoA(uiAction, uiParamA, pvParamA, fWinIni);
979
980 switch(uiAction) {
981 case SPI_GETNONCLIENTMETRICS:
982 clientMetricsW->cbSize = sizeof(*clientMetricsW);
983 clientMetricsW->iBorderWidth = clientMetricsA.iBorderWidth;
984 clientMetricsW->iScrollWidth = clientMetricsA.iScrollWidth;
985 clientMetricsW->iScrollHeight = clientMetricsA.iScrollHeight;
986 clientMetricsW->iCaptionWidth = clientMetricsA.iCaptionWidth;
987 clientMetricsW->iCaptionHeight = clientMetricsA.iCaptionHeight;
988 ConvertFontAW(&clientMetricsA.lfCaptionFont, &clientMetricsW->lfCaptionFont);
989
990 clientMetricsW->iSmCaptionWidth = clientMetricsA.iSmCaptionWidth;
991 clientMetricsW->iSmCaptionHeight = clientMetricsA.iSmCaptionHeight;
992 ConvertFontAW(&clientMetricsA.lfSmCaptionFont, &clientMetricsW->lfSmCaptionFont);
993
994 clientMetricsW->iMenuWidth = clientMetricsA.iMenuWidth;
995 clientMetricsW->iMenuHeight = clientMetricsA.iMenuHeight;
996 ConvertFontAW(&clientMetricsA.lfMenuFont, &clientMetricsW->lfMenuFont);
997 ConvertFontAW(&clientMetricsA.lfStatusFont, &clientMetricsW->lfStatusFont);
998 ConvertFontAW(&clientMetricsA.lfMessageFont, &clientMetricsW->lfMessageFont);
999 break;
1000 }
1001 dprintf(("USER32: SystemParametersInfoW %d, returned %d\n", uiAction, rc));
1002 return(rc);
1003}
1004
1005/* Help Functions */
1006
1007BOOL WIN32API WinHelpA( HWND hwnd, LPCSTR lpszHelp, UINT uCommand, DWORD dwData)
1008{
1009 static WORD WM_WINHELP = 0;
1010 HWND hDest;
1011 LPWINHELP lpwh;
1012 HINSTANCE winhelp;
1013 int size,dsize,nlen;
1014 BOOL ret;
1015
1016 dprintf(("USER32: WinHelpA %x %s %d %x", hwnd, lpszHelp, uCommand, dwData));
1017
1018 if(!WM_WINHELP)
1019 {
1020 WM_WINHELP=RegisterWindowMessageA("WM_WINHELP");
1021 if(!WM_WINHELP)
1022 return FALSE;
1023 }
1024
1025 hDest = FindWindowA( "MS_WINHELP", NULL );
1026 if(!hDest)
1027 {
1028 if(uCommand == HELP_QUIT)
1029 return TRUE;
1030 else
1031 winhelp = WinExec ( "winhlp32.exe -x", SW_SHOWNORMAL );
1032 if ( winhelp <= 32 ) return FALSE;
1033 if ( ! ( hDest = FindWindowA ( "MS_WINHELP", NULL ) )) return FALSE;
1034 }
1035
1036 switch(uCommand)
1037 {
1038 case HELP_CONTEXT:
1039 case HELP_SETCONTENTS:
1040 case HELP_CONTENTS:
1041 case HELP_CONTEXTPOPUP:
1042 case HELP_FORCEFILE:
1043 case HELP_HELPONHELP:
1044 case HELP_FINDER:
1045 case HELP_QUIT:
1046 dsize=0;
1047 break;
1048
1049 case HELP_KEY:
1050 case HELP_PARTIALKEY:
1051 case HELP_COMMAND:
1052 dsize = strlen( (LPSTR)dwData )+1;
1053 break;
1054
1055 case HELP_MULTIKEY:
1056 dsize = ((LPMULTIKEYHELP)dwData)->mkSize;
1057 break;
1058
1059 case HELP_SETWINPOS:
1060 dsize = ((LPHELPWININFO)dwData)->wStructSize;
1061 break;
1062
1063 default:
1064 //WARN("Unknown help command %d\n",wCommand);
1065 return FALSE;
1066 }
1067 if(lpszHelp)
1068 nlen = strlen(lpszHelp)+1;
1069 else
1070 nlen = 0;
1071 size = sizeof(WINHELP) + nlen + dsize;
1072
1073 //allocate shared memory
1074 lpwh = (WINHELP*)_smalloc(size);
1075 lpwh->size = size;
1076 lpwh->command = uCommand;
1077 lpwh->data = dwData;
1078 if(nlen)
1079 {
1080 strcpy(((char*)lpwh) + sizeof(WINHELP),lpszHelp);
1081 lpwh->ofsFilename = sizeof(WINHELP);
1082 } else
1083 lpwh->ofsFilename = 0;
1084 if(dsize)
1085 {
1086 memcpy(((char*)lpwh)+sizeof(WINHELP)+nlen,(LPSTR)dwData,dsize);
1087 lpwh->ofsData = sizeof(WINHELP)+nlen;
1088 } else
1089 lpwh->ofsData = 0;
1090
1091 ret = SendMessageA(hDest,WM_WINHELP,hwnd,(LPARAM)lpwh);
1092 free(lpwh);
1093 return ret;
1094}
1095//******************************************************************************
1096//******************************************************************************
1097BOOL WIN32API WinHelpW( HWND hwnd, LPCWSTR lpszHelp, UINT uCommand, DWORD dwData)
1098{
1099 char *astring = UnicodeToAsciiString((LPWSTR)lpszHelp);
1100 BOOL rc;
1101
1102 dprintf(("USER32: WinHelpW\n"));
1103
1104 rc = WinHelpA(hwnd,astring,uCommand,dwData);
1105 FreeAsciiString(astring);
1106
1107 return rc;
1108}
1109
1110
1111/* Window Functions */
1112
1113/*****************************************************************************
1114 * Name : BOOL WIN32API PaintDesktop
1115 * Purpose : The PaintDesktop function fills the clipping region in the
1116 * specified device context with the desktop pattern or wallpaper.
1117 * The function is provided primarily for shell desktops.
1118 * Parameters:
1119 * Variables :
1120 * Result : If the function succeeds, the return value is TRUE.
1121 * If the function fails, the return value is FALSE.
1122 * Remark :
1123 * Status : UNTESTED STUB
1124 *
1125 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
1126 *****************************************************************************/
1127BOOL WIN32API PaintDesktop(HDC hdc)
1128{
1129 dprintf(("USER32:PaintDesktop (%08x) not implemented.\n",
1130 hdc));
1131
1132 return (FALSE);
1133}
1134
1135/* Filled Shape Functions */
1136
1137 /* Last COLOR id */
1138#define COLOR_MAX COLOR_GRADIENTINACTIVECAPTION
1139
1140int WIN32API FillRect(HDC hDC, const RECT * lprc, HBRUSH hbr)
1141{
1142 //SvL: brush 0 means current selected brush (verified in NT4)
1143 if(hbr == 0) {
1144 hbr = GetCurrentObject(hDC, OBJ_BRUSH);
1145 }
1146 else
1147 if (hbr <= (HBRUSH) (COLOR_MAX + 1)) {
1148 hbr = GetSysColorBrush( (INT) hbr - 1 );
1149 }
1150 dprintf(("USER32: FillRect %x (%d,%d)(%d,%d) brush %X", hDC, lprc->left, lprc->top, lprc->right, lprc->bottom, hbr));
1151 return O32_FillRect(hDC,lprc,hbr);
1152}
1153//******************************************************************************
1154//******************************************************************************
1155int WIN32API FrameRect( HDC hDC, const RECT * lprc, HBRUSH hbr)
1156{
1157 dprintf(("USER32: FrameRect %x (%d,%d)(%d,%d) brush %x", hDC, lprc->top, lprc->left, lprc->bottom, lprc->right, hbr));
1158 return O32_FrameRect(hDC,lprc,hbr);
1159}
1160//******************************************************************************
1161//******************************************************************************
1162BOOL WIN32API InvertRect( HDC hDC, const RECT * lprc)
1163{
1164 if(lprc) {
1165 dprintf(("USER32: InvertRect %x (%d,%d)(%d,%d)", hDC, lprc->left, lprc->top, lprc->right, lprc->bottom));
1166 }
1167 else dprintf(("USER32: InvertRect %x NULL", hDC));
1168 return O32_InvertRect(hDC,lprc);
1169}
1170
1171/* System Information Functions */
1172
1173/* Window Station and Desktop Functions */
1174
1175/*****************************************************************************
1176 * Name : HDESK WIN32API GetThreadDesktop
1177 * Purpose : The GetThreadDesktop function returns a handle to the desktop
1178 * associated with a specified thread.
1179 * Parameters: DWORD dwThreadId thread identifier
1180 * Variables :
1181 * Result : If the function succeeds, the return value is the handle of the
1182 * desktop associated with the specified thread.
1183 * Remark :
1184 * Status : UNTESTED STUB
1185 *
1186 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
1187 *****************************************************************************/
1188HDESK WIN32API GetThreadDesktop(DWORD dwThreadId)
1189{
1190 dprintf(("USER32:GetThreadDesktop (%u) not implemented.\n",
1191 dwThreadId));
1192
1193 return (NULL);
1194}
1195
1196/*****************************************************************************
1197 * Name : BOOL WIN32API CloseDesktop
1198 * Purpose : The CloseDesktop function closes an open handle of a desktop
1199 * object. A desktop is a secure object contained within a window
1200 * station object. A desktop has a logical display surface and
1201 * contains windows, menus and hooks.
1202 * Parameters: HDESK hDesktop
1203 * Variables :
1204 * Result : If the function succeeds, the return value is TRUE.
1205 * If the functions fails, the return value is FALSE. To get
1206 * extended error information, call GetLastError.
1207 * Remark :
1208 * Status : UNTESTED STUB
1209 *
1210 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
1211 *****************************************************************************/
1212BOOL WIN32API CloseDesktop(HDESK hDesktop)
1213{
1214 dprintf(("USER32:CloseDesktop(%08x) not implemented.\n",
1215 hDesktop));
1216
1217 return (FALSE);
1218}
1219/*****************************************************************************
1220 * Name : BOOL WIN32API CloseWindowStation
1221 * Purpose : The CloseWindowStation function closes an open window station handle.
1222 * Parameters: HWINSTA hWinSta
1223 * Variables :
1224 * Result :
1225 * Remark : If the function succeeds, the return value is TRUE.
1226 * If the functions fails, the return value is FALSE. To get
1227 * extended error information, call GetLastError.
1228 * Status : UNTESTED STUB
1229 *
1230 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
1231 *****************************************************************************/
1232BOOL WIN32API CloseWindowStation(HWINSTA hWinSta)
1233{
1234 dprintf(("USER32:CloseWindowStation(%08x) not implemented.\n",
1235 hWinSta));
1236
1237 return (FALSE);
1238}
1239/*****************************************************************************
1240 * Name : HDESK WIN32API CreateDesktopA
1241 * Purpose : The CreateDesktop function creates a new desktop on the window
1242 * station associated with the calling process.
1243 * Parameters: LPCTSTR lpszDesktop name of the new desktop
1244 * LPCTSTR lpszDevice name of display device to assign to the desktop
1245 * LPDEVMODE pDevMode reserved; must be NULL
1246 * DWORD dwFlags flags to control interaction with other applications
1247 * DWORD dwDesiredAccess specifies access of returned handle
1248 * LPSECURITY_ATTRIBUTES lpsa specifies security attributes of the desktop
1249 * Variables :
1250 * Result : If the function succeeds, the return value is a handle of the
1251 * newly created desktop.
1252 * If the function fails, the return value is NULL. To get extended
1253 * error information, call GetLastError.
1254 * Remark :
1255 * Status : UNTESTED STUB
1256 *
1257 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
1258 *****************************************************************************/
1259HDESK WIN32API CreateDesktopA(LPCTSTR lpszDesktop,
1260 LPCTSTR lpszDevice,
1261 LPDEVMODEA pDevMode,
1262 DWORD dwFlags,
1263 DWORD dwDesiredAccess,
1264 LPSECURITY_ATTRIBUTES lpsa)
1265{
1266 dprintf(("USER32:CreateDesktopA(%s,%s,%08xh,%08xh,%08xh,%08x) not implemented.\n",
1267 lpszDesktop,
1268 lpszDevice,
1269 pDevMode,
1270 dwFlags,
1271 dwDesiredAccess,
1272 lpsa));
1273
1274 return (NULL);
1275}
1276/*****************************************************************************
1277 * Name : HDESK WIN32API CreateDesktopW
1278 * Purpose : The CreateDesktop function creates a new desktop on the window
1279 * station associated with the calling process.
1280 * Parameters: LPCTSTR lpszDesktop name of the new desktop
1281 * LPCTSTR lpszDevice name of display device to assign to the desktop
1282 * LPDEVMODE pDevMode reserved; must be NULL
1283 * DWORD dwFlags flags to control interaction with other applications
1284 * DWORD dwDesiredAccess specifies access of returned handle
1285 * LPSECURITY_ATTRIBUTES lpsa specifies security attributes of the desktop
1286 * Variables :
1287 * Result : If the function succeeds, the return value is a handle of the
1288 * newly created desktop.
1289 * If the function fails, the return value is NULL. To get extended
1290 * error information, call GetLastError.
1291 * Remark :
1292 * Status : UNTESTED STUB
1293 *
1294 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
1295 *****************************************************************************/
1296HDESK WIN32API CreateDesktopW(LPCTSTR lpszDesktop,
1297 LPCTSTR lpszDevice,
1298 LPDEVMODEW pDevMode,
1299 DWORD dwFlags,
1300 DWORD dwDesiredAccess,
1301 LPSECURITY_ATTRIBUTES lpsa)
1302{
1303 dprintf(("USER32:CreateDesktopW(%s,%s,%08xh,%08xh,%08xh,%08x) not implemented.\n",
1304 lpszDesktop,
1305 lpszDevice,
1306 pDevMode,
1307 dwFlags,
1308 dwDesiredAccess,
1309 lpsa));
1310
1311 return (NULL);
1312}
1313/*****************************************************************************
1314 * Name : HWINSTA WIN32API CreateWindowStationA
1315 * Purpose : The CreateWindowStation function creates a window station object.
1316 * It returns a handle that can be used to access the window station.
1317 * A window station is a secure object that contains a set of global
1318 * atoms, a clipboard, and a set of desktop objects.
1319 * Parameters: LPTSTR lpwinsta name of the new window station
1320 * DWORD dwReserved reserved; must be NULL
1321 * DWORD dwDesiredAccess specifies access of returned handle
1322 * LPSECURITY_ATTRIBUTES lpsa specifies security attributes of the window station
1323 * Variables :
1324 * Result : If the function succeeds, the return value is the handle to the
1325 * newly created window station.
1326 * If the function fails, the return value is NULL. To get extended
1327 * error information, call GetLastError.
1328 * Remark :
1329 * Status : UNTESTED STUB
1330 *
1331 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
1332 *****************************************************************************/
1333HWINSTA WIN32API CreateWindowStationA(LPTSTR lpWinSta,
1334 DWORD dwReserved,
1335 DWORD dwDesiredAccess,
1336 LPSECURITY_ATTRIBUTES lpsa)
1337{
1338 dprintf(("USER32:CreateWindowStationA(%s,%08xh,%08xh,%08x) not implemented.\n",
1339 lpWinSta,
1340 dwReserved,
1341 dwDesiredAccess,
1342 lpsa));
1343
1344 return (NULL);
1345}
1346/*****************************************************************************
1347 * Name : HWINSTA WIN32API CreateWindowStationW
1348 * Purpose : The CreateWindowStation function creates a window station object.
1349 * It returns a handle that can be used to access the window station.
1350 * A window station is a secure object that contains a set of global
1351 * atoms, a clipboard, and a set of desktop objects.
1352 * Parameters: LPTSTR lpwinsta name of the new window station
1353 * DWORD dwReserved reserved; must be NULL
1354 * DWORD dwDesiredAccess specifies access of returned handle
1355 * LPSECURITY_ATTRIBUTES lpsa specifies security attributes of the window station
1356 * Variables :
1357 * Result : If the function succeeds, the return value is the handle to the
1358 * newly created window station.
1359 * If the function fails, the return value is NULL. To get extended
1360 * error information, call GetLastError.
1361 * Remark :
1362 * Status : UNTESTED STUB
1363 *
1364 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
1365 *****************************************************************************/
1366HWINSTA WIN32API CreateWindowStationW(LPWSTR lpWinSta,
1367 DWORD dwReserved,
1368 DWORD dwDesiredAccess,
1369 LPSECURITY_ATTRIBUTES lpsa)
1370{
1371 dprintf(("USER32:CreateWindowStationW(%s,%08xh,%08xh,%08x) not implemented.\n",
1372 lpWinSta,
1373 dwReserved,
1374 dwDesiredAccess,
1375 lpsa));
1376
1377 return (NULL);
1378}
1379/*****************************************************************************
1380 * Name : BOOL WIN32API EnumDesktopWindows
1381 * Purpose : The EnumDesktopWindows function enumerates all windows in a
1382 * desktop by passing the handle of each window, in turn, to an
1383 * application-defined callback function.
1384 * Parameters: HDESK hDesktop handle of desktop to enumerate
1385 * WNDENUMPROC lpfn points to application's callback function
1386 * LPARAM lParam 32-bit value to pass to the callback function
1387 * Variables :
1388 * Result : If the function succeeds, the return value is TRUE.
1389 * If the function fails, the return value is FALSE. To get
1390 * extended error information, call GetLastError.
1391 * Remark :
1392 * Status : UNTESTED STUB
1393 *
1394 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
1395 *****************************************************************************/
1396BOOL WIN32API EnumDesktopWindows(HDESK hDesktop,
1397 WNDENUMPROC lpfn,
1398 LPARAM lParam)
1399{
1400 dprintf(("USER32:EnumDesktopWindows (%08xh,%08xh,%08x) not implemented.\n",
1401 hDesktop,
1402 lpfn,
1403 lParam));
1404
1405 return (FALSE);
1406}
1407/*****************************************************************************
1408 * Name : BOOL WIN32API EnumDesktopsA
1409 * Purpose : The EnumDesktops function enumerates all desktops in the window
1410 * station assigned to the calling process. The function does so by
1411 * passing the name of each desktop, in turn, to an application-
1412 * defined callback function.
1413 * Parameters: HWINSTA hwinsta handle of window station to enumerate
1414 * DESKTOPENUMPROC lpEnumFunc points to application's callback function
1415 * LPARAM lParam 32-bit value to pass to the callback function
1416 * Variables :
1417 * Result : If the function succeeds, the return value is TRUE.
1418 * If the function fails, the return value is FALSE. To get extended
1419 * error information, call GetLastError.
1420 * Remark :
1421 * Status : UNTESTED STUB
1422 *
1423 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
1424 *****************************************************************************/
1425BOOL WIN32API EnumDesktopsA(HWINSTA hWinSta,
1426 DESKTOPENUMPROCA lpEnumFunc,
1427 LPARAM lParam)
1428{
1429 dprintf(("USER32:EnumDesktopsA (%08xh,%08xh,%08x) not implemented.\n",
1430 hWinSta,
1431 lpEnumFunc,
1432 lParam));
1433
1434 return (FALSE);
1435}
1436/*****************************************************************************
1437 * Name : BOOL WIN32API EnumDesktopsW
1438 * Purpose : The EnumDesktops function enumerates all desktops in the window
1439 * station assigned to the calling process. The function does so by
1440 * passing the name of each desktop, in turn, to an application-
1441 * defined callback function.
1442 * Parameters: HWINSTA hwinsta handle of window station to enumerate
1443 * DESKTOPENUMPROC lpEnumFunc points to application's callback function
1444 * LPARAM lParam 32-bit value to pass to the callback function
1445 * Variables :
1446 * Result : If the function succeeds, the return value is TRUE.
1447 * If the function fails, the return value is FALSE. To get extended
1448 * error information, call GetLastError.
1449 * Remark :
1450 * Status : UNTESTED STUB
1451 *
1452 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
1453 *****************************************************************************/
1454BOOL WIN32API EnumDesktopsW(HWINSTA hWinSta,
1455 DESKTOPENUMPROCW lpEnumFunc,
1456 LPARAM lParam)
1457{
1458 dprintf(("USER32:EnumDesktopsW (%08xh,%08xh,%08x) not implemented.\n",
1459 hWinSta,
1460 lpEnumFunc,
1461 lParam));
1462
1463 return (FALSE);
1464}
1465/*****************************************************************************
1466 * Name : BOOL WIN32API EnumWindowStationsA
1467 * Purpose : The EnumWindowStations function enumerates all windowstations
1468 * in the system by passing the name of each window station, in
1469 * turn, to an application-defined callback function.
1470 * Parameters:
1471 * Variables : WINSTAENUMPROC lpEnumFunc points to application's callback function
1472 * LPARAM lParam 32-bit value to pass to the callback function
1473 * Result : If the function succeeds, the return value is TRUE.
1474 * If the function fails the return value is FALSE. To get extended
1475 * error information, call GetLastError.
1476 * Remark :
1477 * Status : UNTESTED STUB
1478 *
1479 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
1480 *****************************************************************************/
1481BOOL WIN32API EnumWindowStationsA(WINSTAENUMPROCA lpEnumFunc,
1482 LPARAM lParam)
1483{
1484 dprintf(("USER32:EnumWindowStationsA (%08xh,%08x) not implemented.\n",
1485 lpEnumFunc,
1486 lParam));
1487
1488 return (FALSE);
1489}
1490/*****************************************************************************
1491 * Name : BOOL WIN32API EnumWindowStationsW
1492 * Purpose : The EnumWindowStations function enumerates all windowstations
1493 * in the system by passing the name of each window station, in
1494 * turn, to an application-defined callback function.
1495 * Parameters:
1496 * Variables : WINSTAENUMPROC lpEnumFunc points to application's callback function
1497 * LPARAM lParam 32-bit value to pass to the callback function
1498 * Result : If the function succeeds, the return value is TRUE.
1499 * If the function fails the return value is FALSE. To get extended
1500 * error information, call GetLastError.
1501 * Remark :
1502 * Status : UNTESTED STUB
1503 *
1504 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
1505 *****************************************************************************/
1506BOOL WIN32API EnumWindowStationsW(WINSTAENUMPROCW lpEnumFunc,
1507 LPARAM lParam)
1508{
1509 dprintf(("USER32:EnumWindowStationsW (%08xh,%08x) not implemented.\n",
1510 lpEnumFunc,
1511 lParam));
1512
1513 return (FALSE);
1514}
1515/*****************************************************************************
1516 * Name : HWINSTA WIN32API GetProcessWindowStation
1517 * Purpose : The GetProcessWindowStation function returns a handle of the
1518 * window station associated with the calling process.
1519 * Parameters:
1520 * Variables :
1521 * Result : If the function succeeds, the return value is a handle of the
1522 * window station associated with the calling process.
1523 * If the function fails, the return value is NULL. This can occur
1524 * if the calling process is not an application written for Windows
1525 * NT. To get extended error information, call GetLastError.
1526 * Remark :
1527 * Status : UNTESTED STUB
1528 *
1529 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
1530 *****************************************************************************/
1531HWINSTA WIN32API GetProcessWindowStation(VOID)
1532{
1533 dprintf(("USER32:GetProcessWindowStation () not implemented.\n"));
1534
1535 return (NULL);
1536}
1537/*****************************************************************************
1538 * Name : BOOL WIN32API GetUserObjectInformationA
1539 * Purpose : The GetUserObjectInformation function returns information about
1540 * a window station or desktop object.
1541 * Parameters: HANDLE hObj handle of object to get information for
1542 * int nIndex type of information to get
1543 * PVOID pvInfo points to buffer that receives the information
1544 * DWORD nLength size, in bytes, of pvInfo buffer
1545 * LPDWORD lpnLengthNeeded receives required size, in bytes, of pvInfo buffer
1546 * Variables :
1547 * Result : If the function succeeds, the return value is TRUE.
1548 * If the function fails, the return value is FALSE. To get extended
1549 * error information, call GetLastError.
1550 * Remark :
1551 * Status : UNTESTED STUB
1552 *
1553 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
1554 *****************************************************************************/
1555BOOL WIN32API GetUserObjectInformationA(HANDLE hObj,
1556 int nIndex,
1557 PVOID pvInfo,
1558 DWORD nLength,
1559 LPDWORD lpnLengthNeeded)
1560{
1561 dprintf(("USER32:GetUserObjectInformationA (%08xh,%08xh,%08xh,%u,%08x) not implemented.\n",
1562 hObj,
1563 nIndex,
1564 pvInfo,
1565 nLength,
1566 lpnLengthNeeded));
1567
1568 return (FALSE);
1569}
1570/*****************************************************************************
1571 * Name : BOOL WIN32API GetUserObjectInformationW
1572 * Purpose : The GetUserObjectInformation function returns information about
1573 * a window station or desktop object.
1574 * Parameters: HANDLE hObj handle of object to get information for
1575 * int nIndex type of information to get
1576 * PVOID pvInfo points to buffer that receives the information
1577 * DWORD nLength size, in bytes, of pvInfo buffer
1578 * LPDWORD lpnLengthNeeded receives required size, in bytes, of pvInfo buffer
1579 * Variables :
1580 * Result : If the function succeeds, the return value is TRUE.
1581 * If the function fails, the return value is FALSE. To get extended
1582 * error information, call GetLastError.
1583 * Remark :
1584 * Status : UNTESTED STUB
1585 *
1586 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
1587 *****************************************************************************/
1588BOOL WIN32API GetUserObjectInformationW(HANDLE hObj,
1589 int nIndex,
1590 PVOID pvInfo,
1591 DWORD nLength,
1592 LPDWORD lpnLengthNeeded)
1593{
1594 dprintf(("USER32:GetUserObjectInformationW (%08xh,%08xh,%08xh,%u,%08x) not implemented.\n",
1595 hObj,
1596 nIndex,
1597 pvInfo,
1598 nLength,
1599 lpnLengthNeeded));
1600
1601 return (FALSE);
1602}
1603/*****************************************************************************
1604 * Name : BOOL WIN32API GetUserObjectSecurity
1605 * Purpose : The GetUserObjectSecurity function retrieves security information
1606 * for the specified user object.
1607 * Parameters: HANDLE hObj handle of user object
1608 * SECURITY_INFORMATION * pSIRequested address of requested security information
1609 * LPSECURITY_DESCRIPTOR pSID address of security descriptor
1610 * DWORD nLength size of buffer for security descriptor
1611 * LPDWORD lpnLengthNeeded address of required size of buffer
1612 * Variables :
1613 * Result : If the function succeeds, the return value is TRUE.
1614 * If the function fails, the return value is FALSE. To get extended
1615 * error information, call GetLastError.
1616 * Remark :
1617 * Status : UNTESTED STUB
1618 *
1619 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
1620 *****************************************************************************/
1621BOOL WIN32API GetUserObjectSecurity(HANDLE hObj,
1622 PSECURITY_INFORMATION pSIRequested,
1623 PSECURITY_DESCRIPTOR pSID,
1624 DWORD nLength,
1625 LPDWORD lpnLengthNeeded)
1626{
1627 dprintf(("USER32:GetUserObjectSecurity (%08xh,%08xh,%08xh,%u,%08x) not implemented.\n",
1628 hObj,
1629 pSIRequested,
1630 pSID,
1631 nLength,
1632 lpnLengthNeeded));
1633
1634 return (FALSE);
1635}
1636/*****************************************************************************
1637 * Name : HDESK WIN32API OpenDesktopA
1638 * Purpose : The OpenDesktop function returns a handle to an existing desktop.
1639 * A desktop is a secure object contained within a window station
1640 * object. A desktop has a logical display surface and contains
1641 * windows, menus and hooks.
1642 * Parameters: LPCTSTR lpszDesktopName name of the desktop to open
1643 * DWORD dwFlags flags to control interaction with other applications
1644 * BOOL fInherit specifies whether returned handle is inheritable
1645 * DWORD dwDesiredAccess specifies access of returned handle
1646 * Variables :
1647 * Result : If the function succeeds, the return value is the handle to the
1648 * opened desktop.
1649 * If the function fails, the return value is NULL. To get extended
1650 * error information, call GetLastError.
1651 * Remark :
1652 * Status : UNTESTED STUB
1653 *
1654 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
1655 *****************************************************************************/
1656HDESK WIN32API OpenDesktopA(LPCTSTR lpszDesktopName,
1657 DWORD dwFlags,
1658 BOOL fInherit,
1659 DWORD dwDesiredAccess)
1660{
1661 dprintf(("USER32:OpenDesktopA (%s,%08xh,%08xh,%08x) not implemented.\n",
1662 lpszDesktopName,
1663 dwFlags,
1664 fInherit,
1665 dwDesiredAccess));
1666
1667 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
1668 return (NULL);
1669}
1670/*****************************************************************************
1671 * Name : HDESK WIN32API OpenDesktopW
1672 * Purpose : The OpenDesktop function returns a handle to an existing desktop.
1673 * A desktop is a secure object contained within a window station
1674 * object. A desktop has a logical display surface and contains
1675 * windows, menus and hooks.
1676 * Parameters: LPCTSTR lpszDesktopName name of the desktop to open
1677 * DWORD dwFlags flags to control interaction with other applications
1678 * BOOL fInherit specifies whether returned handle is inheritable
1679 * DWORD dwDesiredAccess specifies access of returned handle
1680 * Variables :
1681 * Result : If the function succeeds, the return value is the handle to the
1682 * opened desktop.
1683 * If the function fails, the return value is NULL. To get extended
1684 * error information, call GetLastError.
1685 * Remark :
1686 * Status : UNTESTED STUB
1687 *
1688 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
1689 *****************************************************************************/
1690HDESK WIN32API OpenDesktopW(LPCTSTR lpszDesktopName,
1691 DWORD dwFlags,
1692 BOOL fInherit,
1693 DWORD dwDesiredAccess)
1694{
1695 dprintf(("USER32:OpenDesktopW (%s,%08xh,%08xh,%08x) not implemented.\n",
1696 lpszDesktopName,
1697 dwFlags,
1698 fInherit,
1699 dwDesiredAccess));
1700
1701 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
1702 return (NULL);
1703}
1704/*****************************************************************************
1705 * Name : HDESK WIN32API OpenInputDesktop
1706 * Purpose : The OpenInputDesktop function returns a handle to the desktop
1707 * that receives user input. The input desktop is a desktop on the
1708 * window station associated with the logged-on user.
1709 * Parameters: DWORD dwFlags flags to control interaction with other applications
1710 * BOOL fInherit specifies whether returned handle is inheritable
1711 * DWORD dwDesiredAccess specifies access of returned handle
1712 * Variables :
1713 * Result : If the function succeeds, the return value is a handle of the
1714 * desktop that receives user input.
1715 * If the function fails, the return value is NULL. To get extended
1716 * error information, call GetLastError.
1717 * Remark :
1718 * Status : UNTESTED STUB
1719 *
1720 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
1721 *****************************************************************************/
1722HDESK WIN32API OpenInputDesktop(DWORD dwFlags,
1723 BOOL fInherit,
1724 DWORD dwDesiredAccess)
1725{
1726 dprintf(("USER32:OpenInputDesktop (%08xh,%08xh,%08x) not implemented.\n",
1727 dwFlags,
1728 fInherit,
1729 dwDesiredAccess));
1730
1731 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
1732 return (NULL);
1733}
1734/*****************************************************************************
1735 * Name : HWINSTA WIN32API OpenWindowStationA
1736 * Purpose : The OpenWindowStation function returns a handle to an existing
1737 * window station.
1738 * Parameters: LPCTSTR lpszWinStaName name of the window station to open
1739 * BOOL fInherit specifies whether returned handle is inheritable
1740 * DWORD dwDesiredAccess specifies access of returned handle
1741 * Variables :
1742 * Result : If the function succeeds, the return value is the handle to the
1743 * specified window station.
1744 * If the function fails, the return value is NULL. To get extended
1745 * error information, call GetLastError.
1746 * Remark :
1747 * Status : UNTESTED STUB
1748 *
1749 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
1750 *****************************************************************************/
1751HWINSTA WIN32API OpenWindowStationA(LPCTSTR lpszWinStaName,
1752 BOOL fInherit,
1753 DWORD dwDesiredAccess)
1754{
1755 dprintf(("USER32:OpenWindowStatieonA (%s,%08xh,%08x) not implemented.\n",
1756 lpszWinStaName,
1757 fInherit,
1758 dwDesiredAccess));
1759
1760 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
1761 return (NULL);
1762}
1763/*****************************************************************************
1764 * Name : HWINSTA WIN32API OpenWindowStationW
1765 * Purpose : The OpenWindowStation function returns a handle to an existing
1766 * window station.
1767 * Parameters: LPCTSTR lpszWinStaName name of the window station to open
1768 * BOOL fInherit specifies whether returned handle is inheritable
1769 * DWORD dwDesiredAccess specifies access of returned handle
1770 * Variables :
1771 * Result : If the function succeeds, the return value is the handle to the
1772 * specified window station.
1773 * If the function fails, the return value is NULL. To get extended
1774 * error information, call GetLastError.
1775
1776
1777 * Remark :
1778 * Status : UNTESTED STUB
1779 *
1780 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
1781 *****************************************************************************/
1782HWINSTA WIN32API OpenWindowStationW(LPCTSTR lpszWinStaName,
1783 BOOL fInherit,
1784 DWORD dwDesiredAccess)
1785{
1786 dprintf(("USER32:OpenWindowStatieonW (%s,%08xh,%08x) not implemented.\n",
1787 lpszWinStaName,
1788 fInherit,
1789 dwDesiredAccess));
1790
1791 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
1792 return (NULL);
1793}
1794/*****************************************************************************
1795 * Name : BOOL WIN32API SetProcessWindowStation
1796 * Purpose : The SetProcessWindowStation function assigns a window station
1797 * to the calling process. This enables the process to access
1798 * objects in the window station such as desktops, the clipboard,
1799 * and global atoms. All subsequent operations on the window station
1800 * use the access rights granted to hWinSta.
1801 * Parameters:
1802 * Variables :
1803 * Result : If the function succeeds, the return value is TRUE.
1804 * If the function fails, the return value is FALSE. To get extended
1805 * error information, call GetLastError.
1806 * Remark :
1807 * Status : UNTESTED STUB
1808 *
1809 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
1810 *****************************************************************************/
1811BOOL WIN32API SetProcessWindowStation(HWINSTA hWinSta)
1812{
1813 dprintf(("USER32:SetProcessWindowStation (%08x) not implemented.\n",
1814 hWinSta));
1815
1816 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
1817 return (FALSE);
1818}
1819/*****************************************************************************
1820 * Name : BOOL WIN32API SetThreadDesktop
1821 * Purpose : The SetThreadDesktop function assigns a desktop to the calling
1822 * thread. All subsequent operations on the desktop use the access
1823 * rights granted to hDesk.
1824 * Parameters: HDESK hDesk handle of the desktop to assign to this thread
1825 * Variables :
1826 * Result : If the function succeeds, the return value is TRUE.
1827 * If the function fails, the return value is FALSE. To get extended
1828 * error information, call GetLastError.
1829 * Remark :
1830 * Status : UNTESTED STUB
1831 *
1832 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
1833 *****************************************************************************/
1834BOOL WIN32API SetThreadDesktop(HDESK hDesktop)
1835{
1836 dprintf(("USER32:SetThreadDesktop (%08x) not implemented.\n",
1837 hDesktop));
1838
1839 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
1840 return (FALSE);
1841}
1842/*****************************************************************************
1843 * Name : BOOL WIN32API SetUserObjectInformationA
1844 * Purpose : The SetUserObjectInformation function sets information about a
1845 * window station or desktop object.
1846 * Parameters: HANDLE hObject handle of the object for which to set information
1847 * int nIndex type of information to set
1848 * PVOID lpvInfo points to a buffer that contains the information
1849 * DWORD cbInfo size, in bytes, of lpvInfo buffer
1850 * Variables :
1851 * Result : If the function succeeds, the return value is TRUE.
1852 * If the function fails the return value is FALSE. To get extended
1853 * error information, call GetLastError.
1854 * Remark :
1855 * Status : UNTESTED STUB
1856 *
1857 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
1858 *****************************************************************************/
1859BOOL WIN32API SetUserObjectInformationA(HANDLE hObject,
1860 int nIndex,
1861 PVOID lpvInfo,
1862 DWORD cbInfo)
1863{
1864 dprintf(("USER32:SetUserObjectInformationA (%08xh,%u,%08xh,%08x) not implemented.\n",
1865 hObject,
1866 nIndex,
1867 lpvInfo,
1868 cbInfo));
1869
1870 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
1871 return (FALSE);
1872}
1873/*****************************************************************************
1874 * Name : BOOL WIN32API SetUserObjectInformationW
1875 * Purpose : The SetUserObjectInformation function sets information about a
1876 * window station or desktop object.
1877 * Parameters: HANDLE hObject handle of the object for which to set information
1878 * int nIndex type of information to set
1879 * PVOID lpvInfo points to a buffer that contains the information
1880 * DWORD cbInfo size, in bytes, of lpvInfo buffer
1881 * Variables :
1882 * Result : If the function succeeds, the return value is TRUE.
1883 * If the function fails the return value is FALSE. To get extended
1884 * error information, call GetLastError.
1885 * Remark :
1886 * Status : UNTESTED STUB
1887 *
1888 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
1889 *****************************************************************************/
1890BOOL WIN32API SetUserObjectInformationW(HANDLE hObject,
1891 int nIndex,
1892 PVOID lpvInfo,
1893 DWORD cbInfo)
1894{
1895 dprintf(("USER32:SetUserObjectInformationW (%08xh,%u,%08xh,%08x) not implemented.\n",
1896 hObject,
1897 nIndex,
1898 lpvInfo,
1899 cbInfo));
1900
1901 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
1902 return (FALSE);
1903}
1904/*****************************************************************************
1905 * Name : BOOL WIN32API SetUserObjectSecurity
1906 * Purpose : The SetUserObjectSecurity function sets the security of a user
1907 * object. This can be, for example, a window or a DDE conversation
1908 * Parameters: HANDLE hObject handle of user object
1909 * SECURITY_INFORMATION * psi address of security information
1910 * LPSECURITY_DESCRIPTOR psd address of security descriptor
1911 * Variables :
1912 * Result : If the function succeeds, the return value is TRUE.
1913 * If the function fails, the return value is FALSE. To get extended
1914 * error information, call GetLastError.
1915 * Remark :
1916 * Status : UNTESTED STUB
1917 *
1918 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
1919 *****************************************************************************/
1920BOOL WIN32API SetUserObjectSecurity(HANDLE hObject,
1921 PSECURITY_INFORMATION psi,
1922 PSECURITY_DESCRIPTOR psd)
1923{
1924 dprintf(("USER32:SetUserObjectSecuroty (%08xh,%08xh,%08x) not implemented.\n",
1925 hObject,
1926 psi,
1927 psd));
1928
1929 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
1930 return (FALSE);
1931}
1932/*****************************************************************************
1933 * Name : BOOL WIN32API SwitchDesktop
1934 * Purpose : The SwitchDesktop function makes a desktop visible and activates
1935 * it. This enables the desktop to receive input from the user. The
1936 * calling process must have DESKTOP_SWITCHDESKTOP access to the
1937 * desktop for the SwitchDesktop function to succeed.
1938 * Parameters:
1939 * Variables :
1940 * Result : If the function succeeds, the return value is TRUE.
1941 * If the function fails, the return value is FALSE. To get extended
1942 * error information, call GetLastError.
1943 * Remark :
1944 * Status : UNTESTED STUB
1945 *
1946 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
1947 *****************************************************************************/
1948BOOL WIN32API SwitchDesktop(HDESK hDesktop)
1949{
1950 dprintf(("USER32:SwitchDesktop (%08x) not implemented.\n",
1951 hDesktop));
1952
1953 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
1954 return (FALSE);
1955}
1956
1957/* Debugging Functions */
1958
1959/*****************************************************************************
1960 * Name : VOID WIN32API SetDebugErrorLevel
1961 * Purpose : The SetDebugErrorLevel function sets the minimum error level at
1962 * which Windows will generate debugging events and pass them to a debugger.
1963 * Parameters: DWORD dwLevel debugging error level
1964 * Variables :
1965 * Result :
1966 * Remark :
1967 * Status : UNTESTED STUB
1968 *
1969 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
1970 *****************************************************************************/
1971VOID WIN32API SetDebugErrorLevel(DWORD dwLevel)
1972{
1973 dprintf(("USER32:SetDebugErrorLevel (%08x) not implemented.\n",
1974 dwLevel));
1975}
1976
1977/* Drag'n'drop */
1978
1979/*****************************************************************************
1980 * Name : BOOL WIN32API DragObject
1981 * Purpose : Unknown
1982 * Parameters: Unknown
1983 * Variables :
1984 * Result :
1985 * Remark :
1986 * Status : UNTESTED UNKNOWN STUB
1987 *
1988 * Author : Patrick Haller [Wed, 1998/06/16 11:55]
1989 *****************************************************************************/
1990DWORD WIN32API DragObject(HWND x1,HWND x2,UINT x3,DWORD x4,HCURSOR x5)
1991{
1992 dprintf(("USER32: DragObject(%08x,%08xh,%08xh,%08xh,%08xh) not implemented.\n",
1993 x1,
1994 x2,
1995 x3,
1996 x4,
1997 x5));
1998
1999 return (FALSE); /* default */
2000}
2001
2002/* Unknown */
2003
2004/*****************************************************************************
2005 * Name : BOOL WIN32API SetShellWindow
2006 * Purpose : Unknown
2007 * Parameters: Unknown
2008 * Variables :
2009 * Result :
2010 * Remark :
2011 * Status : UNTESTED UNKNOWN STUB
2012 *
2013 * Author : Patrick Haller [Wed, 1998/06/16 11:55]
2014 *****************************************************************************/
2015BOOL WIN32API SetShellWindow(DWORD x1)
2016{
2017 dprintf(("USER32: SetShellWindow(%08x) not implemented.\n",
2018 x1));
2019
2020 return (FALSE); /* default */
2021}
2022/*****************************************************************************
2023 * Name : BOOL WIN32API PlaySoundEvent
2024 * Purpose : Unknown
2025 * Parameters: Unknown
2026 * Variables :
2027 * Result :
2028 * Remark :
2029 * Status : UNTESTED UNKNOWN STUB
2030 *
2031 * Author : Patrick Haller [Wed, 1998/06/16 11:55]
2032 *****************************************************************************/
2033BOOL WIN32API PlaySoundEvent(DWORD x1)
2034{
2035 dprintf(("USER32: PlaySoundEvent(%08x) not implemented.\n",
2036 x1));
2037
2038 return (FALSE); /* default */
2039}
2040/*****************************************************************************
2041 * Name : BOOL WIN32API SetSysColorsTemp
2042 * Purpose : Unknown
2043 * Parameters: Unknown
2044 * Variables :
2045 * Result :
2046 * Remark :
2047 * Status : UNTESTED UNKNOWN STUB
2048 *
2049 * Author : Patrick Haller [Wed, 1998/06/16 11:55]
2050 *****************************************************************************/
2051BOOL WIN32API SetSysColorsTemp(void)
2052{
2053 dprintf(("USER32: SetSysColorsTemp() not implemented.\n"));
2054
2055 return (FALSE); /* default */
2056}
2057/*****************************************************************************
2058 * Name : BOOL WIN32API RegisterNetworkCapabilities
2059 * Purpose : Unknown
2060 * Parameters: Unknown
2061 * Variables :
2062 * Result :
2063 * Remark :
2064 * Status : UNTESTED UNKNOWN STUB
2065 *
2066 * Author : Patrick Haller [Wed, 1998/06/16 11:55]
2067 *****************************************************************************/
2068BOOL WIN32API RegisterNetworkCapabilities(DWORD x1,
2069 DWORD x2)
2070{
2071 dprintf(("USER32: RegisterNetworkCapabilities(%08xh,%08xh) not implemented.\n",
2072 x1,
2073 x2));
2074
2075 return (FALSE); /* default */
2076}
2077/*****************************************************************************
2078 * Name : BOOL WIN32API EndTask
2079 * Purpose : Unknown
2080 * Parameters: Unknown
2081 * Variables :
2082 * Result :
2083 * Remark :
2084 * Status : UNTESTED UNKNOWN STUB
2085 *
2086 * Author : Patrick Haller [Wed, 1998/06/16 11:55]
2087 *****************************************************************************/
2088BOOL WIN32API EndTask(DWORD x1, DWORD x2, DWORD x3)
2089{
2090 dprintf(("USER32: EndTask(%08xh,%08xh,%08xh) not implemented.\n",
2091 x1,
2092 x2,
2093 x3));
2094
2095 return (FALSE); /* default */
2096}
2097/*****************************************************************************
2098 * Name : BOOL WIN32API GetNextQueueWindow
2099 * Purpose : Unknown
2100 * Parameters: Unknown
2101 * Variables :
2102 * Result :
2103 * Remark :
2104 * Status : UNTESTED UNKNOWN STUB
2105 *
2106 * Author : Patrick Haller [Wed, 1998/06/16 11:55]
2107 *****************************************************************************/
2108BOOL WIN32API GetNextQueueWindow(DWORD x1, DWORD x2)
2109{
2110 dprintf(("USER32: GetNextQueueWindow(%08xh,%08xh) not implemented.\n",
2111 x1,
2112 x2));
2113
2114 return (FALSE); /* default */
2115}
2116/*****************************************************************************
2117 * Name : BOOL WIN32API YieldTask
2118 * Purpose : Unknown
2119 * Parameters: Unknown
2120 * Variables :
2121 * Result :
2122 * Remark :
2123 * Status : UNTESTED UNKNOWN STUB
2124 *
2125 * Author : Patrick Haller [Wed, 1998/06/16 11:55]
2126 *****************************************************************************/
2127BOOL WIN32API YieldTask(void)
2128{
2129 dprintf(("USER32: YieldTask() not implemented.\n"));
2130
2131 return (FALSE); /* default */
2132}
2133/*****************************************************************************
2134 * Name : BOOL WIN32API WinOldAppHackoMatic
2135 * Purpose : Unknown
2136 * Parameters: Unknown
2137 * Variables :
2138 * Result :
2139 * Remark :
2140 * Status : UNTESTED UNKNOWN STUB
2141 *
2142 * Author : Patrick Haller [Wed, 1998/06/16 11:55]
2143 *****************************************************************************/
2144BOOL WIN32API WinOldAppHackoMatic(DWORD x1)
2145{
2146 dprintf(("USER32: WinOldAppHackoMatic(%08x) not implemented.\n",
2147 x1));
2148
2149 return (FALSE); /* default */
2150}
2151/*****************************************************************************
2152 * Name : BOOL WIN32API RegisterSystemThread
2153 * Purpose : Unknown
2154 * Parameters: Unknown
2155 * Variables :
2156 * Result :
2157 * Remark :
2158 * Status : UNTESTED UNKNOWN STUB
2159 *
2160 * Author : Patrick Haller [Wed, 1998/06/16 11:55]
2161 *****************************************************************************/
2162BOOL WIN32API RegisterSystemThread(DWORD x1,
2163 DWORD x2)
2164{
2165 dprintf(("USER32: RegisterSystemThread(%08xh,%08xh) not implemented.\n",
2166 x1,
2167 x2));
2168
2169 return (FALSE); /* default */
2170}
2171/*****************************************************************************
2172 * Name : BOOL WIN32API IsHungThread
2173 * Purpose : Unknown
2174 * Parameters: Unknown
2175 * Variables :
2176 * Result :
2177 * Remark :
2178 * Status : UNTESTED UNKNOWN STUB
2179 *
2180 * Author : Patrick Haller [Wed, 1998/06/16 11:55]
2181 *****************************************************************************/
2182BOOL WIN32API IsHungThread(DWORD x1)
2183{
2184 dprintf(("USER32: IsHungThread(%08xh) not implemented.\n",
2185 x1));
2186
2187 return (FALSE); /* default */
2188}
2189/*****************************************************************************
2190 * Name : BOOL WIN32API UserSignalProc
2191 * Purpose : Unknown
2192 * Parameters: Unknown
2193 * Variables :
2194 * Result :
2195 * Remark :
2196 * Status : UNTESTED UNKNOWN STUB
2197 *
2198 * Author : Patrick Haller [Wed, 1998/06/16 11:55]
2199 *****************************************************************************/
2200BOOL WIN32API UserSignalProc(DWORD x1,
2201 DWORD x2,
2202 DWORD x3,
2203 DWORD x4)
2204{
2205 dprintf(("USER32: UserSignalProc(%08xh,%08xh,%08xh,%08xh) not implemented.\n",
2206 x1,
2207 x2,
2208 x3,
2209 x4));
2210
2211 return (FALSE); /* default */
2212}
2213/*****************************************************************************
2214 * Name : BOOL WIN32API GetShellWindow
2215 * Purpose : Unknown
2216 * Parameters: Unknown
2217 * Variables :
2218 * Result :
2219 * Remark :
2220 * Status : UNTESTED UNKNOWN STUB
2221 *
2222 * Author : Patrick Haller [Wed, 1998/06/16 11:55]
2223 *****************************************************************************/
2224HWND WIN32API GetShellWindow(void)
2225{
2226 dprintf(("USER32: GetShellWindow() not implemented.\n"));
2227
2228 return (0); /* default */
2229}
2230/***********************************************************************
2231 * RegisterTasklist32 [USER32.436]
2232 */
2233DWORD WIN32API RegisterTasklist (DWORD x)
2234{
2235 dprintf(("USER32: RegisterTasklist(%08xh) not implemented.\n",
2236 x));
2237
2238 return TRUE;
2239}
2240/***********************************************************************
2241 * SetLogonNotifyWindow (USER32.486)
2242 */
2243DWORD WIN32API SetLogonNotifyWindow(HWINSTA hwinsta,HWND hwnd)
2244{
2245 dprintf(("USER32: SetLogonNotifyWindow - empty stub!"));
2246
2247 return 1;
2248}
2249
2250
Note: See TracBrowser for help on using the repository browser.