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

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

SPI_GETNONCLIENTMETRICS size check extended & Fixed RMB on icon of minimized mdi window

File size: 79.9 KB
Line 
1/* $Id: user32.cpp,v 1.124 2002-08-15 15:45:46 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 lpLogFont->lfHeight = CapsCharHeight;
778 }
779 else fFound = FALSE;
780 }
781 if(!fFound) {
782 GetProfileStringA("Desktop", "MenuFont", "WarpSans",
783 lpLogFont->lfFaceName, LF_FACESIZE);
784 lpLogFont->lfWeight = FW_BOLD;
785 // AH 2001-12-26 take graphics driver font size setting
786 lpLogFont->lfHeight = -GetProfileIntA("Desktop","MenuFontSize", CapsCharHeight);
787 }
788 lpLogFont->lfWidth = 0;
789 lpLogFont->lfEscapement = lpLogFont->lfOrientation = 0;
790 }
791 else {
792 GetProfileStringA("Desktop", "MenuFont", "MS Sans Serif",
793 lpLogFont->lfFaceName, LF_FACESIZE);
794 lpLogFont->lfWeight = FW_NORMAL;
795 lpLogFont->lfHeight = -GetProfileIntA("Desktop","MenuFontSize", 13);
796 lpLogFont->lfWidth = 0;
797 lpLogFont->lfEscapement = lpLogFont->lfOrientation = 0;
798 }
799 lpLogFont->lfItalic = FALSE;
800 lpLogFont->lfStrikeOut = FALSE;
801 lpLogFont->lfUnderline = FALSE;
802 lpLogFont->lfCharSet = ANSI_CHARSET;
803 lpLogFont->lfOutPrecision = OUT_DEFAULT_PRECIS;
804 lpLogFont->lfClipPrecision = CLIP_DEFAULT_PRECIS;
805 lpLogFont->lfPitchAndFamily = DEFAULT_PITCH | FF_SWISS;
806
807 SystemParametersInfoA(SPI_GETICONTITLELOGFONT, 0,
808 (LPVOID)&(lpnm->lfStatusFont),0);
809 SystemParametersInfoA(SPI_GETICONTITLELOGFONT, 0,
810 (LPVOID)&(lpnm->lfMessageFont),0);
811
812 lpnm->iBorderWidth = GetSystemMetrics(SM_CXBORDER);
813 lpnm->iScrollWidth = GetSystemMetrics(SM_CXHSCROLL);
814 lpnm->iScrollHeight = GetSystemMetrics(SM_CYHSCROLL);
815 lpnm->iMenuHeight = GetSystemMetrics(SM_CYMENU);
816 lpnm->iMenuWidth = lpnm->iMenuHeight; //TODO
817 }
818 else
819 {
820 dprintf(("SPI_GETNONCLIENTMETRICS: size mismatch !! (is %d; should be %d)\n", lpnm->cbSize, sizeof(NONCLIENTMETRICSA)));
821 /* FIXME: SetLastError? */
822 rc = FALSE;
823 }
824 break;
825 }
826
827 case SPI_GETICONMETRICS: /* 45 WINVER >= 0x400 */
828 {
829 LPICONMETRICSA lpIcon = (LPICONMETRICSA)pvParam;
830 if(lpIcon && lpIcon->cbSize == sizeof(*lpIcon))
831 {
832 SystemParametersInfoA( SPI_ICONHORIZONTALSPACING, 0,
833 &lpIcon->iHorzSpacing, FALSE );
834 SystemParametersInfoA( SPI_ICONVERTICALSPACING, 0,
835 &lpIcon->iVertSpacing, FALSE );
836 SystemParametersInfoA( SPI_GETICONTITLEWRAP, 0,
837 &lpIcon->iTitleWrap, FALSE );
838 SystemParametersInfoA( SPI_GETICONTITLELOGFONT, 0,
839 &lpIcon->lfFont, FALSE );
840 }
841 else
842 {
843 dprintf(("SPI_GETICONMETRICS: size mismatch !! (is %d; should be %d)\n", lpIcon->cbSize, sizeof(ICONMETRICSA)));
844 /* FIXME: SetLastError? */
845 rc = FALSE;
846 }
847 break;
848 }
849
850 case SPI_GETICONTITLELOGFONT:
851 {
852 LPLOGFONTA lpLogFont = (LPLOGFONTA)pvParam;
853
854 /* from now on we always have an alias for MS Sans Serif */
855 strcpy(lpLogFont->lfFaceName, "MS Sans Serif");
856 lpLogFont->lfHeight = -GetProfileIntA("Desktop","IconTitleSize", /*8*/12); //CB: 8 is too small
857 lpLogFont->lfWidth = 0;
858 lpLogFont->lfEscapement = lpLogFont->lfOrientation = 0;
859 lpLogFont->lfWeight = FW_NORMAL;
860 lpLogFont->lfItalic = FALSE;
861 lpLogFont->lfStrikeOut = FALSE;
862 lpLogFont->lfUnderline = FALSE;
863 lpLogFont->lfCharSet = ANSI_CHARSET;
864 lpLogFont->lfOutPrecision = OUT_DEFAULT_PRECIS;
865 lpLogFont->lfClipPrecision = CLIP_DEFAULT_PRECIS;
866 lpLogFont->lfPitchAndFamily = DEFAULT_PITCH | FF_SWISS;
867 break;
868 }
869 case SPI_GETBORDER:
870 *(INT *)pvParam = GetSystemMetrics( SM_CXFRAME );
871 break;
872
873 case SPI_GETWORKAREA:
874 SetRect( (RECT *)pvParam, 0, 0,
875 GetSystemMetrics( SM_CXSCREEN ),
876 GetSystemMetrics( SM_CYSCREEN )
877 );
878 break;
879
880 case SPI_GETWHEELSCROLLLINES: //TODO: Undocumented
881 rc = 16;
882 break;
883
884 default:
885 dprintf(("System parameter value is not supported!\n"));
886 rc = FALSE;
887 // AH: no longer call Open32
888 //rc = O32_SystemParametersInfo(uiAction, uiParam, pvParam, fWinIni);
889 break;
890 }
891 dprintf(("USER32: SystemParametersInfoA %d, returned %d\n", uiAction, rc));
892 return(rc);
893}
894//******************************************************************************
895//TODO: Check for more options that have different structs for Unicode!!!!
896//******************************************************************************
897BOOL WIN32API SystemParametersInfoW(UINT uiAction, UINT uiParam, PVOID pvParam, UINT fWinIni)
898{
899 BOOL rc = TRUE;
900 NONCLIENTMETRICSW *clientMetricsW = (NONCLIENTMETRICSW *)pvParam;
901 NONCLIENTMETRICSA clientMetricsA = {0};
902 PVOID pvParamA;
903 UINT uiParamA;
904
905 switch(uiAction) {
906 case SPI_SETNONCLIENTMETRICS:
907 clientMetricsA.iBorderWidth = clientMetricsW->iBorderWidth;
908 clientMetricsA.iScrollWidth = clientMetricsW->iScrollWidth;
909 clientMetricsA.iScrollHeight = clientMetricsW->iScrollHeight;
910 clientMetricsA.iCaptionWidth = clientMetricsW->iCaptionWidth;
911 clientMetricsA.iCaptionHeight = clientMetricsW->iCaptionHeight;
912 ConvertFontWA(&clientMetricsW->lfCaptionFont, &clientMetricsA.lfCaptionFont);
913 clientMetricsA.iSmCaptionWidth = clientMetricsW->iSmCaptionWidth;
914 clientMetricsA.iSmCaptionHeight = clientMetricsW->iSmCaptionHeight;
915 ConvertFontWA(&clientMetricsW->lfSmCaptionFont, &clientMetricsA.lfSmCaptionFont);
916 clientMetricsA.iMenuWidth = clientMetricsW->iMenuWidth;
917 clientMetricsA.iMenuHeight = clientMetricsW->iMenuHeight;
918 ConvertFontWA(&clientMetricsW->lfMenuFont, &clientMetricsA.lfMenuFont);
919 ConvertFontWA(&clientMetricsW->lfStatusFont, &clientMetricsA.lfStatusFont);
920 ConvertFontWA(&clientMetricsW->lfMessageFont, &clientMetricsA.lfMessageFont);
921 //no break
922 case SPI_GETNONCLIENTMETRICS:
923 // Fix: set the structure size in any case (SET and GET!)
924 clientMetricsA.cbSize = sizeof(NONCLIENTMETRICSA);
925
926 uiParamA = sizeof(NONCLIENTMETRICSA);
927 pvParamA = &clientMetricsA;
928 break;
929
930 case SPI_GETICONMETRICS: /* 45 WINVER >= 0x400 */
931 {
932 LPICONMETRICSW lpIcon = (LPICONMETRICSW)pvParam;
933 if(lpIcon && lpIcon->cbSize == sizeof(*lpIcon))
934 {
935 SystemParametersInfoW( SPI_ICONHORIZONTALSPACING, 0,
936 &lpIcon->iHorzSpacing, FALSE );
937 SystemParametersInfoW( SPI_ICONVERTICALSPACING, 0,
938 &lpIcon->iVertSpacing, FALSE );
939 SystemParametersInfoW( SPI_GETICONTITLEWRAP, 0,
940 &lpIcon->iTitleWrap, FALSE );
941 SystemParametersInfoW( SPI_GETICONTITLELOGFONT, 0,
942 &lpIcon->lfFont, FALSE );
943 return TRUE;
944 }
945 else
946 {
947 dprintf(("SPI_GETICONMETRICS: size mismatch !! (is %d; should be %d)\n", lpIcon->cbSize, sizeof(ICONMETRICSA)));
948 /* FIXME: SetLastError? */
949 return FALSE;
950 }
951 }
952
953 case SPI_GETICONTITLELOGFONT:
954 {
955 LPLOGFONTW lpLogFont = (LPLOGFONTW)pvParam;
956
957 /* from now on we always have an alias for MS Sans Serif */
958 lstrcpyW(lpLogFont->lfFaceName, (LPCWSTR)L"MS Sans Serif");
959 lpLogFont->lfHeight = -GetProfileIntA("Desktop","IconTitleSize", /*8*/12); //CB: 8 is too small
960 lpLogFont->lfWidth = 0;
961 lpLogFont->lfEscapement = lpLogFont->lfOrientation = 0;
962 lpLogFont->lfWeight = FW_NORMAL;
963 lpLogFont->lfItalic = FALSE;
964 lpLogFont->lfStrikeOut = FALSE;
965 lpLogFont->lfUnderline = FALSE;
966 lpLogFont->lfCharSet = ANSI_CHARSET;
967 lpLogFont->lfOutPrecision = OUT_DEFAULT_PRECIS;
968 lpLogFont->lfClipPrecision = CLIP_DEFAULT_PRECIS;
969 lpLogFont->lfPitchAndFamily = DEFAULT_PITCH | FF_SWISS;
970 return TRUE;
971 }
972 default:
973 pvParamA = pvParam;
974 uiParamA = uiParam;
975 break;
976 }
977 rc = SystemParametersInfoA(uiAction, uiParamA, pvParamA, fWinIni);
978
979 switch(uiAction) {
980 case SPI_GETNONCLIENTMETRICS:
981 clientMetricsW->cbSize = sizeof(*clientMetricsW);
982 clientMetricsW->iBorderWidth = clientMetricsA.iBorderWidth;
983 clientMetricsW->iScrollWidth = clientMetricsA.iScrollWidth;
984 clientMetricsW->iScrollHeight = clientMetricsA.iScrollHeight;
985 clientMetricsW->iCaptionWidth = clientMetricsA.iCaptionWidth;
986 clientMetricsW->iCaptionHeight = clientMetricsA.iCaptionHeight;
987 ConvertFontAW(&clientMetricsA.lfCaptionFont, &clientMetricsW->lfCaptionFont);
988
989 clientMetricsW->iSmCaptionWidth = clientMetricsA.iSmCaptionWidth;
990 clientMetricsW->iSmCaptionHeight = clientMetricsA.iSmCaptionHeight;
991 ConvertFontAW(&clientMetricsA.lfSmCaptionFont, &clientMetricsW->lfSmCaptionFont);
992
993 clientMetricsW->iMenuWidth = clientMetricsA.iMenuWidth;
994 clientMetricsW->iMenuHeight = clientMetricsA.iMenuHeight;
995 ConvertFontAW(&clientMetricsA.lfMenuFont, &clientMetricsW->lfMenuFont);
996 ConvertFontAW(&clientMetricsA.lfStatusFont, &clientMetricsW->lfStatusFont);
997 ConvertFontAW(&clientMetricsA.lfMessageFont, &clientMetricsW->lfMessageFont);
998 break;
999 }
1000 dprintf(("USER32: SystemParametersInfoW %d, returned %d\n", uiAction, rc));
1001 return(rc);
1002}
1003
1004/* Help Functions */
1005
1006BOOL WIN32API WinHelpA( HWND hwnd, LPCSTR lpszHelp, UINT uCommand, DWORD dwData)
1007{
1008 static WORD WM_WINHELP = 0;
1009 HWND hDest;
1010 LPWINHELP lpwh;
1011 HINSTANCE winhelp;
1012 int size,dsize,nlen;
1013 BOOL ret;
1014
1015 dprintf(("USER32: WinHelpA %x %s %d %x", hwnd, lpszHelp, uCommand, dwData));
1016
1017 if(!WM_WINHELP)
1018 {
1019 WM_WINHELP=RegisterWindowMessageA("WM_WINHELP");
1020 if(!WM_WINHELP)
1021 return FALSE;
1022 }
1023
1024 hDest = FindWindowA( "MS_WINHELP", NULL );
1025 if(!hDest)
1026 {
1027 if(uCommand == HELP_QUIT)
1028 return TRUE;
1029 else
1030 winhelp = WinExec ( "winhlp32.exe -x", SW_SHOWNORMAL );
1031 if ( winhelp <= 32 ) return FALSE;
1032 if ( ! ( hDest = FindWindowA ( "MS_WINHELP", NULL ) )) return FALSE;
1033 }
1034
1035 switch(uCommand)
1036 {
1037 case HELP_CONTEXT:
1038 case HELP_SETCONTENTS:
1039 case HELP_CONTENTS:
1040 case HELP_CONTEXTPOPUP:
1041 case HELP_FORCEFILE:
1042 case HELP_HELPONHELP:
1043 case HELP_FINDER:
1044 case HELP_QUIT:
1045 dsize=0;
1046 break;
1047
1048 case HELP_KEY:
1049 case HELP_PARTIALKEY:
1050 case HELP_COMMAND:
1051 dsize = strlen( (LPSTR)dwData )+1;
1052 break;
1053
1054 case HELP_MULTIKEY:
1055 dsize = ((LPMULTIKEYHELP)dwData)->mkSize;
1056 break;
1057
1058 case HELP_SETWINPOS:
1059 dsize = ((LPHELPWININFO)dwData)->wStructSize;
1060 break;
1061
1062 default:
1063 //WARN("Unknown help command %d\n",wCommand);
1064 return FALSE;
1065 }
1066 if(lpszHelp)
1067 nlen = strlen(lpszHelp)+1;
1068 else
1069 nlen = 0;
1070 size = sizeof(WINHELP) + nlen + dsize;
1071
1072 //allocate shared memory
1073 lpwh = (WINHELP*)_smalloc(size);
1074 lpwh->size = size;
1075 lpwh->command = uCommand;
1076 lpwh->data = dwData;
1077 if(nlen)
1078 {
1079 strcpy(((char*)lpwh) + sizeof(WINHELP),lpszHelp);
1080 lpwh->ofsFilename = sizeof(WINHELP);
1081 } else
1082 lpwh->ofsFilename = 0;
1083 if(dsize)
1084 {
1085 memcpy(((char*)lpwh)+sizeof(WINHELP)+nlen,(LPSTR)dwData,dsize);
1086 lpwh->ofsData = sizeof(WINHELP)+nlen;
1087 } else
1088 lpwh->ofsData = 0;
1089
1090 ret = SendMessageA(hDest,WM_WINHELP,hwnd,(LPARAM)lpwh);
1091 free(lpwh);
1092 return ret;
1093}
1094//******************************************************************************
1095//******************************************************************************
1096BOOL WIN32API WinHelpW( HWND hwnd, LPCWSTR lpszHelp, UINT uCommand, DWORD dwData)
1097{
1098 char *astring = UnicodeToAsciiString((LPWSTR)lpszHelp);
1099 BOOL rc;
1100
1101 dprintf(("USER32: WinHelpW\n"));
1102
1103 rc = WinHelpA(hwnd,astring,uCommand,dwData);
1104 FreeAsciiString(astring);
1105
1106 return rc;
1107}
1108
1109
1110/* Window Functions */
1111
1112/*****************************************************************************
1113 * Name : BOOL WIN32API PaintDesktop
1114 * Purpose : The PaintDesktop function fills the clipping region in the
1115 * specified device context with the desktop pattern or wallpaper.
1116 * The function is provided primarily for shell desktops.
1117 * Parameters:
1118 * Variables :
1119 * Result : If the function succeeds, the return value is TRUE.
1120 * If the function fails, the return value is FALSE.
1121 * Remark :
1122 * Status : UNTESTED STUB
1123 *
1124 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
1125 *****************************************************************************/
1126BOOL WIN32API PaintDesktop(HDC hdc)
1127{
1128 dprintf(("USER32:PaintDesktop (%08x) not implemented.\n",
1129 hdc));
1130
1131 return (FALSE);
1132}
1133
1134/* Filled Shape Functions */
1135
1136 /* Last COLOR id */
1137#define COLOR_MAX COLOR_GRADIENTINACTIVECAPTION
1138
1139int WIN32API FillRect(HDC hDC, const RECT * lprc, HBRUSH hbr)
1140{
1141 //SvL: brush 0 means current selected brush (verified in NT4)
1142 if(hbr == 0) {
1143 hbr = GetCurrentObject(hDC, OBJ_BRUSH);
1144 }
1145 else
1146 if (hbr <= (HBRUSH) (COLOR_MAX + 1)) {
1147 hbr = GetSysColorBrush( (INT) hbr - 1 );
1148 }
1149 dprintf(("USER32: FillRect %x (%d,%d)(%d,%d) brush %X", hDC, lprc->left, lprc->top, lprc->right, lprc->bottom, hbr));
1150 return O32_FillRect(hDC,lprc,hbr);
1151}
1152//******************************************************************************
1153//******************************************************************************
1154int WIN32API FrameRect( HDC hDC, const RECT * lprc, HBRUSH hbr)
1155{
1156 dprintf(("USER32: FrameRect %x (%d,%d)(%d,%d) brush %x", hDC, lprc->top, lprc->left, lprc->bottom, lprc->right, hbr));
1157 return O32_FrameRect(hDC,lprc,hbr);
1158}
1159//******************************************************************************
1160//******************************************************************************
1161BOOL WIN32API InvertRect( HDC hDC, const RECT * lprc)
1162{
1163 if(lprc) {
1164 dprintf(("USER32: InvertRect %x (%d,%d)(%d,%d)", hDC, lprc->left, lprc->top, lprc->right, lprc->bottom));
1165 }
1166 else dprintf(("USER32: InvertRect %x NULL", hDC));
1167 return O32_InvertRect(hDC,lprc);
1168}
1169
1170/* System Information Functions */
1171
1172/* Window Station and Desktop Functions */
1173
1174/*****************************************************************************
1175 * Name : HDESK WIN32API GetThreadDesktop
1176 * Purpose : The GetThreadDesktop function returns a handle to the desktop
1177 * associated with a specified thread.
1178 * Parameters: DWORD dwThreadId thread identifier
1179 * Variables :
1180 * Result : If the function succeeds, the return value is the handle of the
1181 * desktop associated with the specified thread.
1182 * Remark :
1183 * Status : UNTESTED STUB
1184 *
1185 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
1186 *****************************************************************************/
1187HDESK WIN32API GetThreadDesktop(DWORD dwThreadId)
1188{
1189 dprintf(("USER32:GetThreadDesktop (%u) not implemented.\n",
1190 dwThreadId));
1191
1192 return (NULL);
1193}
1194
1195/*****************************************************************************
1196 * Name : BOOL WIN32API CloseDesktop
1197 * Purpose : The CloseDesktop function closes an open handle of a desktop
1198 * object. A desktop is a secure object contained within a window
1199 * station object. A desktop has a logical display surface and
1200 * contains windows, menus and hooks.
1201 * Parameters: HDESK hDesktop
1202 * Variables :
1203 * Result : If the function succeeds, the return value is TRUE.
1204 * If the functions fails, the return value is FALSE. To get
1205 * extended error information, call GetLastError.
1206 * Remark :
1207 * Status : UNTESTED STUB
1208 *
1209 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
1210 *****************************************************************************/
1211BOOL WIN32API CloseDesktop(HDESK hDesktop)
1212{
1213 dprintf(("USER32:CloseDesktop(%08x) not implemented.\n",
1214 hDesktop));
1215
1216 return (FALSE);
1217}
1218/*****************************************************************************
1219 * Name : BOOL WIN32API CloseWindowStation
1220 * Purpose : The CloseWindowStation function closes an open window station handle.
1221 * Parameters: HWINSTA hWinSta
1222 * Variables :
1223 * Result :
1224 * Remark : If the function succeeds, the return value is TRUE.
1225 * If the functions fails, the return value is FALSE. To get
1226 * extended error information, call GetLastError.
1227 * Status : UNTESTED STUB
1228 *
1229 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
1230 *****************************************************************************/
1231BOOL WIN32API CloseWindowStation(HWINSTA hWinSta)
1232{
1233 dprintf(("USER32:CloseWindowStation(%08x) not implemented.\n",
1234 hWinSta));
1235
1236 return (FALSE);
1237}
1238/*****************************************************************************
1239 * Name : HDESK WIN32API CreateDesktopA
1240 * Purpose : The CreateDesktop function creates a new desktop on the window
1241 * station associated with the calling process.
1242 * Parameters: LPCTSTR lpszDesktop name of the new desktop
1243 * LPCTSTR lpszDevice name of display device to assign to the desktop
1244 * LPDEVMODE pDevMode reserved; must be NULL
1245 * DWORD dwFlags flags to control interaction with other applications
1246 * DWORD dwDesiredAccess specifies access of returned handle
1247 * LPSECURITY_ATTRIBUTES lpsa specifies security attributes of the desktop
1248 * Variables :
1249 * Result : If the function succeeds, the return value is a handle of the
1250 * newly created desktop.
1251 * If the function fails, the return value is NULL. To get extended
1252 * error information, call GetLastError.
1253 * Remark :
1254 * Status : UNTESTED STUB
1255 *
1256 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
1257 *****************************************************************************/
1258HDESK WIN32API CreateDesktopA(LPCTSTR lpszDesktop,
1259 LPCTSTR lpszDevice,
1260 LPDEVMODEA pDevMode,
1261 DWORD dwFlags,
1262 DWORD dwDesiredAccess,
1263 LPSECURITY_ATTRIBUTES lpsa)
1264{
1265 dprintf(("USER32:CreateDesktopA(%s,%s,%08xh,%08xh,%08xh,%08x) not implemented.\n",
1266 lpszDesktop,
1267 lpszDevice,
1268 pDevMode,
1269 dwFlags,
1270 dwDesiredAccess,
1271 lpsa));
1272
1273 return (NULL);
1274}
1275/*****************************************************************************
1276 * Name : HDESK WIN32API CreateDesktopW
1277 * Purpose : The CreateDesktop function creates a new desktop on the window
1278 * station associated with the calling process.
1279 * Parameters: LPCTSTR lpszDesktop name of the new desktop
1280 * LPCTSTR lpszDevice name of display device to assign to the desktop
1281 * LPDEVMODE pDevMode reserved; must be NULL
1282 * DWORD dwFlags flags to control interaction with other applications
1283 * DWORD dwDesiredAccess specifies access of returned handle
1284 * LPSECURITY_ATTRIBUTES lpsa specifies security attributes of the desktop
1285 * Variables :
1286 * Result : If the function succeeds, the return value is a handle of the
1287 * newly created desktop.
1288 * If the function fails, the return value is NULL. To get extended
1289 * error information, call GetLastError.
1290 * Remark :
1291 * Status : UNTESTED STUB
1292 *
1293 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
1294 *****************************************************************************/
1295HDESK WIN32API CreateDesktopW(LPCTSTR lpszDesktop,
1296 LPCTSTR lpszDevice,
1297 LPDEVMODEW pDevMode,
1298 DWORD dwFlags,
1299 DWORD dwDesiredAccess,
1300 LPSECURITY_ATTRIBUTES lpsa)
1301{
1302 dprintf(("USER32:CreateDesktopW(%s,%s,%08xh,%08xh,%08xh,%08x) not implemented.\n",
1303 lpszDesktop,
1304 lpszDevice,
1305 pDevMode,
1306 dwFlags,
1307 dwDesiredAccess,
1308 lpsa));
1309
1310 return (NULL);
1311}
1312/*****************************************************************************
1313 * Name : HWINSTA WIN32API CreateWindowStationA
1314 * Purpose : The CreateWindowStation function creates a window station object.
1315 * It returns a handle that can be used to access the window station.
1316 * A window station is a secure object that contains a set of global
1317 * atoms, a clipboard, and a set of desktop objects.
1318 * Parameters: LPTSTR lpwinsta name of the new window station
1319 * DWORD dwReserved reserved; must be NULL
1320 * DWORD dwDesiredAccess specifies access of returned handle
1321 * LPSECURITY_ATTRIBUTES lpsa specifies security attributes of the window station
1322 * Variables :
1323 * Result : If the function succeeds, the return value is the handle to the
1324 * newly created window station.
1325 * If the function fails, the return value is NULL. To get extended
1326 * error information, call GetLastError.
1327 * Remark :
1328 * Status : UNTESTED STUB
1329 *
1330 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
1331 *****************************************************************************/
1332HWINSTA WIN32API CreateWindowStationA(LPTSTR lpWinSta,
1333 DWORD dwReserved,
1334 DWORD dwDesiredAccess,
1335 LPSECURITY_ATTRIBUTES lpsa)
1336{
1337 dprintf(("USER32:CreateWindowStationA(%s,%08xh,%08xh,%08x) not implemented.\n",
1338 lpWinSta,
1339 dwReserved,
1340 dwDesiredAccess,
1341 lpsa));
1342
1343 return (NULL);
1344}
1345/*****************************************************************************
1346 * Name : HWINSTA WIN32API CreateWindowStationW
1347 * Purpose : The CreateWindowStation function creates a window station object.
1348 * It returns a handle that can be used to access the window station.
1349 * A window station is a secure object that contains a set of global
1350 * atoms, a clipboard, and a set of desktop objects.
1351 * Parameters: LPTSTR lpwinsta name of the new window station
1352 * DWORD dwReserved reserved; must be NULL
1353 * DWORD dwDesiredAccess specifies access of returned handle
1354 * LPSECURITY_ATTRIBUTES lpsa specifies security attributes of the window station
1355 * Variables :
1356 * Result : If the function succeeds, the return value is the handle to the
1357 * newly created window station.
1358 * If the function fails, the return value is NULL. To get extended
1359 * error information, call GetLastError.
1360 * Remark :
1361 * Status : UNTESTED STUB
1362 *
1363 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
1364 *****************************************************************************/
1365HWINSTA WIN32API CreateWindowStationW(LPWSTR lpWinSta,
1366 DWORD dwReserved,
1367 DWORD dwDesiredAccess,
1368 LPSECURITY_ATTRIBUTES lpsa)
1369{
1370 dprintf(("USER32:CreateWindowStationW(%s,%08xh,%08xh,%08x) not implemented.\n",
1371 lpWinSta,
1372 dwReserved,
1373 dwDesiredAccess,
1374 lpsa));
1375
1376 return (NULL);
1377}
1378/*****************************************************************************
1379 * Name : BOOL WIN32API EnumDesktopWindows
1380 * Purpose : The EnumDesktopWindows function enumerates all windows in a
1381 * desktop by passing the handle of each window, in turn, to an
1382 * application-defined callback function.
1383 * Parameters: HDESK hDesktop handle of desktop to enumerate
1384 * WNDENUMPROC lpfn points to application's callback function
1385 * LPARAM lParam 32-bit value to pass to the callback function
1386 * Variables :
1387 * Result : If the function succeeds, the return value is TRUE.
1388 * If the function fails, the return value is FALSE. To get
1389 * extended error information, call GetLastError.
1390 * Remark :
1391 * Status : UNTESTED STUB
1392 *
1393 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
1394 *****************************************************************************/
1395BOOL WIN32API EnumDesktopWindows(HDESK hDesktop,
1396 WNDENUMPROC lpfn,
1397 LPARAM lParam)
1398{
1399 dprintf(("USER32:EnumDesktopWindows (%08xh,%08xh,%08x) not implemented.\n",
1400 hDesktop,
1401 lpfn,
1402 lParam));
1403
1404 return (FALSE);
1405}
1406/*****************************************************************************
1407 * Name : BOOL WIN32API EnumDesktopsA
1408 * Purpose : The EnumDesktops function enumerates all desktops in the window
1409 * station assigned to the calling process. The function does so by
1410 * passing the name of each desktop, in turn, to an application-
1411 * defined callback function.
1412 * Parameters: HWINSTA hwinsta handle of window station to enumerate
1413 * DESKTOPENUMPROC lpEnumFunc points to application's callback function
1414 * LPARAM lParam 32-bit value to pass to the callback function
1415 * Variables :
1416 * Result : If the function succeeds, the return value is TRUE.
1417 * If the function fails, the return value is FALSE. To get extended
1418 * error information, call GetLastError.
1419 * Remark :
1420 * Status : UNTESTED STUB
1421 *
1422 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
1423 *****************************************************************************/
1424BOOL WIN32API EnumDesktopsA(HWINSTA hWinSta,
1425 DESKTOPENUMPROCA lpEnumFunc,
1426 LPARAM lParam)
1427{
1428 dprintf(("USER32:EnumDesktopsA (%08xh,%08xh,%08x) not implemented.\n",
1429 hWinSta,
1430 lpEnumFunc,
1431 lParam));
1432
1433 return (FALSE);
1434}
1435/*****************************************************************************
1436 * Name : BOOL WIN32API EnumDesktopsW
1437 * Purpose : The EnumDesktops function enumerates all desktops in the window
1438 * station assigned to the calling process. The function does so by
1439 * passing the name of each desktop, in turn, to an application-
1440 * defined callback function.
1441 * Parameters: HWINSTA hwinsta handle of window station to enumerate
1442 * DESKTOPENUMPROC lpEnumFunc points to application's callback function
1443 * LPARAM lParam 32-bit value to pass to the callback function
1444 * Variables :
1445 * Result : If the function succeeds, the return value is TRUE.
1446 * If the function fails, the return value is FALSE. To get extended
1447 * error information, call GetLastError.
1448 * Remark :
1449 * Status : UNTESTED STUB
1450 *
1451 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
1452 *****************************************************************************/
1453BOOL WIN32API EnumDesktopsW(HWINSTA hWinSta,
1454 DESKTOPENUMPROCW lpEnumFunc,
1455 LPARAM lParam)
1456{
1457 dprintf(("USER32:EnumDesktopsW (%08xh,%08xh,%08x) not implemented.\n",
1458 hWinSta,
1459 lpEnumFunc,
1460 lParam));
1461
1462 return (FALSE);
1463}
1464/*****************************************************************************
1465 * Name : BOOL WIN32API EnumWindowStationsA
1466 * Purpose : The EnumWindowStations function enumerates all windowstations
1467 * in the system by passing the name of each window station, in
1468 * turn, to an application-defined callback function.
1469 * Parameters:
1470 * Variables : WINSTAENUMPROC lpEnumFunc points to application's callback function
1471 * LPARAM lParam 32-bit value to pass to the callback function
1472 * Result : If the function succeeds, the return value is TRUE.
1473 * If the function fails the return value is FALSE. To get extended
1474 * error information, call GetLastError.
1475 * Remark :
1476 * Status : UNTESTED STUB
1477 *
1478 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
1479 *****************************************************************************/
1480BOOL WIN32API EnumWindowStationsA(WINSTAENUMPROCA lpEnumFunc,
1481 LPARAM lParam)
1482{
1483 dprintf(("USER32:EnumWindowStationsA (%08xh,%08x) not implemented.\n",
1484 lpEnumFunc,
1485 lParam));
1486
1487 return (FALSE);
1488}
1489/*****************************************************************************
1490 * Name : BOOL WIN32API EnumWindowStationsW
1491 * Purpose : The EnumWindowStations function enumerates all windowstations
1492 * in the system by passing the name of each window station, in
1493 * turn, to an application-defined callback function.
1494 * Parameters:
1495 * Variables : WINSTAENUMPROC lpEnumFunc points to application's callback function
1496 * LPARAM lParam 32-bit value to pass to the callback function
1497 * Result : If the function succeeds, the return value is TRUE.
1498 * If the function fails the return value is FALSE. To get extended
1499 * error information, call GetLastError.
1500 * Remark :
1501 * Status : UNTESTED STUB
1502 *
1503 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
1504 *****************************************************************************/
1505BOOL WIN32API EnumWindowStationsW(WINSTAENUMPROCW lpEnumFunc,
1506 LPARAM lParam)
1507{
1508 dprintf(("USER32:EnumWindowStationsW (%08xh,%08x) not implemented.\n",
1509 lpEnumFunc,
1510 lParam));
1511
1512 return (FALSE);
1513}
1514/*****************************************************************************
1515 * Name : HWINSTA WIN32API GetProcessWindowStation
1516 * Purpose : The GetProcessWindowStation function returns a handle of the
1517 * window station associated with the calling process.
1518 * Parameters:
1519 * Variables :
1520 * Result : If the function succeeds, the return value is a handle of the
1521 * window station associated with the calling process.
1522 * If the function fails, the return value is NULL. This can occur
1523 * if the calling process is not an application written for Windows
1524 * NT. To get extended error information, call GetLastError.
1525 * Remark :
1526 * Status : UNTESTED STUB
1527 *
1528 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
1529 *****************************************************************************/
1530HWINSTA WIN32API GetProcessWindowStation(VOID)
1531{
1532 dprintf(("USER32:GetProcessWindowStation () not implemented.\n"));
1533
1534 return (NULL);
1535}
1536/*****************************************************************************
1537 * Name : BOOL WIN32API GetUserObjectInformationA
1538 * Purpose : The GetUserObjectInformation function returns information about
1539 * a window station or desktop object.
1540 * Parameters: HANDLE hObj handle of object to get information for
1541 * int nIndex type of information to get
1542 * PVOID pvInfo points to buffer that receives the information
1543 * DWORD nLength size, in bytes, of pvInfo buffer
1544 * LPDWORD lpnLengthNeeded receives required size, in bytes, of pvInfo buffer
1545 * Variables :
1546 * Result : If the function succeeds, the return value is TRUE.
1547 * If the function fails, the return value is FALSE. To get extended
1548 * error information, call GetLastError.
1549 * Remark :
1550 * Status : UNTESTED STUB
1551 *
1552 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
1553 *****************************************************************************/
1554BOOL WIN32API GetUserObjectInformationA(HANDLE hObj,
1555 int nIndex,
1556 PVOID pvInfo,
1557 DWORD nLength,
1558 LPDWORD lpnLengthNeeded)
1559{
1560 dprintf(("USER32:GetUserObjectInformationA (%08xh,%08xh,%08xh,%u,%08x) not implemented.\n",
1561 hObj,
1562 nIndex,
1563 pvInfo,
1564 nLength,
1565 lpnLengthNeeded));
1566
1567 return (FALSE);
1568}
1569/*****************************************************************************
1570 * Name : BOOL WIN32API GetUserObjectInformationW
1571 * Purpose : The GetUserObjectInformation function returns information about
1572 * a window station or desktop object.
1573 * Parameters: HANDLE hObj handle of object to get information for
1574 * int nIndex type of information to get
1575 * PVOID pvInfo points to buffer that receives the information
1576 * DWORD nLength size, in bytes, of pvInfo buffer
1577 * LPDWORD lpnLengthNeeded receives required size, in bytes, of pvInfo buffer
1578 * Variables :
1579 * Result : If the function succeeds, the return value is TRUE.
1580 * If the function fails, the return value is FALSE. To get extended
1581 * error information, call GetLastError.
1582 * Remark :
1583 * Status : UNTESTED STUB
1584 *
1585 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
1586 *****************************************************************************/
1587BOOL WIN32API GetUserObjectInformationW(HANDLE hObj,
1588 int nIndex,
1589 PVOID pvInfo,
1590 DWORD nLength,
1591 LPDWORD lpnLengthNeeded)
1592{
1593 dprintf(("USER32:GetUserObjectInformationW (%08xh,%08xh,%08xh,%u,%08x) not implemented.\n",
1594 hObj,
1595 nIndex,
1596 pvInfo,
1597 nLength,
1598 lpnLengthNeeded));
1599
1600 return (FALSE);
1601}
1602/*****************************************************************************
1603 * Name : BOOL WIN32API GetUserObjectSecurity
1604 * Purpose : The GetUserObjectSecurity function retrieves security information
1605 * for the specified user object.
1606 * Parameters: HANDLE hObj handle of user object
1607 * SECURITY_INFORMATION * pSIRequested address of requested security information
1608 * LPSECURITY_DESCRIPTOR pSID address of security descriptor
1609 * DWORD nLength size of buffer for security descriptor
1610 * LPDWORD lpnLengthNeeded address of required size of buffer
1611 * Variables :
1612 * Result : If the function succeeds, the return value is TRUE.
1613 * If the function fails, the return value is FALSE. To get extended
1614 * error information, call GetLastError.
1615 * Remark :
1616 * Status : UNTESTED STUB
1617 *
1618 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
1619 *****************************************************************************/
1620BOOL WIN32API GetUserObjectSecurity(HANDLE hObj,
1621 PSECURITY_INFORMATION pSIRequested,
1622 PSECURITY_DESCRIPTOR pSID,
1623 DWORD nLength,
1624 LPDWORD lpnLengthNeeded)
1625{
1626 dprintf(("USER32:GetUserObjectSecurity (%08xh,%08xh,%08xh,%u,%08x) not implemented.\n",
1627 hObj,
1628 pSIRequested,
1629 pSID,
1630 nLength,
1631 lpnLengthNeeded));
1632
1633 return (FALSE);
1634}
1635/*****************************************************************************
1636 * Name : HDESK WIN32API OpenDesktopA
1637 * Purpose : The OpenDesktop function returns a handle to an existing desktop.
1638 * A desktop is a secure object contained within a window station
1639 * object. A desktop has a logical display surface and contains
1640 * windows, menus and hooks.
1641 * Parameters: LPCTSTR lpszDesktopName name of the desktop to open
1642 * DWORD dwFlags flags to control interaction with other applications
1643 * BOOL fInherit specifies whether returned handle is inheritable
1644 * DWORD dwDesiredAccess specifies access of returned handle
1645 * Variables :
1646 * Result : If the function succeeds, the return value is the handle to the
1647 * opened desktop.
1648 * If the function fails, the return value is NULL. To get extended
1649 * error information, call GetLastError.
1650 * Remark :
1651 * Status : UNTESTED STUB
1652 *
1653 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
1654 *****************************************************************************/
1655HDESK WIN32API OpenDesktopA(LPCTSTR lpszDesktopName,
1656 DWORD dwFlags,
1657 BOOL fInherit,
1658 DWORD dwDesiredAccess)
1659{
1660 dprintf(("USER32:OpenDesktopA (%s,%08xh,%08xh,%08x) not implemented.\n",
1661 lpszDesktopName,
1662 dwFlags,
1663 fInherit,
1664 dwDesiredAccess));
1665
1666 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
1667 return (NULL);
1668}
1669/*****************************************************************************
1670 * Name : HDESK WIN32API OpenDesktopW
1671 * Purpose : The OpenDesktop function returns a handle to an existing desktop.
1672 * A desktop is a secure object contained within a window station
1673 * object. A desktop has a logical display surface and contains
1674 * windows, menus and hooks.
1675 * Parameters: LPCTSTR lpszDesktopName name of the desktop to open
1676 * DWORD dwFlags flags to control interaction with other applications
1677 * BOOL fInherit specifies whether returned handle is inheritable
1678 * DWORD dwDesiredAccess specifies access of returned handle
1679 * Variables :
1680 * Result : If the function succeeds, the return value is the handle to the
1681 * opened desktop.
1682 * If the function fails, the return value is NULL. To get extended
1683 * error information, call GetLastError.
1684 * Remark :
1685 * Status : UNTESTED STUB
1686 *
1687 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
1688 *****************************************************************************/
1689HDESK WIN32API OpenDesktopW(LPCTSTR lpszDesktopName,
1690 DWORD dwFlags,
1691 BOOL fInherit,
1692 DWORD dwDesiredAccess)
1693{
1694 dprintf(("USER32:OpenDesktopW (%s,%08xh,%08xh,%08x) not implemented.\n",
1695 lpszDesktopName,
1696 dwFlags,
1697 fInherit,
1698 dwDesiredAccess));
1699
1700 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
1701 return (NULL);
1702}
1703/*****************************************************************************
1704 * Name : HDESK WIN32API OpenInputDesktop
1705 * Purpose : The OpenInputDesktop function returns a handle to the desktop
1706 * that receives user input. The input desktop is a desktop on the
1707 * window station associated with the logged-on user.
1708 * Parameters: DWORD dwFlags flags to control interaction with other applications
1709 * BOOL fInherit specifies whether returned handle is inheritable
1710 * DWORD dwDesiredAccess specifies access of returned handle
1711 * Variables :
1712 * Result : If the function succeeds, the return value is a handle of the
1713 * desktop that receives user input.
1714 * If the function fails, the return value is NULL. To get extended
1715 * error information, call GetLastError.
1716 * Remark :
1717 * Status : UNTESTED STUB
1718 *
1719 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
1720 *****************************************************************************/
1721HDESK WIN32API OpenInputDesktop(DWORD dwFlags,
1722 BOOL fInherit,
1723 DWORD dwDesiredAccess)
1724{
1725 dprintf(("USER32:OpenInputDesktop (%08xh,%08xh,%08x) not implemented.\n",
1726 dwFlags,
1727 fInherit,
1728 dwDesiredAccess));
1729
1730 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
1731 return (NULL);
1732}
1733/*****************************************************************************
1734 * Name : HWINSTA WIN32API OpenWindowStationA
1735 * Purpose : The OpenWindowStation function returns a handle to an existing
1736 * window station.
1737 * Parameters: LPCTSTR lpszWinStaName name of the window station to open
1738 * BOOL fInherit specifies whether returned handle is inheritable
1739 * DWORD dwDesiredAccess specifies access of returned handle
1740 * Variables :
1741 * Result : If the function succeeds, the return value is the handle to the
1742 * specified window station.
1743 * If the function fails, the return value is NULL. To get extended
1744 * error information, call GetLastError.
1745 * Remark :
1746 * Status : UNTESTED STUB
1747 *
1748 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
1749 *****************************************************************************/
1750HWINSTA WIN32API OpenWindowStationA(LPCTSTR lpszWinStaName,
1751 BOOL fInherit,
1752 DWORD dwDesiredAccess)
1753{
1754 dprintf(("USER32:OpenWindowStatieonA (%s,%08xh,%08x) not implemented.\n",
1755 lpszWinStaName,
1756 fInherit,
1757 dwDesiredAccess));
1758
1759 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
1760 return (NULL);
1761}
1762/*****************************************************************************
1763 * Name : HWINSTA WIN32API OpenWindowStationW
1764 * Purpose : The OpenWindowStation function returns a handle to an existing
1765 * window station.
1766 * Parameters: LPCTSTR lpszWinStaName name of the window station to open
1767 * BOOL fInherit specifies whether returned handle is inheritable
1768 * DWORD dwDesiredAccess specifies access of returned handle
1769 * Variables :
1770 * Result : If the function succeeds, the return value is the handle to the
1771 * specified window station.
1772 * If the function fails, the return value is NULL. To get extended
1773 * error information, call GetLastError.
1774
1775
1776 * Remark :
1777 * Status : UNTESTED STUB
1778 *
1779 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
1780 *****************************************************************************/
1781HWINSTA WIN32API OpenWindowStationW(LPCTSTR lpszWinStaName,
1782 BOOL fInherit,
1783 DWORD dwDesiredAccess)
1784{
1785 dprintf(("USER32:OpenWindowStatieonW (%s,%08xh,%08x) not implemented.\n",
1786 lpszWinStaName,
1787 fInherit,
1788 dwDesiredAccess));
1789
1790 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
1791 return (NULL);
1792}
1793/*****************************************************************************
1794 * Name : BOOL WIN32API SetProcessWindowStation
1795 * Purpose : The SetProcessWindowStation function assigns a window station
1796 * to the calling process. This enables the process to access
1797 * objects in the window station such as desktops, the clipboard,
1798 * and global atoms. All subsequent operations on the window station
1799 * use the access rights granted to hWinSta.
1800 * Parameters:
1801 * Variables :
1802 * Result : If the function succeeds, the return value is TRUE.
1803 * If the function fails, the return value is FALSE. To get extended
1804 * error information, call GetLastError.
1805 * Remark :
1806 * Status : UNTESTED STUB
1807 *
1808 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
1809 *****************************************************************************/
1810BOOL WIN32API SetProcessWindowStation(HWINSTA hWinSta)
1811{
1812 dprintf(("USER32:SetProcessWindowStation (%08x) not implemented.\n",
1813 hWinSta));
1814
1815 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
1816 return (FALSE);
1817}
1818/*****************************************************************************
1819 * Name : BOOL WIN32API SetThreadDesktop
1820 * Purpose : The SetThreadDesktop function assigns a desktop to the calling
1821 * thread. All subsequent operations on the desktop use the access
1822 * rights granted to hDesk.
1823 * Parameters: HDESK hDesk handle of the desktop to assign to this thread
1824 * Variables :
1825 * Result : If the function succeeds, the return value is TRUE.
1826 * If the function fails, the return value is FALSE. To get extended
1827 * error information, call GetLastError.
1828 * Remark :
1829 * Status : UNTESTED STUB
1830 *
1831 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
1832 *****************************************************************************/
1833BOOL WIN32API SetThreadDesktop(HDESK hDesktop)
1834{
1835 dprintf(("USER32:SetThreadDesktop (%08x) not implemented.\n",
1836 hDesktop));
1837
1838 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
1839 return (FALSE);
1840}
1841/*****************************************************************************
1842 * Name : BOOL WIN32API SetUserObjectInformationA
1843 * Purpose : The SetUserObjectInformation function sets information about a
1844 * window station or desktop object.
1845 * Parameters: HANDLE hObject handle of the object for which to set information
1846 * int nIndex type of information to set
1847 * PVOID lpvInfo points to a buffer that contains the information
1848 * DWORD cbInfo size, in bytes, of lpvInfo buffer
1849 * Variables :
1850 * Result : If the function succeeds, the return value is TRUE.
1851 * If the function fails the return value is FALSE. To get extended
1852 * error information, call GetLastError.
1853 * Remark :
1854 * Status : UNTESTED STUB
1855 *
1856 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
1857 *****************************************************************************/
1858BOOL WIN32API SetUserObjectInformationA(HANDLE hObject,
1859 int nIndex,
1860 PVOID lpvInfo,
1861 DWORD cbInfo)
1862{
1863 dprintf(("USER32:SetUserObjectInformationA (%08xh,%u,%08xh,%08x) not implemented.\n",
1864 hObject,
1865 nIndex,
1866 lpvInfo,
1867 cbInfo));
1868
1869 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
1870 return (FALSE);
1871}
1872/*****************************************************************************
1873 * Name : BOOL WIN32API SetUserObjectInformationW
1874 * Purpose : The SetUserObjectInformation function sets information about a
1875 * window station or desktop object.
1876 * Parameters: HANDLE hObject handle of the object for which to set information
1877 * int nIndex type of information to set
1878 * PVOID lpvInfo points to a buffer that contains the information
1879 * DWORD cbInfo size, in bytes, of lpvInfo buffer
1880 * Variables :
1881 * Result : If the function succeeds, the return value is TRUE.
1882 * If the function fails the return value is FALSE. To get extended
1883 * error information, call GetLastError.
1884 * Remark :
1885 * Status : UNTESTED STUB
1886 *
1887 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
1888 *****************************************************************************/
1889BOOL WIN32API SetUserObjectInformationW(HANDLE hObject,
1890 int nIndex,
1891 PVOID lpvInfo,
1892 DWORD cbInfo)
1893{
1894 dprintf(("USER32:SetUserObjectInformationW (%08xh,%u,%08xh,%08x) not implemented.\n",
1895 hObject,
1896 nIndex,
1897 lpvInfo,
1898 cbInfo));
1899
1900 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
1901 return (FALSE);
1902}
1903/*****************************************************************************
1904 * Name : BOOL WIN32API SetUserObjectSecurity
1905 * Purpose : The SetUserObjectSecurity function sets the security of a user
1906 * object. This can be, for example, a window or a DDE conversation
1907 * Parameters: HANDLE hObject handle of user object
1908 * SECURITY_INFORMATION * psi address of security information
1909 * LPSECURITY_DESCRIPTOR psd address of security descriptor
1910 * Variables :
1911 * Result : If the function succeeds, the return value is TRUE.
1912 * If the function fails, the return value is FALSE. To get extended
1913 * error information, call GetLastError.
1914 * Remark :
1915 * Status : UNTESTED STUB
1916 *
1917 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
1918 *****************************************************************************/
1919BOOL WIN32API SetUserObjectSecurity(HANDLE hObject,
1920 PSECURITY_INFORMATION psi,
1921 PSECURITY_DESCRIPTOR psd)
1922{
1923 dprintf(("USER32:SetUserObjectSecuroty (%08xh,%08xh,%08x) not implemented.\n",
1924 hObject,
1925 psi,
1926 psd));
1927
1928 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
1929 return (FALSE);
1930}
1931/*****************************************************************************
1932 * Name : BOOL WIN32API SwitchDesktop
1933 * Purpose : The SwitchDesktop function makes a desktop visible and activates
1934 * it. This enables the desktop to receive input from the user. The
1935 * calling process must have DESKTOP_SWITCHDESKTOP access to the
1936 * desktop for the SwitchDesktop function to succeed.
1937 * Parameters:
1938 * Variables :
1939 * Result : If the function succeeds, the return value is TRUE.
1940 * If the function fails, the return value is FALSE. To get extended
1941 * error information, call GetLastError.
1942 * Remark :
1943 * Status : UNTESTED STUB
1944 *
1945 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
1946 *****************************************************************************/
1947BOOL WIN32API SwitchDesktop(HDESK hDesktop)
1948{
1949 dprintf(("USER32:SwitchDesktop (%08x) not implemented.\n",
1950 hDesktop));
1951
1952 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
1953 return (FALSE);
1954}
1955
1956/* Debugging Functions */
1957
1958/*****************************************************************************
1959 * Name : VOID WIN32API SetDebugErrorLevel
1960 * Purpose : The SetDebugErrorLevel function sets the minimum error level at
1961 * which Windows will generate debugging events and pass them to a debugger.
1962 * Parameters: DWORD dwLevel debugging error level
1963 * Variables :
1964 * Result :
1965 * Remark :
1966 * Status : UNTESTED STUB
1967 *
1968 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
1969 *****************************************************************************/
1970VOID WIN32API SetDebugErrorLevel(DWORD dwLevel)
1971{
1972 dprintf(("USER32:SetDebugErrorLevel (%08x) not implemented.\n",
1973 dwLevel));
1974}
1975
1976/* Drag'n'drop */
1977
1978/*****************************************************************************
1979 * Name : BOOL WIN32API DragObject
1980 * Purpose : Unknown
1981 * Parameters: Unknown
1982 * Variables :
1983 * Result :
1984 * Remark :
1985 * Status : UNTESTED UNKNOWN STUB
1986 *
1987 * Author : Patrick Haller [Wed, 1998/06/16 11:55]
1988 *****************************************************************************/
1989DWORD WIN32API DragObject(HWND x1,HWND x2,UINT x3,DWORD x4,HCURSOR x5)
1990{
1991 dprintf(("USER32: DragObject(%08x,%08xh,%08xh,%08xh,%08xh) not implemented.\n",
1992 x1,
1993 x2,
1994 x3,
1995 x4,
1996 x5));
1997
1998 return (FALSE); /* default */
1999}
2000
2001/* Unknown */
2002
2003/*****************************************************************************
2004 * Name : BOOL WIN32API SetShellWindow
2005 * Purpose : Unknown
2006 * Parameters: Unknown
2007 * Variables :
2008 * Result :
2009 * Remark :
2010 * Status : UNTESTED UNKNOWN STUB
2011 *
2012 * Author : Patrick Haller [Wed, 1998/06/16 11:55]
2013 *****************************************************************************/
2014BOOL WIN32API SetShellWindow(DWORD x1)
2015{
2016 dprintf(("USER32: SetShellWindow(%08x) not implemented.\n",
2017 x1));
2018
2019 return (FALSE); /* default */
2020}
2021/*****************************************************************************
2022 * Name : BOOL WIN32API PlaySoundEvent
2023 * Purpose : Unknown
2024 * Parameters: Unknown
2025 * Variables :
2026 * Result :
2027 * Remark :
2028 * Status : UNTESTED UNKNOWN STUB
2029 *
2030 * Author : Patrick Haller [Wed, 1998/06/16 11:55]
2031 *****************************************************************************/
2032BOOL WIN32API PlaySoundEvent(DWORD x1)
2033{
2034 dprintf(("USER32: PlaySoundEvent(%08x) not implemented.\n",
2035 x1));
2036
2037 return (FALSE); /* default */
2038}
2039/*****************************************************************************
2040 * Name : BOOL WIN32API SetSysColorsTemp
2041 * Purpose : Unknown
2042 * Parameters: Unknown
2043 * Variables :
2044 * Result :
2045 * Remark :
2046 * Status : UNTESTED UNKNOWN STUB
2047 *
2048 * Author : Patrick Haller [Wed, 1998/06/16 11:55]
2049 *****************************************************************************/
2050BOOL WIN32API SetSysColorsTemp(void)
2051{
2052 dprintf(("USER32: SetSysColorsTemp() not implemented.\n"));
2053
2054 return (FALSE); /* default */
2055}
2056/*****************************************************************************
2057 * Name : BOOL WIN32API RegisterNetworkCapabilities
2058 * Purpose : Unknown
2059 * Parameters: Unknown
2060 * Variables :
2061 * Result :
2062 * Remark :
2063 * Status : UNTESTED UNKNOWN STUB
2064 *
2065 * Author : Patrick Haller [Wed, 1998/06/16 11:55]
2066 *****************************************************************************/
2067BOOL WIN32API RegisterNetworkCapabilities(DWORD x1,
2068 DWORD x2)
2069{
2070 dprintf(("USER32: RegisterNetworkCapabilities(%08xh,%08xh) not implemented.\n",
2071 x1,
2072 x2));
2073
2074 return (FALSE); /* default */
2075}
2076/*****************************************************************************
2077 * Name : BOOL WIN32API EndTask
2078 * Purpose : Unknown
2079 * Parameters: Unknown
2080 * Variables :
2081 * Result :
2082 * Remark :
2083 * Status : UNTESTED UNKNOWN STUB
2084 *
2085 * Author : Patrick Haller [Wed, 1998/06/16 11:55]
2086 *****************************************************************************/
2087BOOL WIN32API EndTask(DWORD x1, DWORD x2, DWORD x3)
2088{
2089 dprintf(("USER32: EndTask(%08xh,%08xh,%08xh) not implemented.\n",
2090 x1,
2091 x2,
2092 x3));
2093
2094 return (FALSE); /* default */
2095}
2096/*****************************************************************************
2097 * Name : BOOL WIN32API GetNextQueueWindow
2098 * Purpose : Unknown
2099 * Parameters: Unknown
2100 * Variables :
2101 * Result :
2102 * Remark :
2103 * Status : UNTESTED UNKNOWN STUB
2104 *
2105 * Author : Patrick Haller [Wed, 1998/06/16 11:55]
2106 *****************************************************************************/
2107BOOL WIN32API GetNextQueueWindow(DWORD x1, DWORD x2)
2108{
2109 dprintf(("USER32: GetNextQueueWindow(%08xh,%08xh) not implemented.\n",
2110 x1,
2111 x2));
2112
2113 return (FALSE); /* default */
2114}
2115/*****************************************************************************
2116 * Name : BOOL WIN32API YieldTask
2117 * Purpose : Unknown
2118 * Parameters: Unknown
2119 * Variables :
2120 * Result :
2121 * Remark :
2122 * Status : UNTESTED UNKNOWN STUB
2123 *
2124 * Author : Patrick Haller [Wed, 1998/06/16 11:55]
2125 *****************************************************************************/
2126BOOL WIN32API YieldTask(void)
2127{
2128 dprintf(("USER32: YieldTask() not implemented.\n"));
2129
2130 return (FALSE); /* default */
2131}
2132/*****************************************************************************
2133 * Name : BOOL WIN32API WinOldAppHackoMatic
2134 * Purpose : Unknown
2135 * Parameters: Unknown
2136 * Variables :
2137 * Result :
2138 * Remark :
2139 * Status : UNTESTED UNKNOWN STUB
2140 *
2141 * Author : Patrick Haller [Wed, 1998/06/16 11:55]
2142 *****************************************************************************/
2143BOOL WIN32API WinOldAppHackoMatic(DWORD x1)
2144{
2145 dprintf(("USER32: WinOldAppHackoMatic(%08x) not implemented.\n",
2146 x1));
2147
2148 return (FALSE); /* default */
2149}
2150/*****************************************************************************
2151 * Name : BOOL WIN32API RegisterSystemThread
2152 * Purpose : Unknown
2153 * Parameters: Unknown
2154 * Variables :
2155 * Result :
2156 * Remark :
2157 * Status : UNTESTED UNKNOWN STUB
2158 *
2159 * Author : Patrick Haller [Wed, 1998/06/16 11:55]
2160 *****************************************************************************/
2161BOOL WIN32API RegisterSystemThread(DWORD x1,
2162 DWORD x2)
2163{
2164 dprintf(("USER32: RegisterSystemThread(%08xh,%08xh) not implemented.\n",
2165 x1,
2166 x2));
2167
2168 return (FALSE); /* default */
2169}
2170/*****************************************************************************
2171 * Name : BOOL WIN32API IsHungThread
2172 * Purpose : Unknown
2173 * Parameters: Unknown
2174 * Variables :
2175 * Result :
2176 * Remark :
2177 * Status : UNTESTED UNKNOWN STUB
2178 *
2179 * Author : Patrick Haller [Wed, 1998/06/16 11:55]
2180 *****************************************************************************/
2181BOOL WIN32API IsHungThread(DWORD x1)
2182{
2183 dprintf(("USER32: IsHungThread(%08xh) not implemented.\n",
2184 x1));
2185
2186 return (FALSE); /* default */
2187}
2188/*****************************************************************************
2189 * Name : BOOL WIN32API UserSignalProc
2190 * Purpose : Unknown
2191 * Parameters: Unknown
2192 * Variables :
2193 * Result :
2194 * Remark :
2195 * Status : UNTESTED UNKNOWN STUB
2196 *
2197 * Author : Patrick Haller [Wed, 1998/06/16 11:55]
2198 *****************************************************************************/
2199BOOL WIN32API UserSignalProc(DWORD x1,
2200 DWORD x2,
2201 DWORD x3,
2202 DWORD x4)
2203{
2204 dprintf(("USER32: UserSignalProc(%08xh,%08xh,%08xh,%08xh) not implemented.\n",
2205 x1,
2206 x2,
2207 x3,
2208 x4));
2209
2210 return (FALSE); /* default */
2211}
2212/*****************************************************************************
2213 * Name : BOOL WIN32API GetShellWindow
2214 * Purpose : Unknown
2215 * Parameters: Unknown
2216 * Variables :
2217 * Result :
2218 * Remark :
2219 * Status : UNTESTED UNKNOWN STUB
2220 *
2221 * Author : Patrick Haller [Wed, 1998/06/16 11:55]
2222 *****************************************************************************/
2223HWND WIN32API GetShellWindow(void)
2224{
2225 dprintf(("USER32: GetShellWindow() not implemented.\n"));
2226
2227 return (0); /* default */
2228}
2229/***********************************************************************
2230 * RegisterTasklist32 [USER32.436]
2231 */
2232DWORD WIN32API RegisterTasklist (DWORD x)
2233{
2234 dprintf(("USER32: RegisterTasklist(%08xh) not implemented.\n",
2235 x));
2236
2237 return TRUE;
2238}
2239/***********************************************************************
2240 * SetLogonNotifyWindow (USER32.486)
2241 */
2242DWORD WIN32API SetLogonNotifyWindow(HWINSTA hwinsta,HWND hwnd)
2243{
2244 dprintf(("USER32: SetLogonNotifyWindow - empty stub!"));
2245
2246 return 1;
2247}
2248
2249
Note: See TracBrowser for help on using the repository browser.