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

Last change on this file since 7685 was 7685, checked in by achimha, 24 years ago

workaround for correct WarpSans height in menu bars when using OS2Look

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