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

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

SystemParametersInfoA addition + SystemParametersInfoW fix

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