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

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

added GetAsyncKeyState

File size: 99.2 KB
Line 
1/* $Id: user32.cpp,v 1.93 2001-03-24 15:40:56 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
43#include <wchar.h>
44#include <stdlib.h>
45#include <string.h>
46#include <oslibwin.h>
47#include <win32wnd.h>
48#include <winuser.h>
49
50#define DBG_LOCALLOG DBG_user32
51#include "dbglocal.h"
52
53//undocumented stuff
54// WIN32API CalcChildScroll
55// WIN32API CascadeChildWindows
56// WIN32API ClientThreadConnect
57// WIN32API DragObject
58// WIN32API DrawFrame
59// WIN32API EditWndProc
60// WIN32API EndTask
61// WIN32API GetInputDesktop
62// WIN32API GetNextQueueWindow
63// WIN32API GetShellWindow
64// WIN32API InitSharedTable
65// WIN32API InitTask
66// WIN32API IsHungThread
67// WIN32API LockWindowStation
68// WIN32API ModifyAccess
69// WIN32API PlaySoundEvent
70// WIN32API RegisterLogonProcess
71// WIN32API RegisterNetworkCapabilities
72// WIN32API RegisterSystemThread
73// WIN32API SetDeskWallpaper
74// WIN32API SetDesktopBitmap
75// WIN32API SetInternalWindowPos
76// WIN32API SetLogonNotifyWindow
77// WIN32API SetShellWindow
78// WIN32API SetSysColorsTemp
79// WIN32API SetWindowFullScreenState
80// WIN32API SwitchToThisWindow
81// WIN32API SysErrorBox
82// WIN32API TileChildWindows
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/* Cursor Functions */
328
329BOOL WIN32API ClipCursor(const RECT * lpRect)
330{
331 dprintf(("USER32: ClipCursor\n"));
332 return O32_ClipCursor(lpRect);
333}
334//******************************************************************************
335//******************************************************************************
336HCURSOR WIN32API CreateCursor( HINSTANCE hInst, int xHotSpot, int yHotSpot, int nWidth, int nHeight, const VOID *pvANDPlane, const VOID *pvXORPlane)
337{
338 dprintf(("USER32: CreateCursor\n"));
339 return O32_CreateCursor(hInst,xHotSpot,yHotSpot,nWidth,nHeight,pvANDPlane,pvXORPlane);
340}
341//******************************************************************************
342//******************************************************************************
343BOOL WIN32API DestroyCursor( HCURSOR hCursor)
344{
345 dprintf(("USER32: DestroyCursor\n"));
346 return O32_DestroyCursor(hCursor);
347}
348//******************************************************************************
349//******************************************************************************
350BOOL WIN32API GetClipCursor( LPRECT lpRect)
351{
352 dprintf(("USER32: GetClipCursor\n"));
353 return O32_GetClipCursor(lpRect);
354}
355//******************************************************************************
356//******************************************************************************
357HCURSOR WIN32API GetCursor(void)
358{
359 dprintf2(("USER32: GetCursor\n"));
360 return O32_GetCursor();
361}
362//******************************************************************************
363//******************************************************************************
364BOOL WIN32API GetCursorPos( PPOINT lpPoint)
365{
366 dprintf2(("USER32: GetCursorPos\n"));
367
368 if (!lpPoint) return FALSE;
369 if (OSLibWinQueryPointerPos(lpPoint)) //POINT == POINTL
370 {
371 mapScreenPoint((OSLIBPOINT*)lpPoint);
372 return TRUE;
373 } else return FALSE;
374}
375//******************************************************************************
376//******************************************************************************
377HCURSOR WIN32API SetCursor( HCURSOR hcur)
378{
379 HCURSOR rc;
380
381 rc = O32_SetCursor(hcur);
382 dprintf(("USER32: SetCursor %x (prev %x (%x))\n", hcur, rc, O32_GetCursor()));
383 return rc;
384}
385//******************************************************************************
386//******************************************************************************
387BOOL WIN32API SetCursorPos( int X, int Y)
388{
389 dprintf(("USER32: SetCursorPos %d %d", X,Y));
390 return O32_SetCursorPos(X,Y);
391}
392/*****************************************************************************
393 * Name : BOOL WIN32API SetSystemCursor
394 * Purpose : The SetSystemCursor function replaces the contents of the system
395 * cursor specified by dwCursorId with the contents of the cursor
396 * specified by hCursor, and then destroys hCursor. This function
397 * lets an application customize the system cursors.
398 * Parameters: HCURSOR hCursor set specified system cursor to this cursor's
399 * contents, then destroy this
400 * DWORD dwCursorID system cursor specified by its identifier
401 * Variables :
402 * Result : If the function succeeds, the return value is TRUE.
403 * If the function fails, the return value is FALSE. To get extended
404 * error information, call GetLastError.
405 * Remark :
406 * Status : UNTESTED STUB
407 *
408 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
409 *****************************************************************************/
410BOOL WIN32API SetSystemCursor(HCURSOR hCursor,
411 DWORD dwCursorId)
412{
413 dprintf(("USER32:SetSystemCursor (%08xh,%08x) not supported.\n",
414 hCursor,
415 dwCursorId));
416
417 return DestroyCursor(hCursor);
418}
419//******************************************************************************
420//******************************************************************************
421int WIN32API ShowCursor( BOOL bShow)
422{
423 dprintf2(("USER32: ShowCursor %d", bShow));
424 return O32_ShowCursor(bShow);
425}
426
427/* Mouse Input Functions */
428
429/*****************************************************************************
430 * Name : BOOL WIN32API DragDetect
431 * Purpose : The DragDetect function captures the mouse and tracks its movement
432 * Parameters: HWND hwnd
433 * POINT pt
434 * Variables :
435 * Result : If the user moved the mouse outside of the drag rectangle while
436 * holding the left button down, the return value is TRUE.
437 * If the user did not move the mouse outside of the drag rectangle
438 * while holding the left button down, the return value is FALSE.
439 * Remark :
440 * Status : UNTESTED STUB
441 *
442 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
443 *****************************************************************************/
444BOOL WIN32API DragDetect(HWND hwnd,
445 POINT pt)
446{
447 dprintf(("USER32:DragDetect(%08xh,...) not implemented.\n",
448 hwnd));
449
450 return (FALSE);
451}
452//******************************************************************************
453//******************************************************************************
454UINT WIN32API GetDoubleClickTime(void)
455{
456 dprintf(("USER32: GetDoubleClickTime\n"));
457 return O32_GetDoubleClickTime();
458}
459/*****************************************************************************
460 * Name : VOID WIN32API mouse_event
461 * Purpose : The mouse_event function synthesizes mouse motion and button clicks.
462 * Parameters: DWORD dwFlags flags specifying various motion/click variants
463 * DWORD dx horizontal mouse position or position change
464 * DWORD dy vertical mouse position or position change
465 * DWORD cButtons unused, reserved for future use, set to zero
466 * DWORD dwExtraInfo 32 bits of application-defined information
467 * Variables :
468 * Result :
469 * Remark :
470 * Status : UNTESTED STUB
471 *
472 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
473 *****************************************************************************/
474VOID WIN32API mouse_event(DWORD dwFlags,
475 DWORD dx,
476 DWORD dy,
477 DWORD cButtons,
478 DWORD dwExtraInfo)
479{
480 dprintf(("USER32:mouse_event (%08xh,%u,%u,%u,%08x) not implemented.\n",
481 dwFlags,
482 dx,
483 dy,
484 cButtons,
485 dwExtraInfo));
486}
487//******************************************************************************
488//******************************************************************************
489BOOL WIN32API SetDoubleClickTime( UINT uInterval)
490{
491 dprintf(("USER32: SetDoubleClickTime\n"));
492 return O32_SetDoubleClickTime(uInterval);
493}
494//******************************************************************************
495//******************************************************************************
496BOOL WIN32API SwapMouseButton( BOOL fSwap)
497{
498 dprintf(("USER32: SwapMouseButton\n"));
499 return O32_SwapMouseButton(fSwap);
500}
501
502/* Error Functions */
503
504/*****************************************************************************
505 * Name : ExitWindowsEx
506 * Purpose : Shutdown System
507 * Parameters: UINT uFlags
508 * DWORD dwReserved
509 * Variables :
510 * Result : TRUE / FALSE
511 * Remark :
512 * Status :
513 *
514 * Author : Patrick Haller [Tue, 1999/10/20 21:24]
515 *****************************************************************************/
516
517ODINFUNCTION2(BOOL, ExitWindowsEx, UINT, uFlags,
518 DWORD, dwReserved)
519{
520 int rc = MessageBoxA(HWND_DESKTOP,
521 "Are you sure you want to shutdown the OS/2 system?",
522 "Shutdown ...",
523 MB_YESNOCANCEL | MB_ICONQUESTION);
524 switch (rc)
525 {
526 case IDCANCEL: return (FALSE);
527 case IDYES: break;
528 case IDNO:
529 dprintf(("no shutdown!\n"));
530 return TRUE;
531 }
532
533 return O32_ExitWindowsEx(uFlags,dwReserved);
534}
535
536
537//******************************************************************************
538//******************************************************************************
539BOOL WIN32API MessageBeep( UINT uType)
540{
541 INT flStyle;
542
543 dprintf(("USER32: MessageBeep\n"));
544
545 switch (uType)
546 {
547 case 0xFFFFFFFF:
548 OSLibDosBeep(500,50);
549 return TRUE;
550 case MB_ICONASTERISK:
551 flStyle = WAOS_NOTE;
552 break;
553 case MB_ICONEXCLAMATION:
554 flStyle = WAOS_WARNING;
555 break;
556 case MB_ICONHAND:
557 case MB_ICONQUESTION:
558 case MB_OK:
559 flStyle = WAOS_NOTE;
560 break;
561 default:
562 flStyle = WAOS_ERROR; //CB: should be right
563 break;
564 }
565 return OSLibWinAlarm(OSLIB_HWND_DESKTOP,flStyle);
566}
567//******************************************************************************
568//2nd parameter not used according to SDK (yet?)
569//******************************************************************************
570VOID WIN32API SetLastErrorEx(DWORD dwErrCode, DWORD dwType)
571{
572 dprintf(("USER32: SetLastErrorEx %x %x", dwErrCode, dwType));
573 SetLastError(dwErrCode);
574}
575
576/* Accessibility Functions */
577
578int WIN32API GetSystemMetrics(int nIndex)
579{
580 int rc = 0;
581
582 switch(nIndex) {
583 case SM_CXSCREEN:
584 rc = ScreenWidth;
585 break;
586
587 case SM_CYSCREEN:
588 rc = ScreenHeight;
589 break;
590
591 case SM_CXVSCROLL:
592 rc = OSLibWinQuerySysValue(SVOS_CXVSCROLL);
593 break;
594
595 case SM_CYHSCROLL:
596 rc = OSLibWinQuerySysValue(SVOS_CYHSCROLL);
597 break;
598
599 case SM_CYCAPTION:
600 rc = 19;
601 //rc = OSLibWinQuerySysValue(SVOS_CYTITLEBAR);
602 break;
603
604 case SM_CXBORDER:
605 case SM_CYBORDER:
606 rc = 1;
607 break;
608
609 case SM_CXDLGFRAME:
610 case SM_CYDLGFRAME:
611 rc = 3;
612 break;
613
614 case SM_CYMENU:
615 case SM_CXMENUSIZE:
616 case SM_CYMENUSIZE:
617 rc = 19;
618 break;
619
620 case SM_CXSIZE:
621 case SM_CYSIZE:
622 rc = GetSystemMetrics(SM_CYCAPTION)-2;
623 break;
624
625 case SM_CXFRAME:
626 case SM_CYFRAME:
627 rc = 4;
628 break;
629
630 case SM_CXEDGE:
631 case SM_CYEDGE:
632 rc = 2;
633 break;
634
635 case SM_CXMINSPACING:
636 rc = 160;
637 break;
638
639 case SM_CYMINSPACING:
640 rc = 24;
641 break;
642
643 case SM_CXSMICON:
644 case SM_CYSMICON:
645 rc = 16;
646 break;
647
648 case SM_CYSMCAPTION:
649 rc = 16;
650 break;
651
652 case SM_CXSMSIZE:
653 case SM_CYSMSIZE:
654 rc = 15;
655 break;
656
657//CB: todo: add missing metrics
658
659 case SM_CXICONSPACING: //TODO: size of grid cell for large icons
660 rc = OSLibWinQuerySysValue(SVOS_CXICON);
661 //CB: return standard windows icon size?
662 //rc = 32;
663 break;
664 case SM_CYICONSPACING:
665 rc = OSLibWinQuerySysValue(SVOS_CYICON);
666 //read SM_CXICONSPACING comment
667 //rc = 32;
668 break;
669 case SM_PENWINDOWS:
670 rc = FALSE;
671 break;
672 case SM_DBCSENABLED:
673 rc = FALSE;
674 break;
675 case SM_CXICON:
676 case SM_CYICON:
677 rc = 32; //CB: Win32: only 32x32, OS/2 32x32/40x40
678 // we must implement 32x32 for all screen resolutions
679 break;
680 case SM_ARRANGE:
681 rc = ARW_BOTTOMLEFT | ARW_LEFT;
682 break;
683 case SM_CXMINIMIZED:
684 break;
685 case SM_CYMINIMIZED:
686 break;
687
688 case SM_CXMINTRACK:
689 case SM_CXMIN:
690 rc = 112;
691 break;
692
693 case SM_CYMINTRACK:
694 case SM_CYMIN:
695 rc = 27;
696 break;
697
698 case SM_CXMAXTRACK: //max window size
699 case SM_CXMAXIMIZED: //max toplevel window size
700 rc = OSLibWinQuerySysValue(SVOS_CXSCREEN);
701 break;
702
703 case SM_CYMAXTRACK:
704 case SM_CYMAXIMIZED:
705 rc = OSLibWinQuerySysValue(SVOS_CYSCREEN);
706 break;
707
708 case SM_NETWORK:
709 rc = 0x01; //TODO: default = yes
710 break;
711 case SM_CLEANBOOT:
712 rc = 0; //normal boot
713 break;
714 case SM_CXDRAG: //nr of pixels before drag becomes a real one
715 rc = 2;
716 break;
717 case SM_CYDRAG:
718 rc = 2;
719 break;
720 case SM_SHOWSOUNDS: //show instead of play sound
721 rc = FALSE;
722 break;
723 case SM_CXMENUCHECK:
724 rc = 4; //TODO
725 break;
726 case SM_CYMENUCHECK:
727 rc = OSLibWinQuerySysValue(SVOS_CYMENU);
728 break;
729 case SM_SLOWMACHINE:
730 rc = FALSE; //even a slow machine is fast with OS/2 :)
731 break;
732 case SM_MIDEASTENABLED:
733 rc = FALSE;
734 break;
735 case SM_MOUSEWHEELPRESENT:
736 rc = FALSE;
737 break;
738 case SM_XVIRTUALSCREEN:
739 rc = 0;
740 break;
741 case SM_YVIRTUALSCREEN:
742 rc = 0;
743 break;
744
745 case SM_CXVIRTUALSCREEN:
746 rc = OSLibWinQuerySysValue(SVOS_CXSCREEN);
747 break;
748 case SM_CYVIRTUALSCREEN:
749 rc = OSLibWinQuerySysValue(SVOS_CYSCREEN);
750 break;
751 case SM_CMONITORS:
752 rc = 1;
753 break;
754 case SM_SAMEDISPLAYFORMAT:
755 rc = TRUE;
756 break;
757 case SM_CMETRICS:
758 rc = 81;
759 //rc = O32_GetSystemMetrics(44); //Open32 changed this one
760 break;
761 default:
762 //better than nothing
763 rc = O32_GetSystemMetrics(nIndex);
764 break;
765 }
766 dprintf2(("USER32: GetSystemMetrics %d returned %d\n", nIndex, rc));
767 return(rc);
768}
769//******************************************************************************
770/* Not support by Open32 (not included are the new win9x parameters):
771 case SPI_GETFASTTASKSWITCH:
772 case SPI_GETGRIDGRANULARITY:
773 case SPI_GETICONTITLELOGFONT:
774 case SPI_GETICONTITLEWRAP:
775 case SPI_GETMENUDROPALIGNMENT:
776 case SPI_ICONHORIZONTALSPACING:
777 case SPI_ICONVERTICALSPACING:
778 case SPI_LANGDRIVER:
779 case SPI_SETFASTTASKSWITCH:
780 case SPI_SETGRIDGRANULARITY:
781 case SPI_SETICONTITLELOGFONT:
782 case SPI_SETICONTITLEWRAP:
783 case SPI_SETMENUDROPALIGNMENT:
784 case SPI_GETSCREENSAVEACTIVE:
785 case SPI_GETSCREENSAVETIMEOUT:
786 case SPI_SETDESKPATTERN:
787 case SPI_SETDESKWALLPAPER:
788 case SPI_SETSCREENSAVEACTIVE:
789 case SPI_SETSCREENSAVETIMEOUT:
790*/
791//******************************************************************************
792BOOL WIN32API SystemParametersInfoA(UINT uiAction, UINT uiParam, PVOID pvParam, UINT fWinIni)
793{
794 BOOL rc = TRUE;
795
796 switch(uiAction) {
797 case SPI_SCREENSAVERRUNNING:
798 *(BOOL *)pvParam = FALSE;
799 break;
800 case SPI_GETDRAGFULLWINDOWS:
801 *(BOOL *)pvParam = FALSE; //CB: where is the Warp 4 setting stored?
802 break;
803 case SPI_GETNONCLIENTMETRICS:
804 {
805 LPNONCLIENTMETRICSA lpnm = (LPNONCLIENTMETRICSA)pvParam;
806
807 if (lpnm->cbSize == sizeof(NONCLIENTMETRICSA))
808 {
809 memset(lpnm, 0, sizeof(NONCLIENTMETRICSA));
810 lpnm->cbSize = sizeof(NONCLIENTMETRICSA);
811
812 SystemParametersInfoA(SPI_GETICONTITLELOGFONT, 0, (LPVOID)&(lpnm->lfCaptionFont),0);
813 lpnm->lfCaptionFont.lfWeight = FW_BOLD;
814 lpnm->iCaptionWidth = 32; //TODO
815 lpnm->iCaptionHeight = 32; //TODO
816
817 SystemParametersInfoA(SPI_GETICONTITLELOGFONT, 0, (LPVOID)&(lpnm->lfSmCaptionFont),0);
818 lpnm->iSmCaptionWidth = GetSystemMetrics(SM_CXSMSIZE);
819 lpnm->iSmCaptionHeight = GetSystemMetrics(SM_CYSMSIZE);
820
821 LPLOGFONTA lpLogFont = &(lpnm->lfMenuFont);
822 GetProfileStringA("Desktop", "MenuFont", "MS Sans Serif",
823 lpLogFont->lfFaceName, LF_FACESIZE);
824
825 lpLogFont->lfHeight = -GetProfileIntA("Desktop","MenuFontSize", 13);
826 lpLogFont->lfWidth = 0;
827 lpLogFont->lfEscapement = lpLogFont->lfOrientation = 0;
828 lpLogFont->lfWeight = FW_NORMAL;
829 lpLogFont->lfItalic = FALSE;
830 lpLogFont->lfStrikeOut = FALSE;
831 lpLogFont->lfUnderline = FALSE;
832 lpLogFont->lfCharSet = ANSI_CHARSET;
833 lpLogFont->lfOutPrecision = OUT_DEFAULT_PRECIS;
834 lpLogFont->lfClipPrecision = CLIP_DEFAULT_PRECIS;
835 lpLogFont->lfPitchAndFamily = DEFAULT_PITCH | FF_SWISS;
836
837 SystemParametersInfoA(SPI_GETICONTITLELOGFONT, 0,
838 (LPVOID)&(lpnm->lfStatusFont),0);
839 SystemParametersInfoA(SPI_GETICONTITLELOGFONT, 0,
840 (LPVOID)&(lpnm->lfMessageFont),0);
841
842 lpnm->iBorderWidth = GetSystemMetrics(SM_CXBORDER);
843 lpnm->iScrollWidth = GetSystemMetrics(SM_CXHSCROLL);
844 lpnm->iScrollHeight = GetSystemMetrics(SM_CYHSCROLL);
845 lpnm->iMenuHeight = GetSystemMetrics(SM_CYMENU);
846 lpnm->iMenuWidth = lpnm->iMenuHeight; //TODO
847 }
848 else
849 {
850 dprintf(("SPI_GETNONCLIENTMETRICS: size mismatch !! (is %d; should be %d)\n", lpnm->cbSize, sizeof(NONCLIENTMETRICSA)));
851 /* FIXME: SetLastError? */
852 rc = FALSE;
853 }
854 break;
855 }
856
857 case SPI_GETICONMETRICS: /* 45 WINVER >= 0x400 */
858 {
859 LPICONMETRICSA lpIcon = (LPICONMETRICSA)pvParam;
860 if(lpIcon && lpIcon->cbSize == sizeof(*lpIcon))
861 {
862 SystemParametersInfoA( SPI_ICONHORIZONTALSPACING, 0,
863 &lpIcon->iHorzSpacing, FALSE );
864 SystemParametersInfoA( SPI_ICONVERTICALSPACING, 0,
865 &lpIcon->iVertSpacing, FALSE );
866 SystemParametersInfoA( SPI_GETICONTITLEWRAP, 0,
867 &lpIcon->iTitleWrap, FALSE );
868 SystemParametersInfoA( SPI_GETICONTITLELOGFONT, 0,
869 &lpIcon->lfFont, FALSE );
870 }
871 else
872 {
873 dprintf(("SPI_GETICONMETRICS: size mismatch !! (is %d; should be %d)\n", lpIcon->cbSize, sizeof(ICONMETRICSA)));
874 /* FIXME: SetLastError? */
875 rc = FALSE;
876 }
877 break;
878 }
879
880 case SPI_GETICONTITLELOGFONT:
881 {
882 LPLOGFONTA lpLogFont = (LPLOGFONTA)pvParam;
883
884 /* from now on we always have an alias for MS Sans Serif */
885 strcpy(lpLogFont->lfFaceName, "MS Sans Serif");
886 lpLogFont->lfHeight = -GetProfileIntA("Desktop","IconTitleSize", /*8*/12); //CB: 8 is too small
887 lpLogFont->lfWidth = 0;
888 lpLogFont->lfEscapement = lpLogFont->lfOrientation = 0;
889 lpLogFont->lfWeight = FW_NORMAL;
890 lpLogFont->lfItalic = FALSE;
891 lpLogFont->lfStrikeOut = FALSE;
892 lpLogFont->lfUnderline = FALSE;
893 lpLogFont->lfCharSet = ANSI_CHARSET;
894 lpLogFont->lfOutPrecision = OUT_DEFAULT_PRECIS;
895 lpLogFont->lfClipPrecision = CLIP_DEFAULT_PRECIS;
896 lpLogFont->lfPitchAndFamily = DEFAULT_PITCH | FF_SWISS;
897 break;
898 }
899 case SPI_GETBORDER:
900 *(INT *)pvParam = GetSystemMetrics( SM_CXFRAME );
901 break;
902
903 case SPI_GETWORKAREA:
904 SetRect( (RECT *)pvParam, 0, 0,
905 GetSystemMetrics( SM_CXSCREEN ),
906 GetSystemMetrics( SM_CYSCREEN )
907 );
908 break;
909
910 case SPI_GETWHEELSCROLLLINES: //TODO: Undocumented
911 rc = 16;
912 break;
913
914 default:
915 rc = O32_SystemParametersInfo(uiAction, uiParam, pvParam, fWinIni);
916 break;
917 }
918 dprintf(("USER32: SystemParametersInfoA %d, returned %d\n", uiAction, rc));
919 return(rc);
920}
921//******************************************************************************
922//TODO: Check for more options that have different structs for Unicode!!!!
923//******************************************************************************
924BOOL WIN32API SystemParametersInfoW(UINT uiAction, UINT uiParam, PVOID pvParam, UINT fWinIni)
925{
926 BOOL rc = TRUE;
927 NONCLIENTMETRICSW *clientMetricsW = (NONCLIENTMETRICSW *)pvParam;
928 NONCLIENTMETRICSA clientMetricsA = {0};
929 PVOID pvParamA;
930 UINT uiParamA;
931
932 switch(uiAction) {
933 case SPI_SETNONCLIENTMETRICS:
934 clientMetricsA.cbSize = sizeof(NONCLIENTMETRICSA);
935 clientMetricsA.iBorderWidth = clientMetricsW->iBorderWidth;
936 clientMetricsA.iScrollWidth = clientMetricsW->iScrollWidth;
937 clientMetricsA.iScrollHeight = clientMetricsW->iScrollHeight;
938 clientMetricsA.iCaptionWidth = clientMetricsW->iCaptionWidth;
939 clientMetricsA.iCaptionHeight = clientMetricsW->iCaptionHeight;
940 ConvertFontWA(&clientMetricsW->lfCaptionFont, &clientMetricsA.lfCaptionFont);
941 clientMetricsA.iSmCaptionWidth = clientMetricsW->iSmCaptionWidth;
942 clientMetricsA.iSmCaptionHeight = clientMetricsW->iSmCaptionHeight;
943 ConvertFontWA(&clientMetricsW->lfSmCaptionFont, &clientMetricsA.lfSmCaptionFont);
944 clientMetricsA.iMenuWidth = clientMetricsW->iMenuWidth;
945 clientMetricsA.iMenuHeight = clientMetricsW->iMenuHeight;
946 ConvertFontWA(&clientMetricsW->lfMenuFont, &clientMetricsA.lfMenuFont);
947 ConvertFontWA(&clientMetricsW->lfStatusFont, &clientMetricsA.lfStatusFont);
948 ConvertFontWA(&clientMetricsW->lfMessageFont, &clientMetricsA.lfMessageFont);
949 //no break
950 case SPI_GETNONCLIENTMETRICS:
951 uiParamA = sizeof(NONCLIENTMETRICSA);
952 pvParamA = &clientMetricsA;
953 break;
954
955 case SPI_GETICONMETRICS: /* 45 WINVER >= 0x400 */
956 {
957 LPICONMETRICSW lpIcon = (LPICONMETRICSW)pvParam;
958 if(lpIcon && lpIcon->cbSize == sizeof(*lpIcon))
959 {
960 SystemParametersInfoW( SPI_ICONHORIZONTALSPACING, 0,
961 &lpIcon->iHorzSpacing, FALSE );
962 SystemParametersInfoW( SPI_ICONVERTICALSPACING, 0,
963 &lpIcon->iVertSpacing, FALSE );
964 SystemParametersInfoW( SPI_GETICONTITLEWRAP, 0,
965 &lpIcon->iTitleWrap, FALSE );
966 SystemParametersInfoW( SPI_GETICONTITLELOGFONT, 0,
967 &lpIcon->lfFont, FALSE );
968 return TRUE;
969 }
970 else
971 {
972 dprintf(("SPI_GETICONMETRICS: size mismatch !! (is %d; should be %d)\n", lpIcon->cbSize, sizeof(ICONMETRICSA)));
973 /* FIXME: SetLastError? */
974 return FALSE;
975 }
976 }
977
978 case SPI_GETICONTITLELOGFONT:
979 {
980 LPLOGFONTW lpLogFont = (LPLOGFONTW)pvParam;
981
982 /* from now on we always have an alias for MS Sans Serif */
983 lstrcpyW(lpLogFont->lfFaceName, (LPCWSTR)L"MS Sans Serif");
984 lpLogFont->lfHeight = -GetProfileIntA("Desktop","IconTitleSize", /*8*/12); //CB: 8 is too small
985 lpLogFont->lfWidth = 0;
986 lpLogFont->lfEscapement = lpLogFont->lfOrientation = 0;
987 lpLogFont->lfWeight = FW_NORMAL;
988 lpLogFont->lfItalic = FALSE;
989 lpLogFont->lfStrikeOut = FALSE;
990 lpLogFont->lfUnderline = FALSE;
991 lpLogFont->lfCharSet = ANSI_CHARSET;
992 lpLogFont->lfOutPrecision = OUT_DEFAULT_PRECIS;
993 lpLogFont->lfClipPrecision = CLIP_DEFAULT_PRECIS;
994 lpLogFont->lfPitchAndFamily = DEFAULT_PITCH | FF_SWISS;
995 return TRUE;
996 }
997 default:
998 pvParamA = pvParam;
999 uiParamA = uiParam;
1000 break;
1001 }
1002 rc = SystemParametersInfoA(uiAction, uiParamA, pvParamA, fWinIni);
1003
1004 switch(uiAction) {
1005 case SPI_GETNONCLIENTMETRICS:
1006 clientMetricsW->cbSize = sizeof(*clientMetricsW);
1007 clientMetricsW->iBorderWidth = clientMetricsA.iBorderWidth;
1008 clientMetricsW->iScrollWidth = clientMetricsA.iScrollWidth;
1009 clientMetricsW->iScrollHeight = clientMetricsA.iScrollHeight;
1010 clientMetricsW->iCaptionWidth = clientMetricsA.iCaptionWidth;
1011 clientMetricsW->iCaptionHeight = clientMetricsA.iCaptionHeight;
1012 ConvertFontAW(&clientMetricsA.lfCaptionFont, &clientMetricsW->lfCaptionFont);
1013
1014 clientMetricsW->iSmCaptionWidth = clientMetricsA.iSmCaptionWidth;
1015 clientMetricsW->iSmCaptionHeight = clientMetricsA.iSmCaptionHeight;
1016 ConvertFontAW(&clientMetricsA.lfSmCaptionFont, &clientMetricsW->lfSmCaptionFont);
1017
1018 clientMetricsW->iMenuWidth = clientMetricsA.iMenuWidth;
1019 clientMetricsW->iMenuHeight = clientMetricsA.iMenuHeight;
1020 ConvertFontAW(&clientMetricsA.lfMenuFont, &clientMetricsW->lfMenuFont);
1021 ConvertFontAW(&clientMetricsA.lfStatusFont, &clientMetricsW->lfStatusFont);
1022 ConvertFontAW(&clientMetricsA.lfMessageFont, &clientMetricsW->lfMessageFont);
1023 break;
1024 }
1025 dprintf(("USER32: SystemParametersInfoW %d, returned %d\n", uiAction, rc));
1026 return(rc);
1027}
1028
1029/* Process and Thread Functions */
1030
1031//******************************************************************************
1032//DWORD idAttach; /* thread to attach */
1033//DWORD idAttachTo; /* thread to attach to */
1034//BOOL fAttach; /* attach or detach */
1035//******************************************************************************
1036BOOL WIN32API AttachThreadInput(DWORD idAttach, DWORD idAttachTo, BOOL fAttach)
1037{
1038 dprintf(("USER32: AttachThreadInput, not implemented\n"));
1039 return(TRUE);
1040}
1041//******************************************************************************
1042//******************************************************************************
1043DWORD WIN32API WaitForInputIdle(HANDLE hProcess, DWORD dwTimeOut)
1044{
1045 dprintf(("USER32: WaitForInputIdle %x %d\n", hProcess, dwTimeOut));
1046
1047 return O32_WaitForInputIdle(hProcess, dwTimeOut);
1048}
1049
1050/* Help Functions */
1051
1052BOOL WIN32API WinHelpA( HWND hwnd, LPCSTR lpszHelp, UINT uCommand, DWORD dwData)
1053{
1054 static WORD WM_WINHELP = 0;
1055 HWND hDest;
1056 LPWINHELP lpwh;
1057 HGLOBAL hwh;
1058 HINSTANCE winhelp;
1059 int size,dsize,nlen;
1060
1061 dprintf(("USER32: WinHelpA %s\n", lpszHelp));
1062
1063 if(!WM_WINHELP)
1064 {
1065 WM_WINHELP=RegisterWindowMessageA("WM_WINHELP");
1066 if(!WM_WINHELP)
1067 return FALSE;
1068 }
1069
1070 hDest = FindWindowA( "MS_WINHELP", NULL );
1071 if(!hDest)
1072 {
1073 if(uCommand == HELP_QUIT)
1074 return TRUE;
1075 else
1076 winhelp = WinExec ( "winhlp32.exe -x", SW_SHOWNORMAL );
1077 if ( winhelp <= 32 ) return FALSE;
1078 if ( ! ( hDest = FindWindowA ( "MS_WINHELP", NULL ) )) return FALSE;
1079 }
1080
1081 switch(uCommand)
1082 {
1083 case HELP_CONTEXT:
1084 case HELP_SETCONTENTS:
1085 case HELP_CONTENTS:
1086 case HELP_CONTEXTPOPUP:
1087 case HELP_FORCEFILE:
1088 case HELP_HELPONHELP:
1089 case HELP_FINDER:
1090 case HELP_QUIT:
1091 dsize=0;
1092 break;
1093
1094 case HELP_KEY:
1095 case HELP_PARTIALKEY:
1096 case HELP_COMMAND:
1097 dsize = strlen( (LPSTR)dwData )+1;
1098 break;
1099
1100 case HELP_MULTIKEY:
1101 dsize = ((LPMULTIKEYHELP)dwData)->mkSize;
1102 break;
1103
1104 case HELP_SETWINPOS:
1105 dsize = ((LPHELPWININFO)dwData)->wStructSize;
1106 break;
1107
1108 default:
1109 //WARN("Unknown help command %d\n",wCommand);
1110 return FALSE;
1111 }
1112 if(lpszHelp)
1113 nlen = strlen(lpszHelp)+1;
1114 else
1115 nlen = 0;
1116 size = sizeof(WINHELP) + nlen + dsize;
1117 hwh = GlobalAlloc(0,size);
1118 lpwh = (WINHELP*)GlobalLock(hwh);
1119 lpwh->size = size;
1120 lpwh->command = uCommand;
1121 lpwh->data = dwData;
1122 if(nlen)
1123 {
1124 strcpy(((char*)lpwh) + sizeof(WINHELP),lpszHelp);
1125 lpwh->ofsFilename = sizeof(WINHELP);
1126 } else
1127 lpwh->ofsFilename = 0;
1128 if(dsize)
1129 {
1130 memcpy(((char*)lpwh)+sizeof(WINHELP)+nlen,(LPSTR)dwData,dsize);
1131 lpwh->ofsData = sizeof(WINHELP)+nlen;
1132 } else
1133 lpwh->ofsData = 0;
1134 GlobalUnlock(hwh);
1135
1136 return SendMessageA(hDest,WM_WINHELP,hwnd,hwh);
1137}
1138//******************************************************************************
1139//******************************************************************************
1140BOOL WIN32API WinHelpW( HWND hwnd, LPCWSTR lpszHelp, UINT uCommand, DWORD dwData)
1141{
1142 char *astring = UnicodeToAsciiString((LPWSTR)lpszHelp);
1143 BOOL rc;
1144
1145 dprintf(("USER32: WinHelpW\n"));
1146
1147 rc = WinHelpA(hwnd,astring,uCommand,dwData);
1148 FreeAsciiString(astring);
1149
1150 return rc;
1151}
1152
1153/* Keyboard and Input Functions */
1154
1155BOOL WIN32API ActivateKeyboardLayout(HKL hkl, UINT fuFlags)
1156{
1157 dprintf(("USER32: ActivateKeyboardLayout, not implemented\n"));
1158 return(TRUE);
1159}
1160/*****************************************************************************
1161 * Name : UINT WIN32API GetKBCodePage
1162 * Purpose : The GetKBCodePage function is provided for compatibility with
1163 * earlier versions of Windows. In the Win32 application programming
1164 * interface (API) it just calls the GetOEMCP function.
1165 * Parameters:
1166 * Variables :
1167 * Result : If the function succeeds, the return value is an OEM code-page
1168 * identifier, or it is the default identifier if the registry
1169 * value is not readable. For a list of OEM code-page identifiers,
1170 * see GetOEMCP.
1171 * Remark :
1172 * Status : COMPLETELY IMPLEMENTED UNTESTED
1173 *
1174 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
1175 *****************************************************************************/
1176
1177UINT WIN32API GetKBCodePage(VOID)
1178{
1179 return (GetOEMCP());
1180}
1181//******************************************************************************
1182//******************************************************************************
1183int WIN32API GetKeyNameTextA( LPARAM lParam, LPSTR lpString, int nSize)
1184{
1185 dprintf(("USER32: GetKeyNameTextA\n"));
1186 return O32_GetKeyNameText(lParam,lpString,nSize);
1187}
1188//******************************************************************************
1189//******************************************************************************
1190int WIN32API GetKeyNameTextW( LPARAM lParam, LPWSTR lpString, int nSize)
1191{
1192 dprintf(("USER32: GetKeyNameTextW DOES NOT WORK\n"));
1193 // NOTE: This will not work as is (needs UNICODE support)
1194 return 0;
1195// return O32_GetKeyNameText(arg1, arg2, arg3);
1196}
1197//******************************************************************************
1198//******************************************************************************
1199SHORT WIN32API GetKeyState( int nVirtKey)
1200{
1201 dprintf2(("USER32: GetKeyState %x", nVirtKey));
1202 return O32_GetKeyState(nVirtKey);
1203}
1204//******************************************************************************
1205//******************************************************************************
1206WORD WIN32API GetAsyncKeyState(INT nVirtKey)
1207{
1208 dprintf2(("USER32: GetAsyncKeyState %x", nVirtKey));
1209 return O32_GetAsyncKeyState(nVirtKey);
1210}
1211
1212/*****************************************************************************
1213 * Name : VOID WIN32API keybd_event
1214 * Purpose : The keybd_event function synthesizes a keystroke. The system
1215 * can use such a synthesized keystroke to generate a WM_KEYUP or
1216 * WM_KEYDOWN message. The keyboard driver's interrupt handler calls
1217 * the keybd_event function.
1218 * Parameters: BYTE bVk virtual-key code
1219
1220 * BYTE bScan hardware scan code
1221 * DWORD dwFlags flags specifying various function options
1222 * DWORD dwExtraInfo additional data associated with keystroke
1223 * Variables :
1224 * Result :
1225 * Remark :
1226 * Status : UNTESTED STUB
1227 *
1228 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
1229 *****************************************************************************/
1230VOID WIN32API keybd_event (BYTE bVk,
1231 BYTE bScan,
1232 DWORD dwFlags,
1233 DWORD dwExtraInfo)
1234{
1235 dprintf(("USER32:keybd_event (%u,%u,%08xh,%08x) not implemented.\n",
1236 bVk,
1237 bScan,
1238 dwFlags,
1239 dwExtraInfo));
1240}
1241/*****************************************************************************
1242 * Name : HLK WIN32API LoadKeyboardLayoutA
1243 * Purpose : The LoadKeyboardLayout function loads a new keyboard layout into
1244 * the system. Several keyboard layouts can be loaded at a time, but
1245 * only one per process is active at a time. Loading multiple keyboard
1246 * layouts makes it possible to rapidly switch between layouts.
1247 * Parameters:
1248 * Variables :
1249 * Result : If the function succeeds, the return value is the handle of the
1250 * keyboard layout.
1251 * If the function fails, the return value is NULL. To get extended
1252 * error information, call GetLastError.
1253 * Remark :
1254 * Status : UNTESTED STUB
1255 *
1256 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
1257 *****************************************************************************/
1258HKL WIN32API LoadKeyboardLayoutA(LPCTSTR pwszKLID,
1259 UINT Flags)
1260{
1261 dprintf(("USER32:LeadKeyboardLayoutA (%s,%u) not implemented.\n",
1262 pwszKLID,
1263 Flags));
1264
1265 return (NULL);
1266}
1267/*****************************************************************************
1268 * Name : HLK WIN32API LoadKeyboardLayoutW
1269 * Purpose : The LoadKeyboardLayout function loads a new keyboard layout into
1270 * the system. Several keyboard layouts can be loaded at a time, but
1271 * only one per process is active at a time. Loading multiple keyboard
1272 * layouts makes it possible to rapidly switch between layouts.
1273 * Parameters:
1274 * Variables :
1275 * Result : If the function succeeds, the return value is the handle of the
1276 * keyboard layout.
1277 * If the function fails, the return value is NULL. To get extended
1278 * error information, call GetLastError.
1279 * Remark :
1280 * Status : UNTESTED STUB
1281 *
1282 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
1283 *****************************************************************************/
1284HKL WIN32API LoadKeyboardLayoutW(LPCWSTR pwszKLID,
1285 UINT Flags)
1286{
1287 dprintf(("USER32:LeadKeyboardLayoutW (%s,%u) not implemented.\n",
1288 pwszKLID,
1289 Flags));
1290
1291 return (NULL);
1292}
1293//******************************************************************************
1294//******************************************************************************
1295UINT WIN32API MapVirtualKeyA( UINT uCode, UINT uMapType)
1296{
1297 dprintf(("USER32: MapVirtualKeyA\n"));
1298 /* A quick fix for Commandos, very incomplete */
1299 switch (uMapType) {
1300 case 2:
1301 if (uCode >= VK_A && uCode <= VK_Z) {
1302 return 'A' + uCode - VK_A;
1303 }
1304 break;
1305 }
1306 return O32_MapVirtualKey(uCode,uMapType);
1307}
1308//******************************************************************************
1309//******************************************************************************
1310UINT WIN32API MapVirtualKeyW( UINT uCode, UINT uMapType)
1311{
1312 dprintf(("USER32: MapVirtualKeyW\n"));
1313 // NOTE: This will not work as is (needs UNICODE support)
1314 return O32_MapVirtualKey(uCode,uMapType);
1315}
1316/*****************************************************************************
1317 * Name : UINT WIN32API MapVirtualKeyExA
1318 * Purpose : The MapVirtualKeyEx function translates (maps) a virtual-key
1319 * code into a scan code or character value, or translates a scan
1320 * code into a virtual-key code. The function translates the codes
1321 * using the input language and physical keyboard layout identified
1322 * by the given keyboard layout handle.
1323 * Parameters:
1324 * Variables :
1325 * Result : The return value is either a scan code, a virtual-key code, or
1326 * a character value, depending on the value of uCode and uMapType.
1327 * If there is no translation, the return value is zero.
1328 * Remark :
1329 * Status : UNTESTED STUB
1330 *
1331 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
1332 *****************************************************************************/
1333UINT WIN32API MapVirtualKeyExA(UINT uCode,
1334 UINT uMapType,
1335 HKL dwhkl)
1336{
1337 dprintf(("USER32:MapVirtualKeyExA (%u,%u,%08x) not implemented.\n",
1338 uCode,
1339 uMapType,
1340 dwhkl));
1341
1342 return (0);
1343}
1344/*****************************************************************************
1345 * Name : UINT WIN32API MapVirtualKeyExW
1346 * Purpose : The MapVirtualKeyEx function translates (maps) a virtual-key
1347 * code into a scan code or character value, or translates a scan
1348 * code into a virtual-key code. The function translates the codes
1349 * using the input language and physical keyboard layout identified
1350 * by the given keyboard layout handle.
1351 * Parameters:
1352 * Variables :
1353 * Result : The return value is either a scan code, a virtual-key code, or
1354 * a character value, depending on the value of uCode and uMapType.
1355 * If there is no translation, the return value is zero.
1356 * Remark :
1357 * Status : UNTESTED STUB
1358
1359 *
1360 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
1361 *****************************************************************************/
1362UINT WIN32API MapVirtualKeyExW(UINT uCode,
1363 UINT uMapType,
1364 HKL dwhkl)
1365{
1366 dprintf(("USER32:MapVirtualKeyExW (%u,%u,%08x) not implemented.\n",
1367 uCode,
1368 uMapType,
1369 dwhkl));
1370
1371 return (0);
1372}
1373/*****************************************************************************
1374 * Name : DWORD WIN32API OemKeyScan
1375 * Purpose : The OemKeyScan function maps OEM ASCII codes 0 through 0x0FF
1376 * into the OEM scan codes and shift states. The function provides
1377 * information that allows a program to send OEM text to another
1378 * program by simulating keyboard input.
1379 * Parameters:
1380 * Variables :
1381 * Result :
1382 * Remark :
1383 * Status : UNTESTED STUB
1384 *
1385 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
1386 *****************************************************************************/
1387DWORD WIN32API OemKeyScan(WORD wOemChar)
1388{
1389 dprintf(("USER32:OemKeyScan (%u) not implemented.\n",
1390 wOemChar));
1391
1392 return (wOemChar);
1393}
1394//******************************************************************************
1395//******************************************************************************
1396BOOL WIN32API RegisterHotKey(HWND hwnd, int idHotKey, UINT fuModifiers, UINT uVirtKey)
1397{
1398 dprintf(("USER32: RegisterHotKey, not implemented\n"));
1399 hwnd = Win32ToOS2Handle(hwnd);
1400 return(TRUE);
1401}
1402/*****************************************************************************
1403 * Name : int WIN32API ToUnicode
1404 * Purpose : The ToUnicode function translates the specified virtual-key code
1405 * and keyboard state to the corresponding Unicode character or characters.
1406 * Parameters: UINT wVirtKey virtual-key code
1407 * UINT wScanCode scan code
1408 * PBYTE lpKeyState address of key-state array
1409 * LPWSTR pwszBuff buffer for translated key
1410 * int cchBuff size of translated key buffer
1411 * UINT wFlags set of function-conditioning flags
1412 * Variables :
1413 * Result : - 1 The specified virtual key is a dead-key character (accent or
1414 * diacritic). This value is returned regardless of the keyboard
1415 * layout, even if several characters have been typed and are
1416 * stored in the keyboard state. If possible, even with Unicode
1417 * keyboard layouts, the function has written a spacing version of
1418 * the dead-key character to the buffer specified by pwszBuffer.
1419 * For example, the function writes the character SPACING ACUTE
1420 * (0x00B4), rather than the character NON_SPACING ACUTE (0x0301).
1421 * 0 The specified virtual key has no translation for the current
1422 * state of the keyboard. Nothing was written to the buffer
1423 * specified by pwszBuffer.
1424 * 1 One character was written to the buffer specified by pwszBuffer.
1425 * 2 or more Two or more characters were written to the buffer specified by
1426 * pwszBuff. The most common cause for this is that a dead-key
1427 * character (accent or diacritic) stored in the keyboard layout
1428 * could not be combined with the specified virtual key to form a
1429 * single character.
1430 * Remark :
1431 * Status : UNTESTED STUB
1432 *
1433 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
1434 *****************************************************************************/
1435int WIN32API ToUnicode(UINT uVirtKey,
1436 UINT uScanCode,
1437 PBYTE lpKeyState,
1438 LPWSTR pwszBuff,
1439 int cchBuff,
1440 UINT wFlags)
1441{
1442 dprintf(("USER32:ToUnicode (%u,%u,%08xh,%08xh,%u,%08x) not implemented.\n",
1443 uVirtKey,
1444 uScanCode,
1445 lpKeyState,
1446 pwszBuff,
1447 cchBuff,
1448 wFlags));
1449
1450 return (0);
1451}
1452/*****************************************************************************
1453 * Name : BOOL WIN32API UnloadKeyboardLayout
1454 * Purpose : The UnloadKeyboardLayout function removes a keyboard layout.
1455 * Parameters: HKL hkl handle of keyboard layout
1456 * Variables :
1457 * Result : If the function succeeds, the return value is the handle of the
1458 * keyboard layout; otherwise, it is NULL. To get extended error
1459 * information, use the GetLastError function.
1460 * Remark :
1461 * Status : UNTESTED STUB
1462 *
1463 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
1464 *****************************************************************************/
1465BOOL WIN32API UnloadKeyboardLayout (HKL hkl)
1466{
1467 dprintf(("USER32:UnloadKeyboardLayout (%08x) not implemented.\n",
1468 hkl));
1469
1470 return (0);
1471}
1472//******************************************************************************
1473//******************************************************************************
1474BOOL WIN32API UnregisterHotKey(HWND hwnd, int idHotKey)
1475{
1476 dprintf(("USER32: UnregisterHotKey, not implemented\n"));
1477 hwnd = Win32ToOS2Handle(hwnd);
1478
1479 return(TRUE);
1480}
1481//******************************************************************************
1482//SvL: 24-6-'97 - Added
1483//******************************************************************************
1484WORD WIN32API VkKeyScanA( char ch)
1485{
1486 dprintf(("USER32: VkKeyScanA %x", ch));
1487 return O32_VkKeyScan(ch);
1488}
1489//******************************************************************************
1490//******************************************************************************
1491WORD WIN32API VkKeyScanW( WCHAR wch)
1492{
1493 dprintf(("USER32: VkKeyScanW %x", wch));
1494 // NOTE: This will not work as is (needs UNICODE support)
1495 return O32_VkKeyScan((char)wch);
1496}
1497/*****************************************************************************
1498 * Name : SHORT WIN32API VkKeyScanExW
1499 * Purpose : The VkKeyScanEx function translates a character to the
1500 * corresponding virtual-key code and shift state. The function
1501 * translates the character using the input language and physical
1502 * keyboard layout identified by the given keyboard layout handle.
1503 * Parameters: UINT uChar character to translate
1504 * HKL hkl keyboard layout handle
1505 * Variables :
1506 * Result : see docs
1507 * Remark :
1508 * Status : UNTESTED STUB
1509 *
1510 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
1511 *****************************************************************************/
1512WORD WIN32API VkKeyScanExW(WCHAR uChar,
1513 HKL hkl)
1514{
1515 dprintf(("USER32:VkKeyScanExW (%u,%08x) not implemented.\n",
1516 uChar,
1517 hkl));
1518
1519 return (uChar);
1520}
1521/*****************************************************************************
1522 * Name : SHORT WIN32API VkKeyScanExA
1523 * Purpose : The VkKeyScanEx function translates a character to the
1524 * corresponding virtual-key code and shift state. The function
1525 * translates the character using the input language and physical
1526 * keyboard layout identified by the given keyboard layout handle.
1527 * Parameters: UINT uChar character to translate
1528 * HKL hkl keyboard layout handle
1529 * Variables :
1530 * Result : see docs
1531 * Remark :
1532 * Status : UNTESTED STUB
1533 *
1534 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
1535 *****************************************************************************/
1536WORD WIN32API VkKeyScanExA(CHAR uChar,
1537 HKL hkl)
1538{
1539 dprintf(("USER32:VkKeyScanExA (%u,%08x) not implemented.\n",
1540 uChar,
1541 hkl));
1542
1543 return (uChar);
1544}
1545
1546/* Window Functions */
1547
1548/*****************************************************************************
1549 * Name : BOOL WIN32API AnyPopup
1550 * Purpose : The AnyPopup function indicates whether an owned, visible,
1551 * top-level pop-up, or overlapped window exists on the screen. The
1552 * function searches the entire Windows screen, not just the calling
1553 * application's client area.
1554 * Parameters: VOID
1555 * Variables :
1556 * Result : If a pop-up window exists, the return value is TRUE even if the
1557 * pop-up window is completely covered by other windows. Otherwise,
1558 * it is FALSE.
1559 * Remark : AnyPopup is a Windows version 1.x function and is retained for
1560 * compatibility purposes. It is generally not useful.
1561 * Status : UNTESTED STUB
1562 *
1563 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
1564 *****************************************************************************/
1565BOOL WIN32API AnyPopup(VOID)
1566{
1567 dprintf(("USER32:AnyPopup() not implemented.\n"));
1568
1569 return (FALSE);
1570}
1571
1572/*****************************************************************************
1573 * Name : BOOL WIN32API PaintDesktop
1574 * Purpose : The PaintDesktop function fills the clipping region in the
1575 * specified device context with the desktop pattern or wallpaper.
1576 * The function is provided primarily for shell desktops.
1577 * Parameters:
1578 * Variables :
1579 * Result : If the function succeeds, the return value is TRUE.
1580 * If the function fails, the return value is FALSE.
1581 * Remark :
1582 * Status : UNTESTED STUB
1583 *
1584 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
1585 *****************************************************************************/
1586BOOL WIN32API PaintDesktop(HDC hdc)
1587{
1588 dprintf(("USER32:PaintDesktop (%08x) not implemented.\n",
1589 hdc));
1590
1591 return (FALSE);
1592}
1593
1594/* Filled Shape Functions */
1595
1596
1597int WIN32API FillRect(HDC hDC, const RECT * lprc, HBRUSH hbr)
1598{
1599 dprintf(("USER32: FillRect %x (%d,%d)(%d,%d) brush %X", hDC, lprc->left, lprc->top, lprc->right, lprc->bottom, hbr));
1600 return O32_FillRect(hDC,lprc,hbr);
1601}
1602//******************************************************************************
1603//******************************************************************************
1604int WIN32API FrameRect( HDC hDC, const RECT * lprc, HBRUSH hbr)
1605{
1606 dprintf(("USER32: FrameRect %x (%d,%d)(%d,%d) brush %x", hDC, lprc->top, lprc->left, lprc->bottom, lprc->right, hbr));
1607 return O32_FrameRect(hDC,lprc,hbr);
1608}
1609//******************************************************************************
1610//******************************************************************************
1611BOOL WIN32API InvertRect( HDC hDC, const RECT * lprc)
1612{
1613 dprintf(("USER32: InvertRect %x", hDC));
1614 return O32_InvertRect(hDC,lprc);
1615}
1616
1617/* System Information Functions */
1618
1619/* Window Station and Desktop Functions */
1620
1621/*****************************************************************************
1622 * Name : HDESK WIN32API GetThreadDesktop
1623 * Purpose : The GetThreadDesktop function returns a handle to the desktop
1624 * associated with a specified thread.
1625 * Parameters: DWORD dwThreadId thread identifier
1626 * Variables :
1627 * Result : If the function succeeds, the return value is the handle of the
1628 * desktop associated with the specified thread.
1629 * Remark :
1630 * Status : UNTESTED STUB
1631 *
1632 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
1633 *****************************************************************************/
1634HDESK WIN32API GetThreadDesktop(DWORD dwThreadId)
1635{
1636 dprintf(("USER32:GetThreadDesktop (%u) not implemented.\n",
1637 dwThreadId));
1638
1639 return (NULL);
1640}
1641
1642/*****************************************************************************
1643 * Name : BOOL WIN32API CloseDesktop
1644 * Purpose : The CloseDesktop function closes an open handle of a desktop
1645 * object. A desktop is a secure object contained within a window
1646 * station object. A desktop has a logical display surface and
1647 * contains windows, menus and hooks.
1648 * Parameters: HDESK hDesktop
1649 * Variables :
1650 * Result : If the function succeeds, the return value is TRUE.
1651 * If the functions fails, the return value is FALSE. To get
1652 * extended error information, call GetLastError.
1653 * Remark :
1654 * Status : UNTESTED STUB
1655 *
1656 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
1657 *****************************************************************************/
1658BOOL WIN32API CloseDesktop(HDESK hDesktop)
1659{
1660 dprintf(("USER32:CloseDesktop(%08x) not implemented.\n",
1661 hDesktop));
1662
1663 return (FALSE);
1664}
1665/*****************************************************************************
1666 * Name : BOOL WIN32API CloseWindowStation
1667 * Purpose : The CloseWindowStation function closes an open window station handle.
1668 * Parameters: HWINSTA hWinSta
1669 * Variables :
1670 * Result :
1671 * Remark : If the function succeeds, the return value is TRUE.
1672 * If the functions fails, the return value is FALSE. To get
1673 * extended error information, call GetLastError.
1674 * Status : UNTESTED STUB
1675 *
1676 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
1677 *****************************************************************************/
1678BOOL WIN32API CloseWindowStation(HWINSTA hWinSta)
1679{
1680 dprintf(("USER32:CloseWindowStation(%08x) not implemented.\n",
1681 hWinSta));
1682
1683 return (FALSE);
1684}
1685/*****************************************************************************
1686 * Name : HDESK WIN32API CreateDesktopA
1687 * Purpose : The CreateDesktop function creates a new desktop on the window
1688 * station associated with the calling process.
1689 * Parameters: LPCTSTR lpszDesktop name of the new desktop
1690 * LPCTSTR lpszDevice name of display device to assign to the desktop
1691 * LPDEVMODE pDevMode reserved; must be NULL
1692 * DWORD dwFlags flags to control interaction with other applications
1693 * DWORD dwDesiredAccess specifies access of returned handle
1694 * LPSECURITY_ATTRIBUTES lpsa specifies security attributes of the desktop
1695 * Variables :
1696 * Result : If the function succeeds, the return value is a handle of the
1697 * newly created desktop.
1698 * If the function fails, the return value is NULL. To get extended
1699 * error information, call GetLastError.
1700 * Remark :
1701 * Status : UNTESTED STUB
1702 *
1703 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
1704 *****************************************************************************/
1705HDESK WIN32API CreateDesktopA(LPCTSTR lpszDesktop,
1706 LPCTSTR lpszDevice,
1707 LPDEVMODEA pDevMode,
1708 DWORD dwFlags,
1709 DWORD dwDesiredAccess,
1710 LPSECURITY_ATTRIBUTES lpsa)
1711{
1712 dprintf(("USER32:CreateDesktopA(%s,%s,%08xh,%08xh,%08xh,%08x) not implemented.\n",
1713 lpszDesktop,
1714 lpszDevice,
1715 pDevMode,
1716 dwFlags,
1717 dwDesiredAccess,
1718 lpsa));
1719
1720 return (NULL);
1721}
1722/*****************************************************************************
1723 * Name : HDESK WIN32API CreateDesktopW
1724 * Purpose : The CreateDesktop function creates a new desktop on the window
1725 * station associated with the calling process.
1726 * Parameters: LPCTSTR lpszDesktop name of the new desktop
1727 * LPCTSTR lpszDevice name of display device to assign to the desktop
1728 * LPDEVMODE pDevMode reserved; must be NULL
1729 * DWORD dwFlags flags to control interaction with other applications
1730 * DWORD dwDesiredAccess specifies access of returned handle
1731 * LPSECURITY_ATTRIBUTES lpsa specifies security attributes of the desktop
1732 * Variables :
1733 * Result : If the function succeeds, the return value is a handle of the
1734 * newly created desktop.
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 *****************************************************************************/
1742HDESK WIN32API CreateDesktopW(LPCTSTR lpszDesktop,
1743 LPCTSTR lpszDevice,
1744 LPDEVMODEW pDevMode,
1745 DWORD dwFlags,
1746 DWORD dwDesiredAccess,
1747 LPSECURITY_ATTRIBUTES lpsa)
1748{
1749 dprintf(("USER32:CreateDesktopW(%s,%s,%08xh,%08xh,%08xh,%08x) not implemented.\n",
1750 lpszDesktop,
1751 lpszDevice,
1752 pDevMode,
1753 dwFlags,
1754 dwDesiredAccess,
1755 lpsa));
1756
1757 return (NULL);
1758}
1759/*****************************************************************************
1760 * Name : HWINSTA WIN32API CreateWindowStationA
1761 * Purpose : The CreateWindowStation function creates a window station object.
1762 * It returns a handle that can be used to access the window station.
1763 * A window station is a secure object that contains a set of global
1764 * atoms, a clipboard, and a set of desktop objects.
1765 * Parameters: LPTSTR lpwinsta name of the new window station
1766 * DWORD dwReserved reserved; must be NULL
1767 * DWORD dwDesiredAccess specifies access of returned handle
1768 * LPSECURITY_ATTRIBUTES lpsa specifies security attributes of the window station
1769 * Variables :
1770 * Result : If the function succeeds, the return value is the handle to the
1771 * newly created window station.
1772 * If the function fails, the return value is NULL. To get extended
1773 * error information, call GetLastError.
1774 * Remark :
1775 * Status : UNTESTED STUB
1776 *
1777 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
1778 *****************************************************************************/
1779HWINSTA WIN32API CreateWindowStationA(LPTSTR lpWinSta,
1780 DWORD dwReserved,
1781 DWORD dwDesiredAccess,
1782 LPSECURITY_ATTRIBUTES lpsa)
1783{
1784 dprintf(("USER32:CreateWindowStationA(%s,%08xh,%08xh,%08x) not implemented.\n",
1785 lpWinSta,
1786 dwReserved,
1787 dwDesiredAccess,
1788 lpsa));
1789
1790 return (NULL);
1791}
1792/*****************************************************************************
1793 * Name : HWINSTA WIN32API CreateWindowStationW
1794 * Purpose : The CreateWindowStation function creates a window station object.
1795 * It returns a handle that can be used to access the window station.
1796 * A window station is a secure object that contains a set of global
1797 * atoms, a clipboard, and a set of desktop objects.
1798 * Parameters: LPTSTR lpwinsta name of the new window station
1799 * DWORD dwReserved reserved; must be NULL
1800 * DWORD dwDesiredAccess specifies access of returned handle
1801 * LPSECURITY_ATTRIBUTES lpsa specifies security attributes of the window station
1802 * Variables :
1803 * Result : If the function succeeds, the return value is the handle to the
1804 * newly created window station.
1805 * If the function fails, the return value is NULL. To get extended
1806 * error information, call GetLastError.
1807 * Remark :
1808 * Status : UNTESTED STUB
1809 *
1810 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
1811 *****************************************************************************/
1812HWINSTA WIN32API CreateWindowStationW(LPWSTR lpWinSta,
1813 DWORD dwReserved,
1814 DWORD dwDesiredAccess,
1815 LPSECURITY_ATTRIBUTES lpsa)
1816{
1817 dprintf(("USER32:CreateWindowStationW(%s,%08xh,%08xh,%08x) not implemented.\n",
1818 lpWinSta,
1819 dwReserved,
1820 dwDesiredAccess,
1821 lpsa));
1822
1823 return (NULL);
1824}
1825/*****************************************************************************
1826 * Name : BOOL WIN32API EnumDesktopWindows
1827 * Purpose : The EnumDesktopWindows function enumerates all windows in a
1828 * desktop by passing the handle of each window, in turn, to an
1829 * application-defined callback function.
1830 * Parameters: HDESK hDesktop handle of desktop to enumerate
1831 * WNDENUMPROC lpfn points to application's callback function
1832 * LPARAM lParam 32-bit value to pass to the callback function
1833 * Variables :
1834 * Result : If the function succeeds, the return value is TRUE.
1835 * If the function fails, the return value is FALSE. To get
1836 * extended error information, call GetLastError.
1837 * Remark :
1838 * Status : UNTESTED STUB
1839 *
1840 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
1841 *****************************************************************************/
1842BOOL WIN32API EnumDesktopWindows(HDESK hDesktop,
1843 WNDENUMPROC lpfn,
1844 LPARAM lParam)
1845{
1846 dprintf(("USER32:EnumDesktopWindows (%08xh,%08xh,%08x) not implemented.\n",
1847 hDesktop,
1848 lpfn,
1849 lParam));
1850
1851 return (FALSE);
1852}
1853/*****************************************************************************
1854 * Name : BOOL WIN32API EnumDesktopsA
1855 * Purpose : The EnumDesktops function enumerates all desktops in the window
1856 * station assigned to the calling process. The function does so by
1857 * passing the name of each desktop, in turn, to an application-
1858 * defined callback function.
1859 * Parameters: HWINSTA hwinsta handle of window station to enumerate
1860 * DESKTOPENUMPROC lpEnumFunc points to application's callback function
1861 * LPARAM lParam 32-bit value to pass to the callback function
1862 * Variables :
1863 * Result : If the function succeeds, the return value is TRUE.
1864 * If the function fails, the return value is FALSE. To get extended
1865 * error information, call GetLastError.
1866 * Remark :
1867 * Status : UNTESTED STUB
1868 *
1869 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
1870 *****************************************************************************/
1871BOOL WIN32API EnumDesktopsA(HWINSTA hWinSta,
1872 DESKTOPENUMPROCA lpEnumFunc,
1873 LPARAM lParam)
1874{
1875 dprintf(("USER32:EnumDesktopsA (%08xh,%08xh,%08x) not implemented.\n",
1876 hWinSta,
1877 lpEnumFunc,
1878 lParam));
1879
1880 return (FALSE);
1881}
1882/*****************************************************************************
1883 * Name : BOOL WIN32API EnumDesktopsW
1884 * Purpose : The EnumDesktops function enumerates all desktops in the window
1885 * station assigned to the calling process. The function does so by
1886 * passing the name of each desktop, in turn, to an application-
1887 * defined callback function.
1888 * Parameters: HWINSTA hwinsta handle of window station to enumerate
1889 * DESKTOPENUMPROC lpEnumFunc points to application's callback function
1890 * LPARAM lParam 32-bit value to pass to the callback function
1891 * Variables :
1892 * Result : If the function succeeds, the return value is TRUE.
1893 * If the function fails, the return value is FALSE. To get extended
1894 * error information, call GetLastError.
1895 * Remark :
1896 * Status : UNTESTED STUB
1897 *
1898 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
1899 *****************************************************************************/
1900BOOL WIN32API EnumDesktopsW(HWINSTA hWinSta,
1901 DESKTOPENUMPROCW lpEnumFunc,
1902 LPARAM lParam)
1903{
1904 dprintf(("USER32:EnumDesktopsW (%08xh,%08xh,%08x) not implemented.\n",
1905 hWinSta,
1906 lpEnumFunc,
1907 lParam));
1908
1909 return (FALSE);
1910}
1911/*****************************************************************************
1912 * Name : BOOL WIN32API EnumWindowStationsA
1913 * Purpose : The EnumWindowStations function enumerates all windowstations
1914 * in the system by passing the name of each window station, in
1915 * turn, to an application-defined callback function.
1916 * Parameters:
1917 * Variables : WINSTAENUMPROC lpEnumFunc points to application's callback function
1918 * LPARAM lParam 32-bit value to pass to the callback function
1919 * Result : If the function succeeds, the return value is TRUE.
1920 * If the function fails the return value is FALSE. To get extended
1921 * error information, call GetLastError.
1922 * Remark :
1923 * Status : UNTESTED STUB
1924 *
1925 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
1926 *****************************************************************************/
1927BOOL WIN32API EnumWindowStationsA(WINSTAENUMPROCA lpEnumFunc,
1928 LPARAM lParam)
1929{
1930 dprintf(("USER32:EnumWindowStationsA (%08xh,%08x) not implemented.\n",
1931 lpEnumFunc,
1932 lParam));
1933
1934 return (FALSE);
1935}
1936/*****************************************************************************
1937 * Name : BOOL WIN32API EnumWindowStationsW
1938 * Purpose : The EnumWindowStations function enumerates all windowstations
1939 * in the system by passing the name of each window station, in
1940 * turn, to an application-defined callback function.
1941 * Parameters:
1942 * Variables : WINSTAENUMPROC lpEnumFunc points to application's callback function
1943 * LPARAM lParam 32-bit value to pass to the callback function
1944 * Result : If the function succeeds, the return value is TRUE.
1945 * If the function fails the return value is FALSE. To get extended
1946 * error information, call GetLastError.
1947 * Remark :
1948 * Status : UNTESTED STUB
1949 *
1950 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
1951 *****************************************************************************/
1952BOOL WIN32API EnumWindowStationsW(WINSTAENUMPROCW lpEnumFunc,
1953 LPARAM lParam)
1954{
1955 dprintf(("USER32:EnumWindowStationsW (%08xh,%08x) not implemented.\n",
1956 lpEnumFunc,
1957 lParam));
1958
1959 return (FALSE);
1960}
1961/*****************************************************************************
1962 * Name : HWINSTA WIN32API GetProcessWindowStation
1963 * Purpose : The GetProcessWindowStation function returns a handle of the
1964 * window station associated with the calling process.
1965 * Parameters:
1966 * Variables :
1967 * Result : If the function succeeds, the return value is a handle of the
1968 * window station associated with the calling process.
1969 * If the function fails, the return value is NULL. This can occur
1970 * if the calling process is not an application written for Windows
1971 * NT. To get extended error information, call GetLastError.
1972 * Remark :
1973 * Status : UNTESTED STUB
1974 *
1975 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
1976 *****************************************************************************/
1977HWINSTA WIN32API GetProcessWindowStation(VOID)
1978{
1979 dprintf(("USER32:GetProcessWindowStation () not implemented.\n"));
1980
1981 return (NULL);
1982}
1983/*****************************************************************************
1984 * Name : BOOL WIN32API GetUserObjectInformationA
1985 * Purpose : The GetUserObjectInformation function returns information about
1986 * a window station or desktop object.
1987 * Parameters: HANDLE hObj handle of object to get information for
1988 * int nIndex type of information to get
1989 * PVOID pvInfo points to buffer that receives the information
1990 * DWORD nLength size, in bytes, of pvInfo buffer
1991 * LPDWORD lpnLengthNeeded receives required size, in bytes, of pvInfo buffer
1992 * Variables :
1993 * Result : If the function succeeds, the return value is TRUE.
1994 * If the function fails, the return value is FALSE. To get extended
1995 * error information, call GetLastError.
1996 * Remark :
1997 * Status : UNTESTED STUB
1998 *
1999 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
2000 *****************************************************************************/
2001BOOL WIN32API GetUserObjectInformationA(HANDLE hObj,
2002 int nIndex,
2003 PVOID pvInfo,
2004 DWORD nLength,
2005 LPDWORD lpnLengthNeeded)
2006{
2007 dprintf(("USER32:GetUserObjectInformationA (%08xh,%08xh,%08xh,%u,%08x) not implemented.\n",
2008 hObj,
2009 nIndex,
2010 pvInfo,
2011 nLength,
2012 lpnLengthNeeded));
2013
2014 return (FALSE);
2015}
2016/*****************************************************************************
2017 * Name : BOOL WIN32API GetUserObjectInformationW
2018 * Purpose : The GetUserObjectInformation function returns information about
2019 * a window station or desktop object.
2020 * Parameters: HANDLE hObj handle of object to get information for
2021 * int nIndex type of information to get
2022 * PVOID pvInfo points to buffer that receives the information
2023 * DWORD nLength size, in bytes, of pvInfo buffer
2024 * LPDWORD lpnLengthNeeded receives required size, in bytes, of pvInfo buffer
2025 * Variables :
2026 * Result : If the function succeeds, the return value is TRUE.
2027 * If the function fails, the return value is FALSE. To get extended
2028 * error information, call GetLastError.
2029 * Remark :
2030 * Status : UNTESTED STUB
2031 *
2032 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
2033 *****************************************************************************/
2034BOOL WIN32API GetUserObjectInformationW(HANDLE hObj,
2035 int nIndex,
2036 PVOID pvInfo,
2037 DWORD nLength,
2038 LPDWORD lpnLengthNeeded)
2039{
2040 dprintf(("USER32:GetUserObjectInformationW (%08xh,%08xh,%08xh,%u,%08x) not implemented.\n",
2041 hObj,
2042 nIndex,
2043 pvInfo,
2044 nLength,
2045 lpnLengthNeeded));
2046
2047 return (FALSE);
2048}
2049/*****************************************************************************
2050 * Name : BOOL WIN32API GetUserObjectSecurity
2051 * Purpose : The GetUserObjectSecurity function retrieves security information
2052 * for the specified user object.
2053 * Parameters: HANDLE hObj handle of user object
2054 * SECURITY_INFORMATION * pSIRequested address of requested security information
2055 * LPSECURITY_DESCRIPTOR pSID address of security descriptor
2056 * DWORD nLength size of buffer for security descriptor
2057 * LPDWORD lpnLengthNeeded address of required size of buffer
2058 * Variables :
2059 * Result : If the function succeeds, the return value is TRUE.
2060 * If the function fails, the return value is FALSE. To get extended
2061 * error information, call GetLastError.
2062 * Remark :
2063 * Status : UNTESTED STUB
2064 *
2065 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
2066 *****************************************************************************/
2067BOOL WIN32API GetUserObjectSecurity(HANDLE hObj,
2068 PSECURITY_INFORMATION pSIRequested,
2069 PSECURITY_DESCRIPTOR pSID,
2070 DWORD nLength,
2071 LPDWORD lpnLengthNeeded)
2072{
2073 dprintf(("USER32:GetUserObjectSecurity (%08xh,%08xh,%08xh,%u,%08x) not implemented.\n",
2074 hObj,
2075 pSIRequested,
2076 pSID,
2077 nLength,
2078 lpnLengthNeeded));
2079
2080 return (FALSE);
2081}
2082/*****************************************************************************
2083 * Name : HDESK WIN32API OpenDesktopA
2084 * Purpose : The OpenDesktop function returns a handle to an existing desktop.
2085 * A desktop is a secure object contained within a window station
2086 * object. A desktop has a logical display surface and contains
2087 * windows, menus and hooks.
2088 * Parameters: LPCTSTR lpszDesktopName name of the desktop to open
2089 * DWORD dwFlags flags to control interaction with other applications
2090 * BOOL fInherit specifies whether returned handle is inheritable
2091 * DWORD dwDesiredAccess specifies access of returned handle
2092 * Variables :
2093 * Result : If the function succeeds, the return value is the handle to the
2094 * opened desktop.
2095 * If the function fails, the return value is NULL. To get extended
2096 * error information, call GetLastError.
2097 * Remark :
2098 * Status : UNTESTED STUB
2099 *
2100 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
2101 *****************************************************************************/
2102HDESK WIN32API OpenDesktopA(LPCTSTR lpszDesktopName,
2103 DWORD dwFlags,
2104 BOOL fInherit,
2105 DWORD dwDesiredAccess)
2106{
2107 dprintf(("USER32:OpenDesktopA (%s,%08xh,%08xh,%08x) not implemented.\n",
2108 lpszDesktopName,
2109 dwFlags,
2110 fInherit,
2111 dwDesiredAccess));
2112
2113 return (NULL);
2114}
2115/*****************************************************************************
2116 * Name : HDESK WIN32API OpenDesktopW
2117 * Purpose : The OpenDesktop function returns a handle to an existing desktop.
2118 * A desktop is a secure object contained within a window station
2119 * object. A desktop has a logical display surface and contains
2120 * windows, menus and hooks.
2121 * Parameters: LPCTSTR lpszDesktopName name of the desktop to open
2122 * DWORD dwFlags flags to control interaction with other applications
2123 * BOOL fInherit specifies whether returned handle is inheritable
2124 * DWORD dwDesiredAccess specifies access of returned handle
2125 * Variables :
2126 * Result : If the function succeeds, the return value is the handle to the
2127 * opened desktop.
2128 * If the function fails, the return value is NULL. To get extended
2129 * error information, call GetLastError.
2130 * Remark :
2131 * Status : UNTESTED STUB
2132 *
2133 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
2134 *****************************************************************************/
2135HDESK WIN32API OpenDesktopW(LPCTSTR lpszDesktopName,
2136 DWORD dwFlags,
2137 BOOL fInherit,
2138 DWORD dwDesiredAccess)
2139{
2140 dprintf(("USER32:OpenDesktopW (%s,%08xh,%08xh,%08x) not implemented.\n",
2141 lpszDesktopName,
2142 dwFlags,
2143 fInherit,
2144 dwDesiredAccess));
2145
2146 return (NULL);
2147}
2148/*****************************************************************************
2149 * Name : HDESK WIN32API OpenInputDesktop
2150 * Purpose : The OpenInputDesktop function returns a handle to the desktop
2151 * that receives user input. The input desktop is a desktop on the
2152 * window station associated with the logged-on user.
2153 * Parameters: DWORD dwFlags flags to control interaction with other applications
2154 * BOOL fInherit specifies whether returned handle is inheritable
2155 * DWORD dwDesiredAccess specifies access of returned handle
2156 * Variables :
2157 * Result : If the function succeeds, the return value is a handle of the
2158 * desktop that receives user input.
2159 * If the function fails, the return value is NULL. To get extended
2160 * error information, call GetLastError.
2161 * Remark :
2162 * Status : UNTESTED STUB
2163 *
2164 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
2165 *****************************************************************************/
2166HDESK WIN32API OpenInputDesktop(DWORD dwFlags,
2167 BOOL fInherit,
2168 DWORD dwDesiredAccess)
2169{
2170 dprintf(("USER32:OpenInputDesktop (%08xh,%08xh,%08x) not implemented.\n",
2171 dwFlags,
2172 fInherit,
2173 dwDesiredAccess));
2174
2175 return (NULL);
2176}
2177/*****************************************************************************
2178 * Name : HWINSTA WIN32API OpenWindowStationA
2179 * Purpose : The OpenWindowStation function returns a handle to an existing
2180 * window station.
2181 * Parameters: LPCTSTR lpszWinStaName name of the window station to open
2182 * BOOL fInherit specifies whether returned handle is inheritable
2183 * DWORD dwDesiredAccess specifies access of returned handle
2184 * Variables :
2185 * Result : If the function succeeds, the return value is the handle to the
2186 * specified window station.
2187 * If the function fails, the return value is NULL. To get extended
2188 * error information, call GetLastError.
2189 * Remark :
2190 * Status : UNTESTED STUB
2191 *
2192 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
2193 *****************************************************************************/
2194HWINSTA WIN32API OpenWindowStationA(LPCTSTR lpszWinStaName,
2195 BOOL fInherit,
2196 DWORD dwDesiredAccess)
2197{
2198 dprintf(("USER32:OpenWindowStatieonA (%s,%08xh,%08x) not implemented.\n",
2199 lpszWinStaName,
2200 fInherit,
2201 dwDesiredAccess));
2202
2203 return (NULL);
2204}
2205/*****************************************************************************
2206 * Name : HWINSTA WIN32API OpenWindowStationW
2207 * Purpose : The OpenWindowStation function returns a handle to an existing
2208 * window station.
2209 * Parameters: LPCTSTR lpszWinStaName name of the window station to open
2210 * BOOL fInherit specifies whether returned handle is inheritable
2211 * DWORD dwDesiredAccess specifies access of returned handle
2212 * Variables :
2213 * Result : If the function succeeds, the return value is the handle to the
2214 * specified window station.
2215 * If the function fails, the return value is NULL. To get extended
2216 * error information, call GetLastError.
2217
2218
2219 * Remark :
2220 * Status : UNTESTED STUB
2221 *
2222 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
2223 *****************************************************************************/
2224HWINSTA WIN32API OpenWindowStationW(LPCTSTR lpszWinStaName,
2225 BOOL fInherit,
2226 DWORD dwDesiredAccess)
2227{
2228 dprintf(("USER32:OpenWindowStatieonW (%s,%08xh,%08x) not implemented.\n",
2229 lpszWinStaName,
2230 fInherit,
2231 dwDesiredAccess));
2232
2233 return (NULL);
2234}
2235/*****************************************************************************
2236 * Name : BOOL WIN32API SetProcessWindowStation
2237 * Purpose : The SetProcessWindowStation function assigns a window station
2238 * to the calling process. This enables the process to access
2239 * objects in the window station such as desktops, the clipboard,
2240 * and global atoms. All subsequent operations on the window station
2241 * use the access rights granted to hWinSta.
2242 * Parameters:
2243 * Variables :
2244 * Result : If the function succeeds, the return value is TRUE.
2245 * If the function fails, the return value is FALSE. To get extended
2246 * error information, call GetLastError.
2247 * Remark :
2248 * Status : UNTESTED STUB
2249 *
2250 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
2251 *****************************************************************************/
2252BOOL WIN32API SetProcessWindowStation(HWINSTA hWinSta)
2253{
2254 dprintf(("USER32:SetProcessWindowStation (%08x) not implemented.\n",
2255 hWinSta));
2256
2257 return (FALSE);
2258}
2259/*****************************************************************************
2260 * Name : BOOL WIN32API SetThreadDesktop
2261 * Purpose : The SetThreadDesktop function assigns a desktop to the calling
2262 * thread. All subsequent operations on the desktop use the access
2263 * rights granted to hDesk.
2264 * Parameters: HDESK hDesk handle of the desktop to assign to this thread
2265 * Variables :
2266 * Result : If the function succeeds, the return value is TRUE.
2267 * If the function fails, the return value is FALSE. To get extended
2268 * error information, call GetLastError.
2269 * Remark :
2270 * Status : UNTESTED STUB
2271 *
2272 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
2273 *****************************************************************************/
2274BOOL WIN32API SetThreadDesktop(HDESK hDesktop)
2275{
2276 dprintf(("USER32:SetThreadDesktop (%08x) not implemented.\n",
2277 hDesktop));
2278
2279 return (FALSE);
2280}
2281/*****************************************************************************
2282 * Name : BOOL WIN32API SetUserObjectInformationA
2283 * Purpose : The SetUserObjectInformation function sets information about a
2284 * window station or desktop object.
2285 * Parameters: HANDLE hObject handle of the object for which to set information
2286 * int nIndex type of information to set
2287 * PVOID lpvInfo points to a buffer that contains the information
2288 * DWORD cbInfo size, in bytes, of lpvInfo buffer
2289 * Variables :
2290 * Result : If the function succeeds, the return value is TRUE.
2291 * If the function fails the return value is FALSE. To get extended
2292 * error information, call GetLastError.
2293 * Remark :
2294 * Status : UNTESTED STUB
2295 *
2296 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
2297 *****************************************************************************/
2298BOOL WIN32API SetUserObjectInformationA(HANDLE hObject,
2299 int nIndex,
2300 PVOID lpvInfo,
2301 DWORD cbInfo)
2302{
2303 dprintf(("USER32:SetUserObjectInformationA (%08xh,%u,%08xh,%08x) not implemented.\n",
2304 hObject,
2305 nIndex,
2306 lpvInfo,
2307 cbInfo));
2308
2309 return (FALSE);
2310}
2311/*****************************************************************************
2312 * Name : BOOL WIN32API SetUserObjectInformationW
2313 * Purpose : The SetUserObjectInformation function sets information about a
2314 * window station or desktop object.
2315 * Parameters: HANDLE hObject handle of the object for which to set information
2316 * int nIndex type of information to set
2317 * PVOID lpvInfo points to a buffer that contains the information
2318 * DWORD cbInfo size, in bytes, of lpvInfo buffer
2319 * Variables :
2320 * Result : If the function succeeds, the return value is TRUE.
2321 * If the function fails the return value is FALSE. To get extended
2322 * error information, call GetLastError.
2323 * Remark :
2324 * Status : UNTESTED STUB
2325 *
2326 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
2327 *****************************************************************************/
2328BOOL WIN32API SetUserObjectInformationW(HANDLE hObject,
2329 int nIndex,
2330 PVOID lpvInfo,
2331 DWORD cbInfo)
2332{
2333 dprintf(("USER32:SetUserObjectInformationW (%08xh,%u,%08xh,%08x) not implemented.\n",
2334 hObject,
2335 nIndex,
2336 lpvInfo,
2337 cbInfo));
2338
2339 return (FALSE);
2340}
2341/*****************************************************************************
2342 * Name : BOOL WIN32API SetUserObjectSecurity
2343 * Purpose : The SetUserObjectSecurity function sets the security of a user
2344 * object. This can be, for example, a window or a DDE conversation
2345 * Parameters: HANDLE hObject handle of user object
2346 * SECURITY_INFORMATION * psi address of security information
2347 * LPSECURITY_DESCRIPTOR psd address of security descriptor
2348 * Variables :
2349 * Result : If the function succeeds, the return value is TRUE.
2350 * If the function fails, the return value is FALSE. To get extended
2351 * error information, call GetLastError.
2352 * Remark :
2353 * Status : UNTESTED STUB
2354 *
2355 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
2356 *****************************************************************************/
2357BOOL WIN32API SetUserObjectSecurity(HANDLE hObject,
2358 PSECURITY_INFORMATION psi,
2359 PSECURITY_DESCRIPTOR psd)
2360{
2361 dprintf(("USER32:SetUserObjectSecuroty (%08xh,%08xh,%08x) not implemented.\n",
2362 hObject,
2363 psi,
2364 psd));
2365
2366 return (FALSE);
2367}
2368/*****************************************************************************
2369 * Name : BOOL WIN32API SwitchDesktop
2370 * Purpose : The SwitchDesktop function makes a desktop visible and activates
2371 * it. This enables the desktop to receive input from the user. The
2372 * calling process must have DESKTOP_SWITCHDESKTOP access to the
2373 * desktop for the SwitchDesktop function to succeed.
2374 * Parameters:
2375 * Variables :
2376 * Result : If the function succeeds, the return value is TRUE.
2377 * If the function fails, the return value is FALSE. To get extended
2378 * error information, call GetLastError.
2379 * Remark :
2380 * Status : UNTESTED STUB
2381 *
2382 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
2383 *****************************************************************************/
2384BOOL WIN32API SwitchDesktop(HDESK hDesktop)
2385{
2386 dprintf(("USER32:SwitchDesktop (%08x) not implemented.\n",
2387 hDesktop));
2388
2389 return (FALSE);
2390}
2391
2392/* Debugging Functions */
2393
2394/*****************************************************************************
2395 * Name : VOID WIN32API SetDebugErrorLevel
2396 * Purpose : The SetDebugErrorLevel function sets the minimum error level at
2397 * which Windows will generate debugging events and pass them to a debugger.
2398 * Parameters: DWORD dwLevel debugging error level
2399 * Variables :
2400 * Result :
2401 * Remark :
2402 * Status : UNTESTED STUB
2403 *
2404 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
2405 *****************************************************************************/
2406VOID WIN32API SetDebugErrorLevel(DWORD dwLevel)
2407{
2408 dprintf(("USER32:SetDebugErrorLevel (%08x) not implemented.\n",
2409 dwLevel));
2410}
2411
2412/* Drag'n'drop */
2413
2414/*****************************************************************************
2415 * Name : BOOL WIN32API DragObject
2416 * Purpose : Unknown
2417 * Parameters: Unknown
2418 * Variables :
2419 * Result :
2420 * Remark :
2421 * Status : UNTESTED UNKNOWN STUB
2422 *
2423 * Author : Patrick Haller [Wed, 1998/06/16 11:55]
2424 *****************************************************************************/
2425DWORD WIN32API DragObject(HWND x1,HWND x2,UINT x3,DWORD x4,HCURSOR x5)
2426{
2427 dprintf(("USER32: DragObject(%08x,%08xh,%08xh,%08xh,%08xh) not implemented.\n",
2428 x1,
2429 x2,
2430 x3,
2431 x4,
2432 x5));
2433
2434 return (FALSE); /* default */
2435}
2436
2437/* Unknown */
2438
2439/*****************************************************************************
2440 * Name : BOOL WIN32API SetShellWindow
2441 * Purpose : Unknown
2442 * Parameters: Unknown
2443 * Variables :
2444 * Result :
2445 * Remark :
2446 * Status : UNTESTED UNKNOWN STUB
2447 *
2448 * Author : Patrick Haller [Wed, 1998/06/16 11:55]
2449 *****************************************************************************/
2450BOOL WIN32API SetShellWindow(DWORD x1)
2451{
2452 dprintf(("USER32: SetShellWindow(%08x) not implemented.\n",
2453 x1));
2454
2455 return (FALSE); /* default */
2456}
2457/*****************************************************************************
2458 * Name : BOOL WIN32API PlaySoundEvent
2459 * Purpose : Unknown
2460 * Parameters: Unknown
2461 * Variables :
2462 * Result :
2463 * Remark :
2464 * Status : UNTESTED UNKNOWN STUB
2465 *
2466 * Author : Patrick Haller [Wed, 1998/06/16 11:55]
2467 *****************************************************************************/
2468BOOL WIN32API PlaySoundEvent(DWORD x1)
2469{
2470 dprintf(("USER32: PlaySoundEvent(%08x) not implemented.\n",
2471 x1));
2472
2473 return (FALSE); /* default */
2474}
2475/*****************************************************************************
2476 * Name : BOOL WIN32API SetSysColorsTemp
2477 * Purpose : Unknown
2478 * Parameters: Unknown
2479 * Variables :
2480 * Result :
2481 * Remark :
2482 * Status : UNTESTED UNKNOWN STUB
2483 *
2484 * Author : Patrick Haller [Wed, 1998/06/16 11:55]
2485 *****************************************************************************/
2486BOOL WIN32API SetSysColorsTemp(void)
2487{
2488 dprintf(("USER32: SetSysColorsTemp() not implemented.\n"));
2489
2490 return (FALSE); /* default */
2491}
2492/*****************************************************************************
2493 * Name : BOOL WIN32API RegisterNetworkCapabilities
2494 * Purpose : Unknown
2495 * Parameters: Unknown
2496 * Variables :
2497 * Result :
2498 * Remark :
2499 * Status : UNTESTED UNKNOWN STUB
2500 *
2501 * Author : Patrick Haller [Wed, 1998/06/16 11:55]
2502 *****************************************************************************/
2503BOOL WIN32API RegisterNetworkCapabilities(DWORD x1,
2504 DWORD x2)
2505{
2506 dprintf(("USER32: RegisterNetworkCapabilities(%08xh,%08xh) not implemented.\n",
2507 x1,
2508 x2));
2509
2510 return (FALSE); /* default */
2511}
2512/*****************************************************************************
2513 * Name : BOOL WIN32API EndTask
2514 * Purpose : Unknown
2515 * Parameters: Unknown
2516 * Variables :
2517 * Result :
2518 * Remark :
2519 * Status : UNTESTED UNKNOWN STUB
2520 *
2521 * Author : Patrick Haller [Wed, 1998/06/16 11:55]
2522 *****************************************************************************/
2523BOOL WIN32API EndTask(DWORD x1,
2524 DWORD x2,
2525 DWORD x3)
2526{
2527 dprintf(("USER32: EndTask(%08xh,%08xh,%08xh) not implemented.\n",
2528 x1,
2529 x2,
2530 x3));
2531
2532 return (FALSE); /* default */
2533}
2534/*****************************************************************************
2535 * Name : BOOL WIN32API GetNextQueueWindow
2536 * Purpose : Unknown
2537 * Parameters: Unknown
2538 * Variables :
2539 * Result :
2540 * Remark :
2541 * Status : UNTESTED UNKNOWN STUB
2542 *
2543 * Author : Patrick Haller [Wed, 1998/06/16 11:55]
2544 *****************************************************************************/
2545BOOL WIN32API GetNextQueueWindow(DWORD x1,
2546 DWORD x2)
2547{
2548 dprintf(("USER32: GetNextQueueWindow(%08xh,%08xh) not implemented.\n",
2549 x1,
2550 x2));
2551
2552 return (FALSE); /* default */
2553}
2554/*****************************************************************************
2555 * Name : BOOL WIN32API YieldTask
2556 * Purpose : Unknown
2557 * Parameters: Unknown
2558 * Variables :
2559 * Result :
2560 * Remark :
2561 * Status : UNTESTED UNKNOWN STUB
2562 *
2563 * Author : Patrick Haller [Wed, 1998/06/16 11:55]
2564 *****************************************************************************/
2565BOOL WIN32API YieldTask(void)
2566{
2567 dprintf(("USER32: YieldTask() not implemented.\n"));
2568
2569 return (FALSE); /* default */
2570}
2571/*****************************************************************************
2572 * Name : BOOL WIN32API WinOldAppHackoMatic
2573 * Purpose : Unknown
2574 * Parameters: Unknown
2575 * Variables :
2576 * Result :
2577 * Remark :
2578 * Status : UNTESTED UNKNOWN STUB
2579 *
2580 * Author : Patrick Haller [Wed, 1998/06/16 11:55]
2581 *****************************************************************************/
2582BOOL WIN32API WinOldAppHackoMatic(DWORD x1)
2583{
2584 dprintf(("USER32: WinOldAppHackoMatic(%08x) not implemented.\n",
2585 x1));
2586
2587 return (FALSE); /* default */
2588}
2589/*****************************************************************************
2590 * Name : BOOL WIN32API RegisterSystemThread
2591 * Purpose : Unknown
2592 * Parameters: Unknown
2593 * Variables :
2594 * Result :
2595 * Remark :
2596 * Status : UNTESTED UNKNOWN STUB
2597 *
2598 * Author : Patrick Haller [Wed, 1998/06/16 11:55]
2599 *****************************************************************************/
2600BOOL WIN32API RegisterSystemThread(DWORD x1,
2601 DWORD x2)
2602{
2603 dprintf(("USER32: RegisterSystemThread(%08xh,%08xh) not implemented.\n",
2604 x1,
2605 x2));
2606
2607 return (FALSE); /* default */
2608}
2609/*****************************************************************************
2610 * Name : BOOL WIN32API IsHungThread
2611 * Purpose : Unknown
2612 * Parameters: Unknown
2613 * Variables :
2614 * Result :
2615 * Remark :
2616 * Status : UNTESTED UNKNOWN STUB
2617 *
2618 * Author : Patrick Haller [Wed, 1998/06/16 11:55]
2619 *****************************************************************************/
2620BOOL WIN32API IsHungThread(DWORD x1)
2621{
2622 dprintf(("USER32: IsHungThread(%08xh) not implemented.\n",
2623 x1));
2624
2625 return (FALSE); /* default */
2626}
2627/*****************************************************************************
2628 * Name : BOOL WIN32API UserSignalProc
2629 * Purpose : Unknown
2630 * Parameters: Unknown
2631 * Variables :
2632 * Result :
2633 * Remark :
2634 * Status : UNTESTED UNKNOWN STUB
2635 *
2636 * Author : Patrick Haller [Wed, 1998/06/16 11:55]
2637 *****************************************************************************/
2638BOOL WIN32API UserSignalProc(DWORD x1,
2639 DWORD x2,
2640 DWORD x3,
2641 DWORD x4)
2642{
2643 dprintf(("USER32: SysErrorBox(%08xh,%08xh,%08xh,%08xh) not implemented.\n",
2644 x1,
2645 x2,
2646 x3,
2647 x4));
2648
2649 return (FALSE); /* default */
2650}
2651/*****************************************************************************
2652 * Name : BOOL WIN32API GetShellWindow
2653 * Purpose : Unknown
2654 * Parameters: Unknown
2655 * Variables :
2656 * Result :
2657 * Remark :
2658 * Status : UNTESTED UNKNOWN STUB
2659 *
2660 * Author : Patrick Haller [Wed, 1998/06/16 11:55]
2661 *****************************************************************************/
2662HWND WIN32API GetShellWindow(void)
2663{
2664 dprintf(("USER32: GetShellWindow() not implemented.\n"));
2665
2666 return (0); /* default */
2667}
2668/***********************************************************************
2669 * RegisterTasklist32 [USER32.436]
2670 */
2671DWORD WIN32API RegisterTasklist (DWORD x)
2672{
2673 dprintf(("USER32: RegisterTasklist(%08xh) not implemented.\n",
2674 x));
2675
2676 return TRUE;
2677}
2678/***********************************************************************
2679 * SetLogonNotifyWindow (USER32.486)
2680 */
2681DWORD WIN32API SetLogonNotifyWindow(HWINSTA hwinsta,HWND hwnd)
2682{
2683 dprintf(("USER32: SetLogonNotifyWindow - empty stub!"));
2684
2685 return 1;
2686}
2687
2688
2689DWORD WIN32API NotifyWinEvent(DWORD arg1, DWORD arg2, DWORD arg3, DWORD arg4)
2690{
2691 dprintf(("USER32: NotifyWinEvent %x %x %x %x - empty stub!!", arg1, arg2, arg3, arg4));
2692
2693 return 0;
2694}
2695
2696DWORD WIN32API UnhookWinEvent(DWORD arg1)
2697{
2698 dprintf(("USER32: UnhookWinEvent %x - empty stub!!", arg1));
2699
2700 return 0;
2701}
2702
2703DWORD WIN32API SetWinEventHook(DWORD arg1, DWORD arg2, DWORD arg3, DWORD arg4, DWORD arg5, DWORD arg6, DWORD arg7)
2704{
2705 dprintf(("USER32: SetWinEventHook %x %x %x %x %x %x %x - empty stub!!", arg1, arg2, arg3, arg4, arg5, arg6, arg7));
2706
2707 return 0;
2708}
Note: See TracBrowser for help on using the repository browser.