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

Last change on this file since 10275 was 10275, checked in by sandervl, 22 years ago

PM windows should have no owner if none is specified. (instead of their parent)

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