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

Last change on this file since 6617 was 6617, checked in by phaller, 24 years ago

.

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