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

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

merged with Corel WINE 20000212, added WS_EX_CONTEXTHELP

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