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

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

WinHelpA now uses shared memory

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