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

Last change on this file since 2668 was 2668, checked in by cbratschi, 26 years ago

ported WinHelpA from WINE

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