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

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

menu font: bold to normal

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