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

Last change on this file since 6823 was 6762, checked in by sandervl, 24 years ago

ported the Wine MDI control + some menu fixes

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