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

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

Updates

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