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

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

menu and titlebar fix, some new stubs

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