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

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

Support full window drag for Odin windows

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