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

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

Changed SPI_ICONHORIZONTALSPACING & SPI_ICONHORIZONTALSPACING

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