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

Last change on this file since 10519 was 10519, checked in by sandervl, 21 years ago

GetSystemMetrics: corrected SM_CXICONSPACING & SM_CYICONSPACING

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