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

Last change on this file since 5164 was 5164, checked in by sandervl, 25 years ago

workaround for window origin changes

File size: 99.4 KB
Line 
1/* $Id: user32.cpp,v 1.91 2001-02-18 14:18:39 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//SvL: 24-6-'97 - Added
1162//TODO: Not implemented
1163//******************************************************************************
1164WORD WIN32API GetAsyncKeyState(INT nVirtKey)
1165{
1166 dprintf2(("USER32: GetAsyncKeyState Not implemented\n"));
1167 return 0;
1168}
1169/*****************************************************************************
1170 * Name : UINT WIN32API GetKBCodePage
1171 * Purpose : The GetKBCodePage function is provided for compatibility with
1172 * earlier versions of Windows. In the Win32 application programming
1173 * interface (API) it just calls the GetOEMCP function.
1174 * Parameters:
1175 * Variables :
1176 * Result : If the function succeeds, the return value is an OEM code-page
1177 * identifier, or it is the default identifier if the registry
1178 * value is not readable. For a list of OEM code-page identifiers,
1179 * see GetOEMCP.
1180 * Remark :
1181 * Status : COMPLETELY IMPLEMENTED UNTESTED
1182 *
1183 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
1184 *****************************************************************************/
1185
1186UINT WIN32API GetKBCodePage(VOID)
1187{
1188 return (GetOEMCP());
1189}
1190//******************************************************************************
1191//******************************************************************************
1192int WIN32API GetKeyNameTextA( LPARAM lParam, LPSTR lpString, int nSize)
1193{
1194 dprintf(("USER32: GetKeyNameTextA\n"));
1195 return O32_GetKeyNameText(lParam,lpString,nSize);
1196}
1197//******************************************************************************
1198//******************************************************************************
1199int WIN32API GetKeyNameTextW( LPARAM lParam, LPWSTR lpString, int nSize)
1200{
1201 dprintf(("USER32: GetKeyNameTextW DOES NOT WORK\n"));
1202 // NOTE: This will not work as is (needs UNICODE support)
1203 return 0;
1204// return O32_GetKeyNameText(arg1, arg2, arg3);
1205}
1206//******************************************************************************
1207//SvL: 24-6-'97 - Added
1208//******************************************************************************
1209SHORT WIN32API GetKeyState( int nVirtKey)
1210{
1211 dprintf2(("USER32: GetKeyState %d\n", nVirtKey));
1212 return O32_GetKeyState(nVirtKey);
1213}
1214/*****************************************************************************
1215 * Name : VOID WIN32API keybd_event
1216 * Purpose : The keybd_event function synthesizes a keystroke. The system
1217 * can use such a synthesized keystroke to generate a WM_KEYUP or
1218 * WM_KEYDOWN message. The keyboard driver's interrupt handler calls
1219 * the keybd_event function.
1220 * Parameters: BYTE bVk virtual-key code
1221
1222 * BYTE bScan hardware scan code
1223 * DWORD dwFlags flags specifying various function options
1224 * DWORD dwExtraInfo additional data associated with keystroke
1225 * Variables :
1226 * Result :
1227 * Remark :
1228 * Status : UNTESTED STUB
1229 *
1230 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
1231 *****************************************************************************/
1232VOID WIN32API keybd_event (BYTE bVk,
1233 BYTE bScan,
1234 DWORD dwFlags,
1235 DWORD dwExtraInfo)
1236{
1237 dprintf(("USER32:keybd_event (%u,%u,%08xh,%08x) not implemented.\n",
1238 bVk,
1239 bScan,
1240 dwFlags,
1241 dwExtraInfo));
1242}
1243/*****************************************************************************
1244 * Name : HLK WIN32API LoadKeyboardLayoutA
1245 * Purpose : The LoadKeyboardLayout function loads a new keyboard layout into
1246 * the system. Several keyboard layouts can be loaded at a time, but
1247 * only one per process is active at a time. Loading multiple keyboard
1248 * layouts makes it possible to rapidly switch between layouts.
1249 * Parameters:
1250 * Variables :
1251 * Result : If the function succeeds, the return value is the handle of the
1252 * keyboard layout.
1253 * If the function fails, the return value is NULL. To get extended
1254 * error information, call GetLastError.
1255 * Remark :
1256 * Status : UNTESTED STUB
1257 *
1258 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
1259 *****************************************************************************/
1260HKL WIN32API LoadKeyboardLayoutA(LPCTSTR pwszKLID,
1261 UINT Flags)
1262{
1263 dprintf(("USER32:LeadKeyboardLayoutA (%s,%u) not implemented.\n",
1264 pwszKLID,
1265 Flags));
1266
1267 return (NULL);
1268}
1269/*****************************************************************************
1270 * Name : HLK WIN32API LoadKeyboardLayoutW
1271 * Purpose : The LoadKeyboardLayout function loads a new keyboard layout into
1272 * the system. Several keyboard layouts can be loaded at a time, but
1273 * only one per process is active at a time. Loading multiple keyboard
1274 * layouts makes it possible to rapidly switch between layouts.
1275 * Parameters:
1276 * Variables :
1277 * Result : If the function succeeds, the return value is the handle of the
1278 * keyboard layout.
1279 * If the function fails, the return value is NULL. To get extended
1280 * error information, call GetLastError.
1281 * Remark :
1282 * Status : UNTESTED STUB
1283 *
1284 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
1285 *****************************************************************************/
1286HKL WIN32API LoadKeyboardLayoutW(LPCWSTR pwszKLID,
1287 UINT Flags)
1288{
1289 dprintf(("USER32:LeadKeyboardLayoutW (%s,%u) not implemented.\n",
1290 pwszKLID,
1291 Flags));
1292
1293 return (NULL);
1294}
1295//******************************************************************************
1296//******************************************************************************
1297UINT WIN32API MapVirtualKeyA( UINT uCode, UINT uMapType)
1298{
1299 dprintf(("USER32: MapVirtualKeyA\n"));
1300 /* A quick fix for Commandos, very incomplete */
1301 switch (uMapType) {
1302 case 2:
1303 if (uCode >= VK_A && uCode <= VK_Z) {
1304 return 'A' + uCode - VK_A;
1305 }
1306 break;
1307 }
1308 return O32_MapVirtualKey(uCode,uMapType);
1309}
1310//******************************************************************************
1311//******************************************************************************
1312UINT WIN32API MapVirtualKeyW( UINT uCode, UINT uMapType)
1313{
1314 dprintf(("USER32: MapVirtualKeyW\n"));
1315 // NOTE: This will not work as is (needs UNICODE support)
1316 return O32_MapVirtualKey(uCode,uMapType);
1317}
1318/*****************************************************************************
1319 * Name : UINT WIN32API MapVirtualKeyExA
1320 * Purpose : The MapVirtualKeyEx function translates (maps) a virtual-key
1321 * code into a scan code or character value, or translates a scan
1322 * code into a virtual-key code. The function translates the codes
1323 * using the input language and physical keyboard layout identified
1324 * by the given keyboard layout handle.
1325 * Parameters:
1326 * Variables :
1327 * Result : The return value is either a scan code, a virtual-key code, or
1328 * a character value, depending on the value of uCode and uMapType.
1329 * If there is no translation, the return value is zero.
1330 * Remark :
1331 * Status : UNTESTED STUB
1332 *
1333 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
1334 *****************************************************************************/
1335UINT WIN32API MapVirtualKeyExA(UINT uCode,
1336 UINT uMapType,
1337 HKL dwhkl)
1338{
1339 dprintf(("USER32:MapVirtualKeyExA (%u,%u,%08x) not implemented.\n",
1340 uCode,
1341 uMapType,
1342 dwhkl));
1343
1344 return (0);
1345}
1346/*****************************************************************************
1347 * Name : UINT WIN32API MapVirtualKeyExW
1348 * Purpose : The MapVirtualKeyEx function translates (maps) a virtual-key
1349 * code into a scan code or character value, or translates a scan
1350 * code into a virtual-key code. The function translates the codes
1351 * using the input language and physical keyboard layout identified
1352 * by the given keyboard layout handle.
1353 * Parameters:
1354 * Variables :
1355 * Result : The return value is either a scan code, a virtual-key code, or
1356 * a character value, depending on the value of uCode and uMapType.
1357 * If there is no translation, the return value is zero.
1358 * Remark :
1359 * Status : UNTESTED STUB
1360
1361 *
1362 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
1363 *****************************************************************************/
1364UINT WIN32API MapVirtualKeyExW(UINT uCode,
1365 UINT uMapType,
1366 HKL dwhkl)
1367{
1368 dprintf(("USER32:MapVirtualKeyExW (%u,%u,%08x) not implemented.\n",
1369 uCode,
1370 uMapType,
1371 dwhkl));
1372
1373 return (0);
1374}
1375/*****************************************************************************
1376 * Name : DWORD WIN32API OemKeyScan
1377 * Purpose : The OemKeyScan function maps OEM ASCII codes 0 through 0x0FF
1378 * into the OEM scan codes and shift states. The function provides
1379 * information that allows a program to send OEM text to another
1380 * program by simulating keyboard input.
1381 * Parameters:
1382 * Variables :
1383 * Result :
1384 * Remark :
1385 * Status : UNTESTED STUB
1386 *
1387 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
1388 *****************************************************************************/
1389DWORD WIN32API OemKeyScan(WORD wOemChar)
1390{
1391 dprintf(("USER32:OemKeyScan (%u) not implemented.\n",
1392 wOemChar));
1393
1394 return (wOemChar);
1395}
1396//******************************************************************************
1397//******************************************************************************
1398BOOL WIN32API RegisterHotKey(HWND hwnd, int idHotKey, UINT fuModifiers, UINT uVirtKey)
1399{
1400 dprintf(("USER32: RegisterHotKey, not implemented\n"));
1401 hwnd = Win32ToOS2Handle(hwnd);
1402 return(TRUE);
1403}
1404/*****************************************************************************
1405 * Name : int WIN32API ToUnicode
1406 * Purpose : The ToUnicode function translates the specified virtual-key code
1407 * and keyboard state to the corresponding Unicode character or characters.
1408 * Parameters: UINT wVirtKey virtual-key code
1409 * UINT wScanCode scan code
1410 * PBYTE lpKeyState address of key-state array
1411 * LPWSTR pwszBuff buffer for translated key
1412 * int cchBuff size of translated key buffer
1413 * UINT wFlags set of function-conditioning flags
1414 * Variables :
1415 * Result : - 1 The specified virtual key is a dead-key character (accent or
1416 * diacritic). This value is returned regardless of the keyboard
1417 * layout, even if several characters have been typed and are
1418 * stored in the keyboard state. If possible, even with Unicode
1419 * keyboard layouts, the function has written a spacing version of
1420 * the dead-key character to the buffer specified by pwszBuffer.
1421 * For example, the function writes the character SPACING ACUTE
1422 * (0x00B4), rather than the character NON_SPACING ACUTE (0x0301).
1423 * 0 The specified virtual key has no translation for the current
1424 * state of the keyboard. Nothing was written to the buffer
1425 * specified by pwszBuffer.
1426 * 1 One character was written to the buffer specified by pwszBuffer.
1427 * 2 or more Two or more characters were written to the buffer specified by
1428 * pwszBuff. The most common cause for this is that a dead-key
1429 * character (accent or diacritic) stored in the keyboard layout
1430 * could not be combined with the specified virtual key to form a
1431 * single character.
1432 * Remark :
1433 * Status : UNTESTED STUB
1434 *
1435 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
1436 *****************************************************************************/
1437int WIN32API ToUnicode(UINT uVirtKey,
1438 UINT uScanCode,
1439 PBYTE lpKeyState,
1440 LPWSTR pwszBuff,
1441 int cchBuff,
1442 UINT wFlags)
1443{
1444 dprintf(("USER32:ToUnicode (%u,%u,%08xh,%08xh,%u,%08x) not implemented.\n",
1445 uVirtKey,
1446 uScanCode,
1447 lpKeyState,
1448 pwszBuff,
1449 cchBuff,
1450 wFlags));
1451
1452 return (0);
1453}
1454/*****************************************************************************
1455 * Name : BOOL WIN32API UnloadKeyboardLayout
1456 * Purpose : The UnloadKeyboardLayout function removes a keyboard layout.
1457 * Parameters: HKL hkl handle of keyboard layout
1458 * Variables :
1459 * Result : If the function succeeds, the return value is the handle of the
1460 * keyboard layout; otherwise, it is NULL. To get extended error
1461 * information, use the GetLastError function.
1462 * Remark :
1463 * Status : UNTESTED STUB
1464 *
1465 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
1466 *****************************************************************************/
1467BOOL WIN32API UnloadKeyboardLayout (HKL hkl)
1468{
1469 dprintf(("USER32:UnloadKeyboardLayout (%08x) not implemented.\n",
1470 hkl));
1471
1472 return (0);
1473}
1474//******************************************************************************
1475//******************************************************************************
1476BOOL WIN32API UnregisterHotKey(HWND hwnd, int idHotKey)
1477{
1478 dprintf(("USER32: UnregisterHotKey, not implemented\n"));
1479 hwnd = Win32ToOS2Handle(hwnd);
1480
1481 return(TRUE);
1482}
1483//******************************************************************************
1484//SvL: 24-6-'97 - Added
1485//******************************************************************************
1486WORD WIN32API VkKeyScanA( char ch)
1487{
1488 dprintf(("USER32: VkKeyScanA %x", ch));
1489 return O32_VkKeyScan(ch);
1490}
1491//******************************************************************************
1492//******************************************************************************
1493WORD WIN32API VkKeyScanW( WCHAR wch)
1494{
1495 dprintf(("USER32: VkKeyScanW %x", wch));
1496 // NOTE: This will not work as is (needs UNICODE support)
1497 return O32_VkKeyScan((char)wch);
1498}
1499/*****************************************************************************
1500 * Name : SHORT WIN32API VkKeyScanExW
1501 * Purpose : The VkKeyScanEx function translates a character to the
1502 * corresponding virtual-key code and shift state. The function
1503 * translates the character using the input language and physical
1504 * keyboard layout identified by the given keyboard layout handle.
1505 * Parameters: UINT uChar character to translate
1506 * HKL hkl keyboard layout handle
1507 * Variables :
1508 * Result : see docs
1509 * Remark :
1510 * Status : UNTESTED STUB
1511 *
1512 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
1513 *****************************************************************************/
1514WORD WIN32API VkKeyScanExW(WCHAR uChar,
1515 HKL hkl)
1516{
1517 dprintf(("USER32:VkKeyScanExW (%u,%08x) not implemented.\n",
1518 uChar,
1519 hkl));
1520
1521 return (uChar);
1522}
1523/*****************************************************************************
1524 * Name : SHORT WIN32API VkKeyScanExA
1525 * Purpose : The VkKeyScanEx function translates a character to the
1526 * corresponding virtual-key code and shift state. The function
1527 * translates the character using the input language and physical
1528 * keyboard layout identified by the given keyboard layout handle.
1529 * Parameters: UINT uChar character to translate
1530 * HKL hkl keyboard layout handle
1531 * Variables :
1532 * Result : see docs
1533 * Remark :
1534 * Status : UNTESTED STUB
1535 *
1536 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
1537 *****************************************************************************/
1538WORD WIN32API VkKeyScanExA(CHAR uChar,
1539 HKL hkl)
1540{
1541 dprintf(("USER32:VkKeyScanExA (%u,%08x) not implemented.\n",
1542 uChar,
1543 hkl));
1544
1545 return (uChar);
1546}
1547
1548/* Window Functions */
1549
1550/*****************************************************************************
1551 * Name : BOOL WIN32API AnyPopup
1552 * Purpose : The AnyPopup function indicates whether an owned, visible,
1553 * top-level pop-up, or overlapped window exists on the screen. The
1554 * function searches the entire Windows screen, not just the calling
1555 * application's client area.
1556 * Parameters: VOID
1557 * Variables :
1558 * Result : If a pop-up window exists, the return value is TRUE even if the
1559 * pop-up window is completely covered by other windows. Otherwise,
1560 * it is FALSE.
1561 * Remark : AnyPopup is a Windows version 1.x function and is retained for
1562 * compatibility purposes. It is generally not useful.
1563 * Status : UNTESTED STUB
1564 *
1565 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
1566 *****************************************************************************/
1567BOOL WIN32API AnyPopup(VOID)
1568{
1569 dprintf(("USER32:AnyPopup() not implemented.\n"));
1570
1571 return (FALSE);
1572}
1573
1574/*****************************************************************************
1575 * Name : BOOL WIN32API PaintDesktop
1576 * Purpose : The PaintDesktop function fills the clipping region in the
1577 * specified device context with the desktop pattern or wallpaper.
1578 * The function is provided primarily for shell desktops.
1579 * Parameters:
1580 * Variables :
1581 * Result : If the function succeeds, the return value is TRUE.
1582 * If the function fails, the return value is FALSE.
1583 * Remark :
1584 * Status : UNTESTED STUB
1585 *
1586 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
1587 *****************************************************************************/
1588BOOL WIN32API PaintDesktop(HDC hdc)
1589{
1590 dprintf(("USER32:PaintDesktop (%08x) not implemented.\n",
1591 hdc));
1592
1593 return (FALSE);
1594}
1595
1596/* Filled Shape Functions */
1597
1598
1599int WIN32API FillRect(HDC hDC, const RECT * lprc, HBRUSH hbr)
1600{
1601 dprintf(("USER32: FillRect %x (%d,%d)(%d,%d) brush %X\n", hDC, lprc->left, lprc->top, lprc->right, lprc->bottom, hbr));
1602 return O32_FillRect(hDC,lprc,hbr);
1603}
1604//******************************************************************************
1605//******************************************************************************
1606int WIN32API FrameRect( HDC hDC, const RECT * lprc, HBRUSH hbr)
1607{
1608 dprintf(("USER32: FrameRect %x (%d,%d)(%d,%d) brush %x", hDC, lprc->top, lprc->left, lprc->bottom, lprc->right, hbr));
1609 return O32_FrameRect(hDC,lprc,hbr);
1610}
1611//******************************************************************************
1612//******************************************************************************
1613BOOL WIN32API InvertRect( HDC hDC, const RECT * lprc)
1614{
1615 dprintf(("USER32: InvertRect\n"));
1616 return O32_InvertRect(hDC,lprc);
1617}
1618
1619/* System Information Functions */
1620
1621int WIN32API GetKeyboardType( int nTypeFlag)
1622{
1623 dprintf(("USER32: GetKeyboardType\n"));
1624 return O32_GetKeyboardType(nTypeFlag);
1625}
1626
1627/* Window Station and Desktop Functions */
1628
1629/*****************************************************************************
1630 * Name : HDESK WIN32API GetThreadDesktop
1631 * Purpose : The GetThreadDesktop function returns a handle to the desktop
1632 * associated with a specified thread.
1633 * Parameters: DWORD dwThreadId thread identifier
1634 * Variables :
1635 * Result : If the function succeeds, the return value is the handle of the
1636 * desktop associated with the specified thread.
1637 * Remark :
1638 * Status : UNTESTED STUB
1639 *
1640 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
1641 *****************************************************************************/
1642HDESK WIN32API GetThreadDesktop(DWORD dwThreadId)
1643{
1644 dprintf(("USER32:GetThreadDesktop (%u) not implemented.\n",
1645 dwThreadId));
1646
1647 return (NULL);
1648}
1649
1650/*****************************************************************************
1651 * Name : BOOL WIN32API CloseDesktop
1652 * Purpose : The CloseDesktop function closes an open handle of a desktop
1653 * object. A desktop is a secure object contained within a window
1654 * station object. A desktop has a logical display surface and
1655 * contains windows, menus and hooks.
1656 * Parameters: HDESK hDesktop
1657 * Variables :
1658 * Result : If the function succeeds, the return value is TRUE.
1659 * If the functions fails, the return value is FALSE. To get
1660 * extended error information, call GetLastError.
1661 * Remark :
1662 * Status : UNTESTED STUB
1663 *
1664 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
1665 *****************************************************************************/
1666BOOL WIN32API CloseDesktop(HDESK hDesktop)
1667{
1668 dprintf(("USER32:CloseDesktop(%08x) not implemented.\n",
1669 hDesktop));
1670
1671 return (FALSE);
1672}
1673/*****************************************************************************
1674 * Name : BOOL WIN32API CloseWindowStation
1675 * Purpose : The CloseWindowStation function closes an open window station handle.
1676 * Parameters: HWINSTA hWinSta
1677 * Variables :
1678 * Result :
1679 * Remark : If the function succeeds, the return value is TRUE.
1680 * If the functions fails, the return value is FALSE. To get
1681 * extended error information, call GetLastError.
1682 * Status : UNTESTED STUB
1683 *
1684 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
1685 *****************************************************************************/
1686BOOL WIN32API CloseWindowStation(HWINSTA hWinSta)
1687{
1688 dprintf(("USER32:CloseWindowStation(%08x) not implemented.\n",
1689 hWinSta));
1690
1691 return (FALSE);
1692}
1693/*****************************************************************************
1694 * Name : HDESK WIN32API CreateDesktopA
1695 * Purpose : The CreateDesktop function creates a new desktop on the window
1696 * station associated with the calling process.
1697 * Parameters: LPCTSTR lpszDesktop name of the new desktop
1698 * LPCTSTR lpszDevice name of display device to assign to the desktop
1699 * LPDEVMODE pDevMode reserved; must be NULL
1700 * DWORD dwFlags flags to control interaction with other applications
1701 * DWORD dwDesiredAccess specifies access of returned handle
1702 * LPSECURITY_ATTRIBUTES lpsa specifies security attributes of the desktop
1703 * Variables :
1704 * Result : If the function succeeds, the return value is a handle of the
1705 * newly created desktop.
1706 * If the function fails, the return value is NULL. To get extended
1707 * error information, call GetLastError.
1708 * Remark :
1709 * Status : UNTESTED STUB
1710 *
1711 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
1712 *****************************************************************************/
1713HDESK WIN32API CreateDesktopA(LPCTSTR lpszDesktop,
1714 LPCTSTR lpszDevice,
1715 LPDEVMODEA pDevMode,
1716 DWORD dwFlags,
1717 DWORD dwDesiredAccess,
1718 LPSECURITY_ATTRIBUTES lpsa)
1719{
1720 dprintf(("USER32:CreateDesktopA(%s,%s,%08xh,%08xh,%08xh,%08x) not implemented.\n",
1721 lpszDesktop,
1722 lpszDevice,
1723 pDevMode,
1724 dwFlags,
1725 dwDesiredAccess,
1726 lpsa));
1727
1728 return (NULL);
1729}
1730/*****************************************************************************
1731 * Name : HDESK WIN32API CreateDesktopW
1732 * Purpose : The CreateDesktop function creates a new desktop on the window
1733 * station associated with the calling process.
1734 * Parameters: LPCTSTR lpszDesktop name of the new desktop
1735 * LPCTSTR lpszDevice name of display device to assign to the desktop
1736 * LPDEVMODE pDevMode reserved; must be NULL
1737 * DWORD dwFlags flags to control interaction with other applications
1738 * DWORD dwDesiredAccess specifies access of returned handle
1739 * LPSECURITY_ATTRIBUTES lpsa specifies security attributes of the desktop
1740 * Variables :
1741 * Result : If the function succeeds, the return value is a handle of the
1742 * newly created desktop.
1743 * If the function fails, the return value is NULL. To get extended
1744 * error information, call GetLastError.
1745 * Remark :
1746 * Status : UNTESTED STUB
1747 *
1748 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
1749 *****************************************************************************/
1750HDESK WIN32API CreateDesktopW(LPCTSTR lpszDesktop,
1751 LPCTSTR lpszDevice,
1752 LPDEVMODEW pDevMode,
1753 DWORD dwFlags,
1754 DWORD dwDesiredAccess,
1755 LPSECURITY_ATTRIBUTES lpsa)
1756{
1757 dprintf(("USER32:CreateDesktopW(%s,%s,%08xh,%08xh,%08xh,%08x) not implemented.\n",
1758 lpszDesktop,
1759 lpszDevice,
1760 pDevMode,
1761 dwFlags,
1762 dwDesiredAccess,
1763 lpsa));
1764
1765 return (NULL);
1766}
1767/*****************************************************************************
1768 * Name : HWINSTA WIN32API CreateWindowStationA
1769 * Purpose : The CreateWindowStation function creates a window station object.
1770 * It returns a handle that can be used to access the window station.
1771 * A window station is a secure object that contains a set of global
1772 * atoms, a clipboard, and a set of desktop objects.
1773 * Parameters: LPTSTR lpwinsta name of the new window station
1774 * DWORD dwReserved reserved; must be NULL
1775 * DWORD dwDesiredAccess specifies access of returned handle
1776 * LPSECURITY_ATTRIBUTES lpsa specifies security attributes of the window station
1777 * Variables :
1778 * Result : If the function succeeds, the return value is the handle to the
1779 * newly created window station.
1780 * If the function fails, the return value is NULL. To get extended
1781 * error information, call GetLastError.
1782 * Remark :
1783 * Status : UNTESTED STUB
1784 *
1785 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
1786 *****************************************************************************/
1787HWINSTA WIN32API CreateWindowStationA(LPTSTR lpWinSta,
1788 DWORD dwReserved,
1789 DWORD dwDesiredAccess,
1790 LPSECURITY_ATTRIBUTES lpsa)
1791{
1792 dprintf(("USER32:CreateWindowStationA(%s,%08xh,%08xh,%08x) not implemented.\n",
1793 lpWinSta,
1794 dwReserved,
1795 dwDesiredAccess,
1796 lpsa));
1797
1798 return (NULL);
1799}
1800/*****************************************************************************
1801 * Name : HWINSTA WIN32API CreateWindowStationW
1802 * Purpose : The CreateWindowStation function creates a window station object.
1803 * It returns a handle that can be used to access the window station.
1804 * A window station is a secure object that contains a set of global
1805 * atoms, a clipboard, and a set of desktop objects.
1806 * Parameters: LPTSTR lpwinsta name of the new window station
1807 * DWORD dwReserved reserved; must be NULL
1808 * DWORD dwDesiredAccess specifies access of returned handle
1809 * LPSECURITY_ATTRIBUTES lpsa specifies security attributes of the window station
1810 * Variables :
1811 * Result : If the function succeeds, the return value is the handle to the
1812 * newly created window station.
1813 * If the function fails, the return value is NULL. To get extended
1814 * error information, call GetLastError.
1815 * Remark :
1816 * Status : UNTESTED STUB
1817 *
1818 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
1819 *****************************************************************************/
1820HWINSTA WIN32API CreateWindowStationW(LPWSTR lpWinSta,
1821 DWORD dwReserved,
1822 DWORD dwDesiredAccess,
1823 LPSECURITY_ATTRIBUTES lpsa)
1824{
1825 dprintf(("USER32:CreateWindowStationW(%s,%08xh,%08xh,%08x) not implemented.\n",
1826 lpWinSta,
1827 dwReserved,
1828 dwDesiredAccess,
1829 lpsa));
1830
1831 return (NULL);
1832}
1833/*****************************************************************************
1834 * Name : BOOL WIN32API EnumDesktopWindows
1835 * Purpose : The EnumDesktopWindows function enumerates all windows in a
1836 * desktop by passing the handle of each window, in turn, to an
1837 * application-defined callback function.
1838 * Parameters: HDESK hDesktop handle of desktop to enumerate
1839 * WNDENUMPROC lpfn points to application's callback function
1840 * LPARAM lParam 32-bit value to pass to the callback function
1841 * Variables :
1842 * Result : If the function succeeds, the return value is TRUE.
1843 * If the function fails, the return value is FALSE. To get
1844 * extended error information, call GetLastError.
1845 * Remark :
1846 * Status : UNTESTED STUB
1847 *
1848 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
1849 *****************************************************************************/
1850BOOL WIN32API EnumDesktopWindows(HDESK hDesktop,
1851 WNDENUMPROC lpfn,
1852 LPARAM lParam)
1853{
1854 dprintf(("USER32:EnumDesktopWindows (%08xh,%08xh,%08x) not implemented.\n",
1855 hDesktop,
1856 lpfn,
1857 lParam));
1858
1859 return (FALSE);
1860}
1861/*****************************************************************************
1862 * Name : BOOL WIN32API EnumDesktopsA
1863 * Purpose : The EnumDesktops function enumerates all desktops in the window
1864 * station assigned to the calling process. The function does so by
1865 * passing the name of each desktop, in turn, to an application-
1866 * defined callback function.
1867 * Parameters: HWINSTA hwinsta handle of window station to enumerate
1868 * DESKTOPENUMPROC lpEnumFunc points to application's callback function
1869 * LPARAM lParam 32-bit value to pass to the callback function
1870 * Variables :
1871 * Result : If the function succeeds, the return value is TRUE.
1872 * If the function fails, the return value is FALSE. To get extended
1873 * error information, call GetLastError.
1874 * Remark :
1875 * Status : UNTESTED STUB
1876 *
1877 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
1878 *****************************************************************************/
1879BOOL WIN32API EnumDesktopsA(HWINSTA hWinSta,
1880 DESKTOPENUMPROCA lpEnumFunc,
1881 LPARAM lParam)
1882{
1883 dprintf(("USER32:EnumDesktopsA (%08xh,%08xh,%08x) not implemented.\n",
1884 hWinSta,
1885 lpEnumFunc,
1886 lParam));
1887
1888 return (FALSE);
1889}
1890/*****************************************************************************
1891 * Name : BOOL WIN32API EnumDesktopsW
1892 * Purpose : The EnumDesktops function enumerates all desktops in the window
1893 * station assigned to the calling process. The function does so by
1894 * passing the name of each desktop, in turn, to an application-
1895 * defined callback function.
1896 * Parameters: HWINSTA hwinsta handle of window station to enumerate
1897 * DESKTOPENUMPROC lpEnumFunc points to application's callback function
1898 * LPARAM lParam 32-bit value to pass to the callback function
1899 * Variables :
1900 * Result : If the function succeeds, the return value is TRUE.
1901 * If the function fails, the return value is FALSE. To get extended
1902 * error information, call GetLastError.
1903 * Remark :
1904 * Status : UNTESTED STUB
1905 *
1906 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
1907 *****************************************************************************/
1908BOOL WIN32API EnumDesktopsW(HWINSTA hWinSta,
1909 DESKTOPENUMPROCW lpEnumFunc,
1910 LPARAM lParam)
1911{
1912 dprintf(("USER32:EnumDesktopsW (%08xh,%08xh,%08x) not implemented.\n",
1913 hWinSta,
1914 lpEnumFunc,
1915 lParam));
1916
1917 return (FALSE);
1918}
1919/*****************************************************************************
1920 * Name : BOOL WIN32API EnumWindowStationsA
1921 * Purpose : The EnumWindowStations function enumerates all windowstations
1922 * in the system by passing the name of each window station, in
1923 * turn, to an application-defined callback function.
1924 * Parameters:
1925 * Variables : WINSTAENUMPROC lpEnumFunc points to application's callback function
1926 * LPARAM lParam 32-bit value to pass to the callback function
1927 * Result : If the function succeeds, the return value is TRUE.
1928 * If the function fails the return value is FALSE. To get extended
1929 * error information, call GetLastError.
1930 * Remark :
1931 * Status : UNTESTED STUB
1932 *
1933 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
1934 *****************************************************************************/
1935BOOL WIN32API EnumWindowStationsA(WINSTAENUMPROCA lpEnumFunc,
1936 LPARAM lParam)
1937{
1938 dprintf(("USER32:EnumWindowStationsA (%08xh,%08x) not implemented.\n",
1939 lpEnumFunc,
1940 lParam));
1941
1942 return (FALSE);
1943}
1944/*****************************************************************************
1945 * Name : BOOL WIN32API EnumWindowStationsW
1946 * Purpose : The EnumWindowStations function enumerates all windowstations
1947 * in the system by passing the name of each window station, in
1948 * turn, to an application-defined callback function.
1949 * Parameters:
1950 * Variables : WINSTAENUMPROC lpEnumFunc points to application's callback function
1951 * LPARAM lParam 32-bit value to pass to the callback function
1952 * Result : If the function succeeds, the return value is TRUE.
1953 * If the function fails the return value is FALSE. To get extended
1954 * error information, call GetLastError.
1955 * Remark :
1956 * Status : UNTESTED STUB
1957 *
1958 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
1959 *****************************************************************************/
1960BOOL WIN32API EnumWindowStationsW(WINSTAENUMPROCW lpEnumFunc,
1961 LPARAM lParam)
1962{
1963 dprintf(("USER32:EnumWindowStationsW (%08xh,%08x) not implemented.\n",
1964 lpEnumFunc,
1965 lParam));
1966
1967 return (FALSE);
1968}
1969/*****************************************************************************
1970 * Name : HWINSTA WIN32API GetProcessWindowStation
1971 * Purpose : The GetProcessWindowStation function returns a handle of the
1972 * window station associated with the calling process.
1973 * Parameters:
1974 * Variables :
1975 * Result : If the function succeeds, the return value is a handle of the
1976 * window station associated with the calling process.
1977 * If the function fails, the return value is NULL. This can occur
1978 * if the calling process is not an application written for Windows
1979 * NT. To get extended error information, call GetLastError.
1980 * Remark :
1981 * Status : UNTESTED STUB
1982 *
1983 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
1984 *****************************************************************************/
1985HWINSTA WIN32API GetProcessWindowStation(VOID)
1986{
1987 dprintf(("USER32:GetProcessWindowStation () not implemented.\n"));
1988
1989 return (NULL);
1990}
1991/*****************************************************************************
1992 * Name : BOOL WIN32API GetUserObjectInformationA
1993 * Purpose : The GetUserObjectInformation function returns information about
1994 * a window station or desktop object.
1995 * Parameters: HANDLE hObj handle of object to get information for
1996 * int nIndex type of information to get
1997 * PVOID pvInfo points to buffer that receives the information
1998 * DWORD nLength size, in bytes, of pvInfo buffer
1999 * LPDWORD lpnLengthNeeded receives required size, in bytes, of pvInfo buffer
2000 * Variables :
2001 * Result : If the function succeeds, the return value is TRUE.
2002 * If the function fails, the return value is FALSE. To get extended
2003 * error information, call GetLastError.
2004 * Remark :
2005 * Status : UNTESTED STUB
2006 *
2007 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
2008 *****************************************************************************/
2009BOOL WIN32API GetUserObjectInformationA(HANDLE hObj,
2010 int nIndex,
2011 PVOID pvInfo,
2012 DWORD nLength,
2013 LPDWORD lpnLengthNeeded)
2014{
2015 dprintf(("USER32:GetUserObjectInformationA (%08xh,%08xh,%08xh,%u,%08x) not implemented.\n",
2016 hObj,
2017 nIndex,
2018 pvInfo,
2019 nLength,
2020 lpnLengthNeeded));
2021
2022 return (FALSE);
2023}
2024/*****************************************************************************
2025 * Name : BOOL WIN32API GetUserObjectInformationW
2026 * Purpose : The GetUserObjectInformation function returns information about
2027 * a window station or desktop object.
2028 * Parameters: HANDLE hObj handle of object to get information for
2029 * int nIndex type of information to get
2030 * PVOID pvInfo points to buffer that receives the information
2031 * DWORD nLength size, in bytes, of pvInfo buffer
2032 * LPDWORD lpnLengthNeeded receives required size, in bytes, of pvInfo buffer
2033 * Variables :
2034 * Result : If the function succeeds, the return value is TRUE.
2035 * If the function fails, the return value is FALSE. To get extended
2036 * error information, call GetLastError.
2037 * Remark :
2038 * Status : UNTESTED STUB
2039 *
2040 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
2041 *****************************************************************************/
2042BOOL WIN32API GetUserObjectInformationW(HANDLE hObj,
2043 int nIndex,
2044 PVOID pvInfo,
2045 DWORD nLength,
2046 LPDWORD lpnLengthNeeded)
2047{
2048 dprintf(("USER32:GetUserObjectInformationW (%08xh,%08xh,%08xh,%u,%08x) not implemented.\n",
2049 hObj,
2050 nIndex,
2051 pvInfo,
2052 nLength,
2053 lpnLengthNeeded));
2054
2055 return (FALSE);
2056}
2057/*****************************************************************************
2058 * Name : BOOL WIN32API GetUserObjectSecurity
2059 * Purpose : The GetUserObjectSecurity function retrieves security information
2060 * for the specified user object.
2061 * Parameters: HANDLE hObj handle of user object
2062 * SECURITY_INFORMATION * pSIRequested address of requested security information
2063 * LPSECURITY_DESCRIPTOR pSID address of security descriptor
2064 * DWORD nLength size of buffer for security descriptor
2065 * LPDWORD lpnLengthNeeded address of required size of buffer
2066 * Variables :
2067 * Result : If the function succeeds, the return value is TRUE.
2068 * If the function fails, the return value is FALSE. To get extended
2069 * error information, call GetLastError.
2070 * Remark :
2071 * Status : UNTESTED STUB
2072 *
2073 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
2074 *****************************************************************************/
2075BOOL WIN32API GetUserObjectSecurity(HANDLE hObj,
2076 PSECURITY_INFORMATION pSIRequested,
2077 PSECURITY_DESCRIPTOR pSID,
2078 DWORD nLength,
2079 LPDWORD lpnLengthNeeded)
2080{
2081 dprintf(("USER32:GetUserObjectSecurity (%08xh,%08xh,%08xh,%u,%08x) not implemented.\n",
2082 hObj,
2083 pSIRequested,
2084 pSID,
2085 nLength,
2086 lpnLengthNeeded));
2087
2088 return (FALSE);
2089}
2090/*****************************************************************************
2091 * Name : HDESK WIN32API OpenDesktopA
2092 * Purpose : The OpenDesktop function returns a handle to an existing desktop.
2093 * A desktop is a secure object contained within a window station
2094 * object. A desktop has a logical display surface and contains
2095 * windows, menus and hooks.
2096 * Parameters: LPCTSTR lpszDesktopName name of the desktop to open
2097 * DWORD dwFlags flags to control interaction with other applications
2098 * BOOL fInherit specifies whether returned handle is inheritable
2099 * DWORD dwDesiredAccess specifies access of returned handle
2100 * Variables :
2101 * Result : If the function succeeds, the return value is the handle to the
2102 * opened desktop.
2103 * If the function fails, the return value is NULL. To get extended
2104 * error information, call GetLastError.
2105 * Remark :
2106 * Status : UNTESTED STUB
2107 *
2108 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
2109 *****************************************************************************/
2110HDESK WIN32API OpenDesktopA(LPCTSTR lpszDesktopName,
2111 DWORD dwFlags,
2112 BOOL fInherit,
2113 DWORD dwDesiredAccess)
2114{
2115 dprintf(("USER32:OpenDesktopA (%s,%08xh,%08xh,%08x) not implemented.\n",
2116 lpszDesktopName,
2117 dwFlags,
2118 fInherit,
2119 dwDesiredAccess));
2120
2121 return (NULL);
2122}
2123/*****************************************************************************
2124 * Name : HDESK WIN32API OpenDesktopW
2125 * Purpose : The OpenDesktop function returns a handle to an existing desktop.
2126 * A desktop is a secure object contained within a window station
2127 * object. A desktop has a logical display surface and contains
2128 * windows, menus and hooks.
2129 * Parameters: LPCTSTR lpszDesktopName name of the desktop to open
2130 * DWORD dwFlags flags to control interaction with other applications
2131 * BOOL fInherit specifies whether returned handle is inheritable
2132 * DWORD dwDesiredAccess specifies access of returned handle
2133 * Variables :
2134 * Result : If the function succeeds, the return value is the handle to the
2135 * opened desktop.
2136 * If the function fails, the return value is NULL. To get extended
2137 * error information, call GetLastError.
2138 * Remark :
2139 * Status : UNTESTED STUB
2140 *
2141 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
2142 *****************************************************************************/
2143HDESK WIN32API OpenDesktopW(LPCTSTR lpszDesktopName,
2144 DWORD dwFlags,
2145 BOOL fInherit,
2146 DWORD dwDesiredAccess)
2147{
2148 dprintf(("USER32:OpenDesktopW (%s,%08xh,%08xh,%08x) not implemented.\n",
2149 lpszDesktopName,
2150 dwFlags,
2151 fInherit,
2152 dwDesiredAccess));
2153
2154 return (NULL);
2155}
2156/*****************************************************************************
2157 * Name : HDESK WIN32API OpenInputDesktop
2158 * Purpose : The OpenInputDesktop function returns a handle to the desktop
2159 * that receives user input. The input desktop is a desktop on the
2160 * window station associated with the logged-on user.
2161 * Parameters: DWORD dwFlags flags to control interaction with other applications
2162 * BOOL fInherit specifies whether returned handle is inheritable
2163 * DWORD dwDesiredAccess specifies access of returned handle
2164 * Variables :
2165 * Result : If the function succeeds, the return value is a handle of the
2166 * desktop that receives user input.
2167 * If the function fails, the return value is NULL. To get extended
2168 * error information, call GetLastError.
2169 * Remark :
2170 * Status : UNTESTED STUB
2171 *
2172 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
2173 *****************************************************************************/
2174HDESK WIN32API OpenInputDesktop(DWORD dwFlags,
2175 BOOL fInherit,
2176 DWORD dwDesiredAccess)
2177{
2178 dprintf(("USER32:OpenInputDesktop (%08xh,%08xh,%08x) not implemented.\n",
2179 dwFlags,
2180 fInherit,
2181 dwDesiredAccess));
2182
2183 return (NULL);
2184}
2185/*****************************************************************************
2186 * Name : HWINSTA WIN32API OpenWindowStationA
2187 * Purpose : The OpenWindowStation function returns a handle to an existing
2188 * window station.
2189 * Parameters: LPCTSTR lpszWinStaName name of the window station to open
2190 * BOOL fInherit specifies whether returned handle is inheritable
2191 * DWORD dwDesiredAccess specifies access of returned handle
2192 * Variables :
2193 * Result : If the function succeeds, the return value is the handle to the
2194 * specified window station.
2195 * If the function fails, the return value is NULL. To get extended
2196 * error information, call GetLastError.
2197 * Remark :
2198 * Status : UNTESTED STUB
2199 *
2200 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
2201 *****************************************************************************/
2202HWINSTA WIN32API OpenWindowStationA(LPCTSTR lpszWinStaName,
2203 BOOL fInherit,
2204 DWORD dwDesiredAccess)
2205{
2206 dprintf(("USER32:OpenWindowStatieonA (%s,%08xh,%08x) not implemented.\n",
2207 lpszWinStaName,
2208 fInherit,
2209 dwDesiredAccess));
2210
2211 return (NULL);
2212}
2213/*****************************************************************************
2214 * Name : HWINSTA WIN32API OpenWindowStationW
2215 * Purpose : The OpenWindowStation function returns a handle to an existing
2216 * window station.
2217 * Parameters: LPCTSTR lpszWinStaName name of the window station to open
2218 * BOOL fInherit specifies whether returned handle is inheritable
2219 * DWORD dwDesiredAccess specifies access of returned handle
2220 * Variables :
2221 * Result : If the function succeeds, the return value is the handle to the
2222 * specified window station.
2223 * If the function fails, the return value is NULL. To get extended
2224 * error information, call GetLastError.
2225
2226
2227 * Remark :
2228 * Status : UNTESTED STUB
2229 *
2230 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
2231 *****************************************************************************/
2232HWINSTA WIN32API OpenWindowStationW(LPCTSTR lpszWinStaName,
2233 BOOL fInherit,
2234 DWORD dwDesiredAccess)
2235{
2236 dprintf(("USER32:OpenWindowStatieonW (%s,%08xh,%08x) not implemented.\n",
2237 lpszWinStaName,
2238 fInherit,
2239 dwDesiredAccess));
2240
2241 return (NULL);
2242}
2243/*****************************************************************************
2244 * Name : BOOL WIN32API SetProcessWindowStation
2245 * Purpose : The SetProcessWindowStation function assigns a window station
2246 * to the calling process. This enables the process to access
2247 * objects in the window station such as desktops, the clipboard,
2248 * and global atoms. All subsequent operations on the window station
2249 * use the access rights granted to hWinSta.
2250 * Parameters:
2251 * Variables :
2252 * Result : If the function succeeds, the return value is TRUE.
2253 * If the function fails, the return value is FALSE. To get extended
2254 * error information, call GetLastError.
2255 * Remark :
2256 * Status : UNTESTED STUB
2257 *
2258 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
2259 *****************************************************************************/
2260BOOL WIN32API SetProcessWindowStation(HWINSTA hWinSta)
2261{
2262 dprintf(("USER32:SetProcessWindowStation (%08x) not implemented.\n",
2263 hWinSta));
2264
2265 return (FALSE);
2266}
2267/*****************************************************************************
2268 * Name : BOOL WIN32API SetThreadDesktop
2269 * Purpose : The SetThreadDesktop function assigns a desktop to the calling
2270 * thread. All subsequent operations on the desktop use the access
2271 * rights granted to hDesk.
2272 * Parameters: HDESK hDesk handle of the desktop to assign to this thread
2273 * Variables :
2274 * Result : If the function succeeds, the return value is TRUE.
2275 * If the function fails, the return value is FALSE. To get extended
2276 * error information, call GetLastError.
2277 * Remark :
2278 * Status : UNTESTED STUB
2279 *
2280 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
2281 *****************************************************************************/
2282BOOL WIN32API SetThreadDesktop(HDESK hDesktop)
2283{
2284 dprintf(("USER32:SetThreadDesktop (%08x) not implemented.\n",
2285 hDesktop));
2286
2287 return (FALSE);
2288}
2289/*****************************************************************************
2290 * Name : BOOL WIN32API SetUserObjectInformationA
2291 * Purpose : The SetUserObjectInformation function sets information about a
2292 * window station or desktop object.
2293 * Parameters: HANDLE hObject handle of the object for which to set information
2294 * int nIndex type of information to set
2295 * PVOID lpvInfo points to a buffer that contains the information
2296 * DWORD cbInfo size, in bytes, of lpvInfo buffer
2297 * Variables :
2298 * Result : If the function succeeds, the return value is TRUE.
2299 * If the function fails the return value is FALSE. To get extended
2300 * error information, call GetLastError.
2301 * Remark :
2302 * Status : UNTESTED STUB
2303 *
2304 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
2305 *****************************************************************************/
2306BOOL WIN32API SetUserObjectInformationA(HANDLE hObject,
2307 int nIndex,
2308 PVOID lpvInfo,
2309 DWORD cbInfo)
2310{
2311 dprintf(("USER32:SetUserObjectInformationA (%08xh,%u,%08xh,%08x) not implemented.\n",
2312 hObject,
2313 nIndex,
2314 lpvInfo,
2315 cbInfo));
2316
2317 return (FALSE);
2318}
2319/*****************************************************************************
2320 * Name : BOOL WIN32API SetUserObjectInformationW
2321 * Purpose : The SetUserObjectInformation function sets information about a
2322 * window station or desktop object.
2323 * Parameters: HANDLE hObject handle of the object for which to set information
2324 * int nIndex type of information to set
2325 * PVOID lpvInfo points to a buffer that contains the information
2326 * DWORD cbInfo size, in bytes, of lpvInfo buffer
2327 * Variables :
2328 * Result : If the function succeeds, the return value is TRUE.
2329 * If the function fails the return value is FALSE. To get extended
2330 * error information, call GetLastError.
2331 * Remark :
2332 * Status : UNTESTED STUB
2333 *
2334 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
2335 *****************************************************************************/
2336BOOL WIN32API SetUserObjectInformationW(HANDLE hObject,
2337 int nIndex,
2338 PVOID lpvInfo,
2339 DWORD cbInfo)
2340{
2341 dprintf(("USER32:SetUserObjectInformationW (%08xh,%u,%08xh,%08x) not implemented.\n",
2342 hObject,
2343 nIndex,
2344 lpvInfo,
2345 cbInfo));
2346
2347 return (FALSE);
2348}
2349/*****************************************************************************
2350 * Name : BOOL WIN32API SetUserObjectSecurity
2351 * Purpose : The SetUserObjectSecurity function sets the security of a user
2352 * object. This can be, for example, a window or a DDE conversation
2353 * Parameters: HANDLE hObject handle of user object
2354 * SECURITY_INFORMATION * psi address of security information
2355 * LPSECURITY_DESCRIPTOR psd address of security descriptor
2356 * Variables :
2357 * Result : If the function succeeds, the return value is TRUE.
2358 * If the function fails, the return value is FALSE. To get extended
2359 * error information, call GetLastError.
2360 * Remark :
2361 * Status : UNTESTED STUB
2362 *
2363 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
2364 *****************************************************************************/
2365BOOL WIN32API SetUserObjectSecurity(HANDLE hObject,
2366 PSECURITY_INFORMATION psi,
2367 PSECURITY_DESCRIPTOR psd)
2368{
2369 dprintf(("USER32:SetUserObjectSecuroty (%08xh,%08xh,%08x) not implemented.\n",
2370 hObject,
2371 psi,
2372 psd));
2373
2374 return (FALSE);
2375}
2376/*****************************************************************************
2377 * Name : BOOL WIN32API SwitchDesktop
2378 * Purpose : The SwitchDesktop function makes a desktop visible and activates
2379 * it. This enables the desktop to receive input from the user. The
2380 * calling process must have DESKTOP_SWITCHDESKTOP access to the
2381 * desktop for the SwitchDesktop function to succeed.
2382 * Parameters:
2383 * Variables :
2384 * Result : If the function succeeds, the return value is TRUE.
2385 * If the function fails, the return value is FALSE. To get extended
2386 * error information, call GetLastError.
2387 * Remark :
2388 * Status : UNTESTED STUB
2389 *
2390 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
2391 *****************************************************************************/
2392BOOL WIN32API SwitchDesktop(HDESK hDesktop)
2393{
2394 dprintf(("USER32:SwitchDesktop (%08x) not implemented.\n",
2395 hDesktop));
2396
2397 return (FALSE);
2398}
2399
2400/* Debugging Functions */
2401
2402/*****************************************************************************
2403 * Name : VOID WIN32API SetDebugErrorLevel
2404 * Purpose : The SetDebugErrorLevel function sets the minimum error level at
2405 * which Windows will generate debugging events and pass them to a debugger.
2406 * Parameters: DWORD dwLevel debugging error level
2407 * Variables :
2408 * Result :
2409 * Remark :
2410 * Status : UNTESTED STUB
2411 *
2412 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
2413 *****************************************************************************/
2414VOID WIN32API SetDebugErrorLevel(DWORD dwLevel)
2415{
2416 dprintf(("USER32:SetDebugErrorLevel (%08x) not implemented.\n",
2417 dwLevel));
2418}
2419
2420/* Drag'n'drop */
2421
2422/*****************************************************************************
2423 * Name : BOOL WIN32API DragObject
2424 * Purpose : Unknown
2425 * Parameters: Unknown
2426 * Variables :
2427 * Result :
2428 * Remark :
2429 * Status : UNTESTED UNKNOWN STUB
2430 *
2431 * Author : Patrick Haller [Wed, 1998/06/16 11:55]
2432 *****************************************************************************/
2433DWORD WIN32API DragObject(HWND x1,HWND x2,UINT x3,DWORD x4,HCURSOR x5)
2434{
2435 dprintf(("USER32: DragObject(%08x,%08xh,%08xh,%08xh,%08xh) not implemented.\n",
2436 x1,
2437 x2,
2438 x3,
2439 x4,
2440 x5));
2441
2442 return (FALSE); /* default */
2443}
2444
2445/* Unknown */
2446
2447/*****************************************************************************
2448 * Name : BOOL WIN32API SetShellWindow
2449 * Purpose : Unknown
2450 * Parameters: Unknown
2451 * Variables :
2452 * Result :
2453 * Remark :
2454 * Status : UNTESTED UNKNOWN STUB
2455 *
2456 * Author : Patrick Haller [Wed, 1998/06/16 11:55]
2457 *****************************************************************************/
2458BOOL WIN32API SetShellWindow(DWORD x1)
2459{
2460 dprintf(("USER32: SetShellWindow(%08x) not implemented.\n",
2461 x1));
2462
2463 return (FALSE); /* default */
2464}
2465/*****************************************************************************
2466 * Name : BOOL WIN32API PlaySoundEvent
2467 * Purpose : Unknown
2468 * Parameters: Unknown
2469 * Variables :
2470 * Result :
2471 * Remark :
2472 * Status : UNTESTED UNKNOWN STUB
2473 *
2474 * Author : Patrick Haller [Wed, 1998/06/16 11:55]
2475 *****************************************************************************/
2476BOOL WIN32API PlaySoundEvent(DWORD x1)
2477{
2478 dprintf(("USER32: PlaySoundEvent(%08x) not implemented.\n",
2479 x1));
2480
2481 return (FALSE); /* default */
2482}
2483/*****************************************************************************
2484 * Name : BOOL WIN32API SetSysColorsTemp
2485 * Purpose : Unknown
2486 * Parameters: Unknown
2487 * Variables :
2488 * Result :
2489 * Remark :
2490 * Status : UNTESTED UNKNOWN STUB
2491 *
2492 * Author : Patrick Haller [Wed, 1998/06/16 11:55]
2493 *****************************************************************************/
2494BOOL WIN32API SetSysColorsTemp(void)
2495{
2496 dprintf(("USER32: SetSysColorsTemp() not implemented.\n"));
2497
2498 return (FALSE); /* default */
2499}
2500/*****************************************************************************
2501 * Name : BOOL WIN32API RegisterNetworkCapabilities
2502 * Purpose : Unknown
2503 * Parameters: Unknown
2504 * Variables :
2505 * Result :
2506 * Remark :
2507 * Status : UNTESTED UNKNOWN STUB
2508 *
2509 * Author : Patrick Haller [Wed, 1998/06/16 11:55]
2510 *****************************************************************************/
2511BOOL WIN32API RegisterNetworkCapabilities(DWORD x1,
2512 DWORD x2)
2513{
2514 dprintf(("USER32: RegisterNetworkCapabilities(%08xh,%08xh) not implemented.\n",
2515 x1,
2516 x2));
2517
2518 return (FALSE); /* default */
2519}
2520/*****************************************************************************
2521 * Name : BOOL WIN32API EndTask
2522 * Purpose : Unknown
2523 * Parameters: Unknown
2524 * Variables :
2525 * Result :
2526 * Remark :
2527 * Status : UNTESTED UNKNOWN STUB
2528 *
2529 * Author : Patrick Haller [Wed, 1998/06/16 11:55]
2530 *****************************************************************************/
2531BOOL WIN32API EndTask(DWORD x1,
2532 DWORD x2,
2533 DWORD x3)
2534{
2535 dprintf(("USER32: EndTask(%08xh,%08xh,%08xh) not implemented.\n",
2536 x1,
2537 x2,
2538 x3));
2539
2540 return (FALSE); /* default */
2541}
2542/*****************************************************************************
2543 * Name : BOOL WIN32API GetNextQueueWindow
2544 * Purpose : Unknown
2545 * Parameters: Unknown
2546 * Variables :
2547 * Result :
2548 * Remark :
2549 * Status : UNTESTED UNKNOWN STUB
2550 *
2551 * Author : Patrick Haller [Wed, 1998/06/16 11:55]
2552 *****************************************************************************/
2553BOOL WIN32API GetNextQueueWindow(DWORD x1,
2554 DWORD x2)
2555{
2556 dprintf(("USER32: GetNextQueueWindow(%08xh,%08xh) not implemented.\n",
2557 x1,
2558 x2));
2559
2560 return (FALSE); /* default */
2561}
2562/*****************************************************************************
2563 * Name : BOOL WIN32API YieldTask
2564 * Purpose : Unknown
2565 * Parameters: Unknown
2566 * Variables :
2567 * Result :
2568 * Remark :
2569 * Status : UNTESTED UNKNOWN STUB
2570 *
2571 * Author : Patrick Haller [Wed, 1998/06/16 11:55]
2572 *****************************************************************************/
2573BOOL WIN32API YieldTask(void)
2574{
2575 dprintf(("USER32: YieldTask() not implemented.\n"));
2576
2577 return (FALSE); /* default */
2578}
2579/*****************************************************************************
2580 * Name : BOOL WIN32API WinOldAppHackoMatic
2581 * Purpose : Unknown
2582 * Parameters: Unknown
2583 * Variables :
2584 * Result :
2585 * Remark :
2586 * Status : UNTESTED UNKNOWN STUB
2587 *
2588 * Author : Patrick Haller [Wed, 1998/06/16 11:55]
2589 *****************************************************************************/
2590BOOL WIN32API WinOldAppHackoMatic(DWORD x1)
2591{
2592 dprintf(("USER32: WinOldAppHackoMatic(%08x) not implemented.\n",
2593 x1));
2594
2595 return (FALSE); /* default */
2596}
2597/*****************************************************************************
2598 * Name : BOOL WIN32API RegisterSystemThread
2599 * Purpose : Unknown
2600 * Parameters: Unknown
2601 * Variables :
2602 * Result :
2603 * Remark :
2604 * Status : UNTESTED UNKNOWN STUB
2605 *
2606 * Author : Patrick Haller [Wed, 1998/06/16 11:55]
2607 *****************************************************************************/
2608BOOL WIN32API RegisterSystemThread(DWORD x1,
2609 DWORD x2)
2610{
2611 dprintf(("USER32: RegisterSystemThread(%08xh,%08xh) not implemented.\n",
2612 x1,
2613 x2));
2614
2615 return (FALSE); /* default */
2616}
2617/*****************************************************************************
2618 * Name : BOOL WIN32API IsHungThread
2619 * Purpose : Unknown
2620 * Parameters: Unknown
2621 * Variables :
2622 * Result :
2623 * Remark :
2624 * Status : UNTESTED UNKNOWN STUB
2625 *
2626 * Author : Patrick Haller [Wed, 1998/06/16 11:55]
2627 *****************************************************************************/
2628BOOL WIN32API IsHungThread(DWORD x1)
2629{
2630 dprintf(("USER32: IsHungThread(%08xh) not implemented.\n",
2631 x1));
2632
2633 return (FALSE); /* default */
2634}
2635/*****************************************************************************
2636 * Name : BOOL WIN32API UserSignalProc
2637 * Purpose : Unknown
2638 * Parameters: Unknown
2639 * Variables :
2640 * Result :
2641 * Remark :
2642 * Status : UNTESTED UNKNOWN STUB
2643 *
2644 * Author : Patrick Haller [Wed, 1998/06/16 11:55]
2645 *****************************************************************************/
2646BOOL WIN32API UserSignalProc(DWORD x1,
2647 DWORD x2,
2648 DWORD x3,
2649 DWORD x4)
2650{
2651 dprintf(("USER32: SysErrorBox(%08xh,%08xh,%08xh,%08xh) not implemented.\n",
2652 x1,
2653 x2,
2654 x3,
2655 x4));
2656
2657 return (FALSE); /* default */
2658}
2659/*****************************************************************************
2660 * Name : BOOL WIN32API GetShellWindow
2661 * Purpose : Unknown
2662 * Parameters: Unknown
2663 * Variables :
2664 * Result :
2665 * Remark :
2666 * Status : UNTESTED UNKNOWN STUB
2667 *
2668 * Author : Patrick Haller [Wed, 1998/06/16 11:55]
2669 *****************************************************************************/
2670HWND WIN32API GetShellWindow(void)
2671{
2672 dprintf(("USER32: GetShellWindow() not implemented.\n"));
2673
2674 return (0); /* default */
2675}
2676/***********************************************************************
2677 * RegisterTasklist32 [USER32.436]
2678 */
2679DWORD WIN32API RegisterTasklist (DWORD x)
2680{
2681 dprintf(("USER32: RegisterTasklist(%08xh) not implemented.\n",
2682 x));
2683
2684 return TRUE;
2685}
2686/***********************************************************************
2687 * SetLogonNotifyWindow (USER32.486)
2688 */
2689DWORD WIN32API SetLogonNotifyWindow(HWINSTA hwinsta,HWND hwnd)
2690{
2691 dprintf(("USER32: SetLogonNotifyWindow - empty stub!"));
2692
2693 return 1;
2694}
2695
2696
2697DWORD WIN32API NotifyWinEvent(DWORD arg1, DWORD arg2, DWORD arg3, DWORD arg4)
2698{
2699 dprintf(("USER32: NotifyWinEvent %x %x %x %x - empty stub!!", arg1, arg2, arg3, arg4));
2700
2701 return 0;
2702}
2703
2704DWORD WIN32API UnhookWinEvent(DWORD arg1)
2705{
2706 dprintf(("USER32: UnhookWinEvent %x - empty stub!!", arg1));
2707
2708 return 0;
2709}
2710
2711DWORD WIN32API SetWinEventHook(DWORD arg1, DWORD arg2, DWORD arg3, DWORD arg4, DWORD arg5, DWORD arg6, DWORD arg7)
2712{
2713 dprintf(("USER32: SetWinEventHook %x %x %x %x %x %x %x - empty stub!!", arg1, arg2, arg3, arg4, arg5, arg6, arg7));
2714
2715 return 0;
2716}
Note: See TracBrowser for help on using the repository browser.