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

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

logging updates

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