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

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

ToAscii implemenation started

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