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

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

replaced writelog calls

File size: 102.8 KB
Line 
1/* $Id: user32.cpp,v 1.75 2000-03-23 23:06:52 sandervl Exp $ */
2
3/*
4 * Win32 misc user32 API functions for OS/2
5 *
6 * Copyright 1998 Sander van Leeuwen
7 * Copyright 1998 Patrick Haller
8 * Copyright 1998 Peter Fitzsimmons
9 * Copyright 1999 Christoph Bratschi
10 * Copyright 1999 Daniela Engert (dani@ngrt.de)
11 *
12 *
13 * Project Odin Software License can be found in LICENSE.TXT
14 *
15 */
16/*****************************************************************************
17 * Name : USER32.CPP
18 * Purpose : This module maps all Win32 functions contained in USER32.DLL
19 * to their OS/2-specific counterparts as far as possible.
20 *****************************************************************************/
21
22//Attention: many functions belong to other subsystems, move them to their
23// right place!
24
25#include <odin.h>
26#include <odinwrap.h>
27#include <os2sel.h>
28
29#include <os2win.h>
30#include <misc.h>
31
32#include "user32.h"
33#include <winicon.h>
34#include "syscolor.h"
35#include "pmwindow.h"
36
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 dprintf(("USER32: SetCapture %x", hwnd));
581 hwnd = Win32Window::Win32ToOS2Handle(hwnd);
582 return Win32Window::OS2ToWin32Handle(O32_SetCapture(hwnd));
583}
584//******************************************************************************
585//******************************************************************************
586BOOL WIN32API SetDoubleClickTime( UINT uInterval)
587{
588 dprintf(("USER32: SetDoubleClickTime\n"));
589 return O32_SetDoubleClickTime(uInterval);
590}
591//******************************************************************************
592//******************************************************************************
593BOOL WIN32API SwapMouseButton( BOOL fSwap)
594{
595 dprintf(("USER32: SwapMouseButton\n"));
596 return O32_SwapMouseButton(fSwap);
597}
598
599/* Error Functions */
600
601/*****************************************************************************
602 * Name : ExitWindowsEx
603 * Purpose : Shutdown System
604 * Parameters: UINT uFlags
605 * DWORD dwReserved
606 * Variables :
607 * Result : TRUE / FALSE
608 * Remark :
609 * Status :
610 *
611 * Author : Patrick Haller [Tue, 1999/10/20 21:24]
612 *****************************************************************************/
613
614ODINFUNCTION2(BOOL, ExitWindowsEx, UINT, uFlags,
615 DWORD, dwReserved)
616{
617 int rc = MessageBoxA(HWND_DESKTOP,
618 "Are you sure you want to shutdown the system?",
619 "Shutdown ...",
620 MB_YESNOCANCEL | MB_ICONQUESTION);
621 switch (rc)
622 {
623 case IDCANCEL: return (FALSE);
624 case IDYES: break;
625 case IDNO:
626 dprintf(("no shutdown!\n"));
627 return TRUE;
628 }
629
630 return O32_ExitWindowsEx(uFlags,dwReserved);
631}
632
633
634//******************************************************************************
635//******************************************************************************
636BOOL WIN32API MessageBeep( UINT uType)
637{
638 INT flStyle;
639
640 dprintf(("USER32: MessageBeep\n"));
641
642 switch (uType)
643 {
644 case 0xFFFFFFFF:
645 OSLibDosBeep(500,50);
646 return TRUE;
647 case MB_ICONASTERISK:
648 flStyle = WAOS_NOTE;
649 break;
650 case MB_ICONEXCLAMATION:
651 flStyle = WAOS_WARNING;
652 break;
653 case MB_ICONHAND:
654 case MB_ICONQUESTION:
655 case MB_OK:
656 flStyle = WAOS_NOTE;
657 break;
658 default:
659 flStyle = WAOS_ERROR; //CB: should be right
660 break;
661 }
662 return OSLibWinAlarm(OSLIB_HWND_DESKTOP,flStyle);
663}
664//******************************************************************************
665//2nd parameter not used according to SDK (yet?)
666//******************************************************************************
667VOID WIN32API SetLastErrorEx(DWORD dwErrCode, DWORD dwType)
668{
669 dprintf(("USER32: SetLastErrorEx\n"));
670 SetLastError(dwErrCode);
671}
672
673/* Accessibility Functions */
674
675int WIN32API GetSystemMetrics(int nIndex)
676{
677 int rc = 0;
678
679 switch(nIndex) {
680 case SM_CXSCREEN:
681 rc = ScreenWidth;
682 break;
683
684 case SM_CYSCREEN:
685 rc = ScreenHeight;
686 break;
687
688 case SM_CXVSCROLL:
689 rc = OSLibWinQuerySysValue(OSLIB_HWND_DESKTOP,SVOS_CXVSCROLL);
690 break;
691
692 case SM_CYHSCROLL:
693 rc = OSLibWinQuerySysValue(OSLIB_HWND_DESKTOP,SVOS_CYHSCROLL);
694 break;
695
696 case SM_CYCAPTION:
697 rc = 19;
698 //rc = OSLibWinQuerySysValue(OSLIB_HWND_DESKTOP,SVOS_CYTITLEBAR);
699 break;
700
701 case SM_CXBORDER:
702 case SM_CYBORDER:
703 rc = 1;
704 break;
705
706 case SM_CXDLGFRAME:
707 case SM_CYDLGFRAME:
708 rc = 3;
709 break;
710
711 case SM_CYMENU:
712 case SM_CXMENUSIZE:
713 case SM_CYMENUSIZE:
714 rc = 19;
715 break;
716
717 case SM_CXSIZE:
718 case SM_CYSIZE:
719 rc = GetSystemMetrics(SM_CYCAPTION)-2;
720 break;
721
722 case SM_CXFRAME:
723 case SM_CYFRAME:
724 rc = 4;
725 break;
726
727 case SM_CXEDGE:
728 case SM_CYEDGE:
729 rc = 2;
730 break;
731
732 case SM_CXMINSPACING:
733 rc = 160;
734 break;
735
736 case SM_CYMINSPACING:
737 rc = 24;
738 break;
739
740 case SM_CXSMICON:
741 case SM_CYSMICON:
742 rc = 16;
743 break;
744
745 case SM_CYSMCAPTION:
746 rc = 16;
747 break;
748
749 case SM_CXSMSIZE:
750 case SM_CYSMSIZE:
751 rc = 15;
752 break;
753
754//CB: todo: add missing metrics
755
756 case SM_CXICONSPACING: //TODO: size of grid cell for large icons
757 rc = OSLibWinQuerySysValue(OSLIB_HWND_DESKTOP,SVOS_CXICON);
758 //CB: return standard windows icon size?
759 //rc = 32;
760 break;
761 case SM_CYICONSPACING:
762 rc = OSLibWinQuerySysValue(OSLIB_HWND_DESKTOP,SVOS_CYICON);
763 //read SM_CXICONSPACING comment
764 //rc = 32;
765 break;
766 case SM_PENWINDOWS:
767 rc = FALSE;
768 break;
769 case SM_DBCSENABLED:
770 rc = FALSE;
771 break;
772 case SM_CXICON:
773 case SM_CYICON:
774 rc = 32; //CB: Win32: only 32x32, OS/2 32x32/40x40
775 // we must implement 32x32 for all screen resolutions
776 break;
777 case SM_ARRANGE:
778 rc = ARW_BOTTOMLEFT | ARW_LEFT;
779 break;
780 case SM_CXMINIMIZED:
781 break;
782 case SM_CYMINIMIZED:
783 break;
784
785 case SM_CXMINTRACK:
786 case SM_CXMIN:
787 rc = 112;
788 break;
789
790 case SM_CYMINTRACK:
791 case SM_CYMIN:
792 rc = 27;
793 break;
794
795 case SM_CXMAXTRACK: //max window size
796 case SM_CXMAXIMIZED: //max toplevel window size
797 rc = OSLibWinQuerySysValue(OSLIB_HWND_DESKTOP,SVOS_CXSCREEN);
798 break;
799
800 case SM_CYMAXTRACK:
801 case SM_CYMAXIMIZED:
802 rc = OSLibWinQuerySysValue(OSLIB_HWND_DESKTOP,SVOS_CYSCREEN);
803 break;
804
805 case SM_NETWORK:
806 rc = 0x01; //TODO: default = yes
807 break;
808 case SM_CLEANBOOT:
809 rc = 0; //normal boot
810 break;
811 case SM_CXDRAG: //nr of pixels before drag becomes a real one
812 rc = 2;
813 break;
814 case SM_CYDRAG:
815 rc = 2;
816 break;
817 case SM_SHOWSOUNDS: //show instead of play sound
818 rc = FALSE;
819 break;
820 case SM_CXMENUCHECK:
821 rc = 4; //TODO
822 break;
823 case SM_CYMENUCHECK:
824 rc = OSLibWinQuerySysValue(OSLIB_HWND_DESKTOP,SVOS_CYMENU);
825 break;
826 case SM_SLOWMACHINE:
827 rc = FALSE; //even a slow machine is fast with OS/2 :)
828 break;
829 case SM_MIDEASTENABLED:
830 rc = FALSE;
831 break;
832 case SM_MOUSEWHEELPRESENT:
833 rc = FALSE;
834 break;
835 case SM_XVIRTUALSCREEN:
836 rc = 0;
837 break;
838 case SM_YVIRTUALSCREEN:
839 rc = 0;
840 break;
841
842 case SM_CXVIRTUALSCREEN:
843 rc = OSLibWinQuerySysValue(OSLIB_HWND_DESKTOP,SVOS_CXSCREEN);
844 break;
845 case SM_CYVIRTUALSCREEN:
846 rc = OSLibWinQuerySysValue(OSLIB_HWND_DESKTOP,SVOS_CYSCREEN);
847 break;
848 case SM_CMONITORS:
849 rc = 1;
850 break;
851 case SM_SAMEDISPLAYFORMAT:
852 rc = TRUE;
853 break;
854 case SM_CMETRICS:
855 rc = 81;
856 //rc = O32_GetSystemMetrics(44); //Open32 changed this one
857 break;
858 default:
859 //better than nothing
860 rc = O32_GetSystemMetrics(nIndex);
861 break;
862 }
863 dprintf2(("USER32: GetSystemMetrics %d returned %d\n", nIndex, rc));
864 return(rc);
865}
866//******************************************************************************
867/* Not support by Open32 (not included are the new win9x parameters):
868 case SPI_GETFASTTASKSWITCH:
869 case SPI_GETGRIDGRANULARITY:
870 case SPI_GETICONTITLELOGFONT:
871 case SPI_GETICONTITLEWRAP:
872 case SPI_GETMENUDROPALIGNMENT:
873 case SPI_ICONHORIZONTALSPACING:
874 case SPI_ICONVERTICALSPACING:
875 case SPI_LANGDRIVER:
876 case SPI_SETFASTTASKSWITCH:
877 case SPI_SETGRIDGRANULARITY:
878 case SPI_SETICONTITLELOGFONT:
879 case SPI_SETICONTITLEWRAP:
880 case SPI_SETMENUDROPALIGNMENT:
881 case SPI_GETSCREENSAVEACTIVE:
882 case SPI_GETSCREENSAVETIMEOUT:
883 case SPI_SETDESKPATTERN:
884 case SPI_SETDESKWALLPAPER:
885 case SPI_SETSCREENSAVEACTIVE:
886 case SPI_SETSCREENSAVETIMEOUT:
887*/
888//******************************************************************************
889BOOL WIN32API SystemParametersInfoA(UINT uiAction, UINT uiParam, PVOID pvParam, UINT fWinIni)
890{
891 BOOL rc = TRUE;
892 NONCLIENTMETRICSA *cmetric = (NONCLIENTMETRICSA *)pvParam;
893
894 switch(uiAction) {
895 case SPI_SCREENSAVERRUNNING:
896 *(BOOL *)pvParam = FALSE;
897 break;
898 case SPI_GETDRAGFULLWINDOWS:
899 *(BOOL *)pvParam = FALSE; //CB: where is the Warp 4 setting stored?
900 break;
901 case SPI_GETNONCLIENTMETRICS:
902 memset(cmetric, 0, sizeof(NONCLIENTMETRICSA));
903 cmetric->cbSize = sizeof(NONCLIENTMETRICSA);
904
905 //CB: fonts not handled by Open32, set to WarpSans
906 lstrcpyA(cmetric->lfCaptionFont.lfFaceName,"WarpSans");
907 cmetric->lfCaptionFont.lfHeight = 9;
908
909 lstrcpyA(cmetric->lfMenuFont.lfFaceName,"WarpSans");
910 cmetric->lfMenuFont.lfHeight = 9;
911
912 lstrcpyA(cmetric->lfStatusFont.lfFaceName,"WarpSans");
913 cmetric->lfStatusFont.lfHeight = 9;
914
915 lstrcpyA(cmetric->lfMessageFont.lfFaceName,"WarpSans");
916 cmetric->lfMessageFont.lfHeight = 9;
917
918 cmetric->iBorderWidth = GetSystemMetrics(SM_CXBORDER);
919 cmetric->iScrollWidth = GetSystemMetrics(SM_CXHSCROLL);
920 cmetric->iScrollHeight = GetSystemMetrics(SM_CYHSCROLL);
921 cmetric->iCaptionWidth = 32; //TODO
922 cmetric->iCaptionHeight = 16; //TODO
923 cmetric->iSmCaptionWidth = GetSystemMetrics(SM_CXSMSIZE);
924 cmetric->iSmCaptionHeight = GetSystemMetrics(SM_CYSMSIZE);
925 cmetric->iMenuWidth = 32; //TODO
926 cmetric->iMenuHeight = GetSystemMetrics(SM_CYMENU);
927 break;
928 case SPI_GETICONTITLELOGFONT:
929 {
930 LPLOGFONTA lpLogFont = (LPLOGFONTA)pvParam;
931
932 /* from now on we always have an alias for MS Sans Serif */
933 strcpy(lpLogFont->lfFaceName, "MS Sans Serif");
934 lpLogFont->lfHeight = -GetProfileIntA("Desktop","IconTitleSize", /*8*/12); //CB: 8 is too small
935 lpLogFont->lfWidth = 0;
936 lpLogFont->lfEscapement = lpLogFont->lfOrientation = 0;
937 lpLogFont->lfWeight = FW_NORMAL;
938 lpLogFont->lfItalic = FALSE;
939 lpLogFont->lfStrikeOut = FALSE;
940 lpLogFont->lfUnderline = FALSE;
941 lpLogFont->lfCharSet = ANSI_CHARSET;
942 lpLogFont->lfOutPrecision = OUT_DEFAULT_PRECIS;
943 lpLogFont->lfClipPrecision = CLIP_DEFAULT_PRECIS;
944 lpLogFont->lfPitchAndFamily = DEFAULT_PITCH | FF_SWISS;
945 break;
946 }
947 case SPI_GETBORDER:
948 *(INT *)pvParam = GetSystemMetrics( SM_CXFRAME );
949 break;
950
951 case SPI_GETWORKAREA:
952 SetRect( (RECT *)pvParam, 0, 0,
953 GetSystemMetrics( SM_CXSCREEN ),
954 GetSystemMetrics( SM_CYSCREEN )
955 );
956 break;
957
958 case 104: //TODO: Undocumented
959 rc = 16;
960 break;
961 default:
962 rc = O32_SystemParametersInfo(uiAction, uiParam, pvParam, fWinIni);
963 break;
964 }
965 dprintf(("USER32: SystemParametersInfoA %d, returned %d\n", uiAction, rc));
966 return(rc);
967}
968//******************************************************************************
969//TODO: Check for more options that have different structs for Unicode!!!!
970//******************************************************************************
971BOOL WIN32API SystemParametersInfoW(UINT uiAction, UINT uiParam, PVOID pvParam, UINT fWinIni)
972{
973 BOOL rc;
974 NONCLIENTMETRICSW *clientMetricsW = (NONCLIENTMETRICSW *)pvParam;
975 NONCLIENTMETRICSA clientMetricsA = {0};
976 PVOID pvParamA;
977 UINT uiParamA;
978
979 switch(uiAction) {
980 case SPI_SETNONCLIENTMETRICS:
981 clientMetricsA.cbSize = sizeof(NONCLIENTMETRICSA);
982 clientMetricsA.iBorderWidth = clientMetricsW->iBorderWidth;
983 clientMetricsA.iScrollWidth = clientMetricsW->iScrollWidth;
984 clientMetricsA.iScrollHeight = clientMetricsW->iScrollHeight;
985 clientMetricsA.iCaptionWidth = clientMetricsW->iCaptionWidth;
986 clientMetricsA.iCaptionHeight = clientMetricsW->iCaptionHeight;
987 ConvertFontWA(&clientMetricsW->lfCaptionFont, &clientMetricsA.lfCaptionFont);
988 clientMetricsA.iSmCaptionWidth = clientMetricsW->iSmCaptionWidth;
989 clientMetricsA.iSmCaptionHeight = clientMetricsW->iSmCaptionHeight;
990 ConvertFontWA(&clientMetricsW->lfSmCaptionFont, &clientMetricsA.lfSmCaptionFont);
991 clientMetricsA.iMenuWidth = clientMetricsW->iMenuWidth;
992 clientMetricsA.iMenuHeight = clientMetricsW->iMenuHeight;
993 ConvertFontWA(&clientMetricsW->lfMenuFont, &clientMetricsA.lfMenuFont);
994 ConvertFontWA(&clientMetricsW->lfStatusFont, &clientMetricsA.lfStatusFont);
995 ConvertFontWA(&clientMetricsW->lfMessageFont, &clientMetricsA.lfMessageFont);
996 //no break
997 case SPI_GETNONCLIENTMETRICS:
998 uiParamA = sizeof(NONCLIENTMETRICSA);
999 pvParamA = &clientMetricsA;
1000 break;
1001 case SPI_GETICONTITLELOGFONT:
1002 {
1003 LPLOGFONTW lpLogFont = (LPLOGFONTW)pvParam;
1004
1005 /* from now on we always have an alias for MS Sans Serif */
1006 lstrcpyW(lpLogFont->lfFaceName, (LPCWSTR)L"MS Sans Serif");
1007 lpLogFont->lfHeight = -GetProfileIntA("Desktop","IconTitleSize", 8);
1008 lpLogFont->lfWidth = 0;
1009 lpLogFont->lfEscapement = lpLogFont->lfOrientation = 0;
1010 lpLogFont->lfWeight = FW_NORMAL;
1011 lpLogFont->lfItalic = FALSE;
1012 lpLogFont->lfStrikeOut = FALSE;
1013 lpLogFont->lfUnderline = FALSE;
1014 lpLogFont->lfCharSet = ANSI_CHARSET;
1015 lpLogFont->lfOutPrecision = OUT_DEFAULT_PRECIS;
1016 lpLogFont->lfClipPrecision = CLIP_DEFAULT_PRECIS;
1017 lpLogFont->lfPitchAndFamily = DEFAULT_PITCH | FF_SWISS;
1018 return TRUE;
1019 }
1020 default:
1021 pvParamA = pvParam;
1022 uiParamA = uiParam;
1023 break;
1024 }
1025 rc = SystemParametersInfoA(uiAction, uiParamA, pvParamA, fWinIni);
1026
1027 switch(uiAction) {
1028 case SPI_GETNONCLIENTMETRICS:
1029 clientMetricsW->cbSize = sizeof(*clientMetricsW);
1030 clientMetricsW->iBorderWidth = clientMetricsA.iBorderWidth;
1031 clientMetricsW->iScrollWidth = clientMetricsA.iScrollWidth;
1032 clientMetricsW->iScrollHeight = clientMetricsA.iScrollHeight;
1033 clientMetricsW->iCaptionWidth = clientMetricsA.iCaptionWidth;
1034 clientMetricsW->iCaptionHeight = clientMetricsA.iCaptionHeight;
1035 ConvertFontAW(&clientMetricsA.lfCaptionFont, &clientMetricsW->lfCaptionFont);
1036
1037 clientMetricsW->iSmCaptionWidth = clientMetricsA.iSmCaptionWidth;
1038 clientMetricsW->iSmCaptionHeight = clientMetricsA.iSmCaptionHeight;
1039 ConvertFontAW(&clientMetricsA.lfSmCaptionFont, &clientMetricsW->lfSmCaptionFont);
1040
1041 clientMetricsW->iMenuWidth = clientMetricsA.iMenuWidth;
1042 clientMetricsW->iMenuHeight = clientMetricsA.iMenuHeight;
1043 ConvertFontAW(&clientMetricsA.lfMenuFont, &clientMetricsW->lfMenuFont);
1044 ConvertFontAW(&clientMetricsA.lfStatusFont, &clientMetricsW->lfStatusFont);
1045 ConvertFontAW(&clientMetricsA.lfMessageFont, &clientMetricsW->lfMessageFont);
1046 break;
1047 }
1048 dprintf(("USER32: SystemParametersInfoW %d, returned %d\n", uiAction, rc));
1049 return(rc);
1050}
1051
1052/* Process and Thread Functions */
1053
1054//******************************************************************************
1055//DWORD idAttach; /* thread to attach */
1056//DWORD idAttachTo; /* thread to attach to */
1057//BOOL fAttach; /* attach or detach */
1058//******************************************************************************
1059BOOL WIN32API AttachThreadInput(DWORD idAttach, DWORD idAttachTo, BOOL fAttach)
1060{
1061 dprintf(("USER32: AttachThreadInput, not implemented\n"));
1062 return(TRUE);
1063}
1064//******************************************************************************
1065//******************************************************************************
1066DWORD WIN32API WaitForInputIdle(HANDLE hProcess, DWORD dwTimeOut)
1067{
1068 dprintf(("USER32: WaitForInputIdle %x %d\n", hProcess, dwTimeOut));
1069
1070 return O32_WaitForInputIdle(hProcess, dwTimeOut);
1071}
1072
1073/* Help Functions */
1074
1075BOOL WIN32API WinHelpA( HWND hwnd, LPCSTR lpszHelp, UINT uCommand, DWORD dwData)
1076{
1077 static WORD WM_WINHELP = 0;
1078 HWND hDest;
1079 LPWINHELP lpwh;
1080 HGLOBAL hwh;
1081 HINSTANCE winhelp;
1082 int size,dsize,nlen;
1083
1084 dprintf(("USER32: WinHelpA %s\n", lpszHelp));
1085
1086 if(!WM_WINHELP)
1087 {
1088 WM_WINHELP=RegisterWindowMessageA("WM_WINHELP");
1089 if(!WM_WINHELP)
1090 return FALSE;
1091 }
1092
1093 hDest = FindWindowA( "MS_WINHELP", NULL );
1094 if(!hDest)
1095 {
1096 if(uCommand == HELP_QUIT)
1097 return TRUE;
1098 else
1099 winhelp = WinExec ( "winhlp32.exe -x", SW_SHOWNORMAL );
1100 if ( winhelp <= 32 ) return FALSE;
1101 if ( ! ( hDest = FindWindowA ( "MS_WINHELP", NULL ) )) return FALSE;
1102 }
1103
1104 switch(uCommand)
1105 {
1106 case HELP_CONTEXT:
1107 case HELP_SETCONTENTS:
1108 case HELP_CONTENTS:
1109 case HELP_CONTEXTPOPUP:
1110 case HELP_FORCEFILE:
1111 case HELP_HELPONHELP:
1112 case HELP_FINDER:
1113 case HELP_QUIT:
1114 dsize=0;
1115 break;
1116
1117 case HELP_KEY:
1118 case HELP_PARTIALKEY:
1119 case HELP_COMMAND:
1120 dsize = strlen( (LPSTR)dwData )+1;
1121 break;
1122
1123 case HELP_MULTIKEY:
1124 dsize = ((LPMULTIKEYHELP)dwData)->mkSize;
1125 break;
1126
1127 case HELP_SETWINPOS:
1128 dsize = ((LPHELPWININFO)dwData)->wStructSize;
1129 break;
1130
1131 default:
1132 //WARN("Unknown help command %d\n",wCommand);
1133 return FALSE;
1134 }
1135 if(lpszHelp)
1136 nlen = strlen(lpszHelp)+1;
1137 else
1138 nlen = 0;
1139 size = sizeof(WINHELP) + nlen + dsize;
1140 hwh = GlobalAlloc(0,size);
1141 lpwh = (WINHELP*)GlobalLock(hwh);
1142 lpwh->size = size;
1143 lpwh->command = uCommand;
1144 lpwh->data = dwData;
1145 if(nlen)
1146 {
1147 strcpy(((char*)lpwh) + sizeof(WINHELP),lpszHelp);
1148 lpwh->ofsFilename = sizeof(WINHELP);
1149 } else
1150 lpwh->ofsFilename = 0;
1151 if(dsize)
1152 {
1153 memcpy(((char*)lpwh)+sizeof(WINHELP)+nlen,(LPSTR)dwData,dsize);
1154 lpwh->ofsData = sizeof(WINHELP)+nlen;
1155 } else
1156 lpwh->ofsData = 0;
1157 GlobalUnlock(hwh);
1158
1159 return SendMessageA(hDest,WM_WINHELP,hwnd,hwh);
1160}
1161//******************************************************************************
1162//******************************************************************************
1163BOOL WIN32API WinHelpW( HWND hwnd, LPCWSTR lpszHelp, UINT uCommand, DWORD dwData)
1164{
1165 char *astring = UnicodeToAsciiString((LPWSTR)lpszHelp);
1166 BOOL rc;
1167
1168 dprintf(("USER32: WinHelpW\n"));
1169
1170 rc = WinHelpA(hwnd,astring,uCommand,dwData);
1171 FreeAsciiString(astring);
1172
1173 return rc;
1174}
1175
1176/* Keyboard and Input Functions */
1177
1178BOOL WIN32API ActivateKeyboardLayout(HKL hkl, UINT fuFlags)
1179{
1180 dprintf(("USER32: ActivateKeyboardLayout, not implemented\n"));
1181 return(TRUE);
1182}
1183//******************************************************************************
1184//SvL: 24-6-'97 - Added
1185//TODO: Not implemented
1186//******************************************************************************
1187WORD WIN32API GetAsyncKeyState(INT nVirtKey)
1188{
1189 dprintf2(("USER32: GetAsyncKeyState Not implemented\n"));
1190 return 0;
1191}
1192/*****************************************************************************
1193 * Name : UINT WIN32API GetKBCodePage
1194 * Purpose : The GetKBCodePage function is provided for compatibility with
1195 * earlier versions of Windows. In the Win32 application programming
1196 * interface (API) it just calls the GetOEMCP function.
1197 * Parameters:
1198 * Variables :
1199 * Result : If the function succeeds, the return value is an OEM code-page
1200 * identifier, or it is the default identifier if the registry
1201 * value is not readable. For a list of OEM code-page identifiers,
1202 * see GetOEMCP.
1203 * Remark :
1204 * Status : UNTESTED
1205 *
1206 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
1207 *****************************************************************************/
1208
1209UINT WIN32API GetKBCodePage(VOID)
1210{
1211 return (GetOEMCP());
1212}
1213//******************************************************************************
1214//******************************************************************************
1215int WIN32API GetKeyNameTextA( LPARAM lParam, LPSTR lpString, int nSize)
1216{
1217 dprintf(("USER32: GetKeyNameTextA\n"));
1218 return O32_GetKeyNameText(lParam,lpString,nSize);
1219}
1220//******************************************************************************
1221//******************************************************************************
1222int WIN32API GetKeyNameTextW( LPARAM lParam, LPWSTR lpString, int nSize)
1223{
1224 dprintf(("USER32: GetKeyNameTextW DOES NOT WORK\n"));
1225 // NOTE: This will not work as is (needs UNICODE support)
1226 return 0;
1227// return O32_GetKeyNameText(arg1, arg2, arg3);
1228}
1229//******************************************************************************
1230//SvL: 24-6-'97 - Added
1231//******************************************************************************
1232SHORT WIN32API GetKeyState( int nVirtKey)
1233{
1234//SvL: Hehe. 32 MB logfile for Opera after a minute.
1235 dprintf2(("USER32: GetKeyState %d\n", nVirtKey));
1236 return O32_GetKeyState(nVirtKey);
1237}
1238/*****************************************************************************
1239 * Name : VOID WIN32API keybd_event
1240 * Purpose : The keybd_event function synthesizes a keystroke. The system
1241 * can use such a synthesized keystroke to generate a WM_KEYUP or
1242 * WM_KEYDOWN message. The keyboard driver's interrupt handler calls
1243 * the keybd_event function.
1244 * Parameters: BYTE bVk virtual-key code
1245
1246 * BYTE bScan hardware scan code
1247 * DWORD dwFlags flags specifying various function options
1248 * DWORD dwExtraInfo additional data associated with keystroke
1249 * Variables :
1250 * Result :
1251 * Remark :
1252 * Status : UNTESTED STUB
1253 *
1254 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
1255 *****************************************************************************/
1256VOID WIN32API keybd_event (BYTE bVk,
1257 BYTE bScan,
1258 DWORD dwFlags,
1259 DWORD dwExtraInfo)
1260{
1261 dprintf(("USER32:keybd_event (%u,%u,%08xh,%08x) not implemented.\n",
1262 bVk,
1263 bScan,
1264 dwFlags,
1265 dwExtraInfo));
1266}
1267/*****************************************************************************
1268 * Name : HLK WIN32API LoadKeyboardLayoutA
1269 * Purpose : The LoadKeyboardLayout function loads a new keyboard layout into
1270 * the system. Several keyboard layouts can be loaded at a time, but
1271 * only one per process is active at a time. Loading multiple keyboard
1272 * layouts makes it possible to rapidly switch between layouts.
1273 * Parameters:
1274 * Variables :
1275 * Result : If the function succeeds, the return value is the handle of the
1276 * keyboard layout.
1277 * If the function fails, the return value is NULL. To get extended
1278 * error information, call GetLastError.
1279 * Remark :
1280 * Status : UNTESTED STUB
1281 *
1282 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
1283 *****************************************************************************/
1284HKL WIN32API LoadKeyboardLayoutA(LPCTSTR pwszKLID,
1285 UINT Flags)
1286{
1287 dprintf(("USER32:LeadKeyboardLayoutA (%s,%u) not implemented.\n",
1288 pwszKLID,
1289 Flags));
1290
1291 return (NULL);
1292}
1293/*****************************************************************************
1294 * Name : HLK WIN32API LoadKeyboardLayoutW
1295 * Purpose : The LoadKeyboardLayout function loads a new keyboard layout into
1296 * the system. Several keyboard layouts can be loaded at a time, but
1297 * only one per process is active at a time. Loading multiple keyboard
1298 * layouts makes it possible to rapidly switch between layouts.
1299 * Parameters:
1300 * Variables :
1301 * Result : If the function succeeds, the return value is the handle of the
1302 * keyboard layout.
1303 * If the function fails, the return value is NULL. To get extended
1304 * error information, call GetLastError.
1305 * Remark :
1306 * Status : UNTESTED STUB
1307 *
1308 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
1309 *****************************************************************************/
1310HKL WIN32API LoadKeyboardLayoutW(LPCWSTR pwszKLID,
1311 UINT Flags)
1312{
1313 dprintf(("USER32:LeadKeyboardLayoutW (%s,%u) not implemented.\n",
1314 pwszKLID,
1315 Flags));
1316
1317 return (NULL);
1318}
1319//******************************************************************************
1320//******************************************************************************
1321UINT WIN32API MapVirtualKeyA( UINT uCode, UINT uMapType)
1322{
1323 dprintf(("USER32: MapVirtualKeyA\n"));
1324 return O32_MapVirtualKey(uCode,uMapType);
1325}
1326//******************************************************************************
1327//******************************************************************************
1328UINT WIN32API MapVirtualKeyW( UINT uCode, UINT uMapType)
1329{
1330 dprintf(("USER32: MapVirtualKeyW\n"));
1331 // NOTE: This will not work as is (needs UNICODE support)
1332 return O32_MapVirtualKey(uCode,uMapType);
1333}
1334/*****************************************************************************
1335 * Name : UINT WIN32API MapVirtualKeyExA
1336 * Purpose : The MapVirtualKeyEx function translates (maps) a virtual-key
1337 * code into a scan code or character value, or translates a scan
1338 * code into a virtual-key code. The function translates the codes
1339 * using the input language and physical keyboard layout identified
1340 * by the given keyboard layout handle.
1341 * Parameters:
1342 * Variables :
1343 * Result : The return value is either a scan code, a virtual-key code, or
1344 * a character value, depending on the value of uCode and uMapType.
1345 * If there is no translation, the return value is zero.
1346 * Remark :
1347 * Status : UNTESTED STUB
1348 *
1349 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
1350 *****************************************************************************/
1351UINT WIN32API MapVirtualKeyExA(UINT uCode,
1352 UINT uMapType,
1353 HKL dwhkl)
1354{
1355 dprintf(("USER32:MapVirtualKeyExA (%u,%u,%08x) not implemented.\n",
1356 uCode,
1357 uMapType,
1358 dwhkl));
1359
1360 return (0);
1361}
1362/*****************************************************************************
1363 * Name : UINT WIN32API MapVirtualKeyExW
1364 * Purpose : The MapVirtualKeyEx function translates (maps) a virtual-key
1365 * code into a scan code or character value, or translates a scan
1366 * code into a virtual-key code. The function translates the codes
1367 * using the input language and physical keyboard layout identified
1368 * by the given keyboard layout handle.
1369 * Parameters:
1370 * Variables :
1371 * Result : The return value is either a scan code, a virtual-key code, or
1372 * a character value, depending on the value of uCode and uMapType.
1373 * If there is no translation, the return value is zero.
1374 * Remark :
1375 * Status : UNTESTED STUB
1376
1377 *
1378 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
1379 *****************************************************************************/
1380UINT WIN32API MapVirtualKeyExW(UINT uCode,
1381 UINT uMapType,
1382 HKL dwhkl)
1383{
1384 dprintf(("USER32:MapVirtualKeyExW (%u,%u,%08x) not implemented.\n",
1385 uCode,
1386 uMapType,
1387 dwhkl));
1388
1389 return (0);
1390}
1391/*****************************************************************************
1392 * Name : DWORD WIN32API OemKeyScan
1393 * Purpose : The OemKeyScan function maps OEM ASCII codes 0 through 0x0FF
1394 * into the OEM scan codes and shift states. The function provides
1395 * information that allows a program to send OEM text to another
1396 * program by simulating keyboard input.
1397 * Parameters:
1398 * Variables :
1399 * Result :
1400 * Remark :
1401 * Status : UNTESTED STUB
1402 *
1403 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
1404 *****************************************************************************/
1405DWORD WIN32API OemKeyScan(WORD wOemChar)
1406{
1407 dprintf(("USER32:OemKeyScan (%u) not implemented.\n",
1408 wOemChar));
1409
1410 return (wOemChar);
1411}
1412//******************************************************************************
1413//******************************************************************************
1414BOOL WIN32API RegisterHotKey(HWND hwnd, int idHotKey, UINT fuModifiers, UINT uVirtKey)
1415{
1416 dprintf(("USER32: RegisterHotKey, not implemented\n"));
1417 hwnd = Win32Window::Win32ToOS2Handle(hwnd);
1418 return(TRUE);
1419}
1420/*****************************************************************************
1421 * Name : int WIN32API ToAscii
1422 * Purpose : The ToAscii function translates the specified virtual-key code
1423 * and keyboard state to the corresponding Windows character or characters.
1424 * Parameters: UINT uVirtKey virtual-key code
1425 * UINT uScanCode scan code
1426 * PBYTE lpbKeyState address of key-state array
1427 * LPWORD lpwTransKey buffer for translated key
1428 * UINT fuState active-menu flag
1429 * Variables :
1430 * Result : 0 The specified virtual key has no translation for the current
1431 * state of the keyboard.
1432 * 1 One Windows character was copied to the buffer.
1433 * 2 Two characters were copied to the buffer. This usually happens
1434 * when a dead-key character (accent or diacritic) stored in the
1435 * keyboard layout cannot be composed with the specified virtual
1436 * key to form a single character.
1437 * Remark :
1438 * Status : UNTESTED STUB
1439 *
1440 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
1441 *****************************************************************************/
1442int WIN32API ToAscii(UINT uVirtKey,
1443 UINT uScanCode,
1444 PBYTE lpbKeyState,
1445 LPWORD lpwTransKey,
1446 UINT fuState)
1447{
1448 dprintf(("USER32:ToAscii (%u,%u,%08xh,%08xh,%u) not implemented.\n",
1449 uVirtKey,
1450 uScanCode,
1451 lpbKeyState,
1452 lpwTransKey,
1453 fuState));
1454
1455 return (0);
1456}
1457/*****************************************************************************
1458 * Name : int WIN32API ToAsciiEx
1459 * Purpose : The ToAscii function translates the specified virtual-key code
1460 * and keyboard state to the corresponding Windows character or characters.
1461 * Parameters: UINT uVirtKey virtual-key code
1462 * UINT uScanCode scan code
1463 * PBYTE lpbKeyState address of key-state array
1464 * LPWORD lpwTransKey buffer for translated key
1465 * UINT fuState active-menu flag
1466 * HLK hlk keyboard layout handle
1467 * Variables :
1468 * Result : 0 The specified virtual key has no translation for the current
1469 * state of the keyboard.
1470 * 1 One Windows character was copied to the buffer.
1471 * 2 Two characters were copied to the buffer. This usually happens
1472 * when a dead-key character (accent or diacritic) stored in the
1473 * keyboard layout cannot be composed with the specified virtual
1474 * key to form a single character.
1475 * Remark :
1476 * Status : UNTESTED STUB
1477 *
1478 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
1479 *****************************************************************************/
1480int WIN32API ToAsciiEx(UINT uVirtKey,
1481 UINT uScanCode,
1482 PBYTE lpbKeyState,
1483 LPWORD lpwTransKey,
1484 UINT fuState,
1485 HKL hkl)
1486{
1487 dprintf(("USER32:ToAsciiEx (%u,%u,%08xh,%08xh,%u,%08x) not implemented.\n",
1488 uVirtKey,
1489 uScanCode,
1490 lpbKeyState,
1491 lpwTransKey,
1492 fuState,
1493 hkl));
1494
1495 return (0);
1496}
1497/*****************************************************************************
1498 * Name : int WIN32API ToUnicode
1499 * Purpose : The ToUnicode function translates the specified virtual-key code
1500 * and keyboard state to the corresponding Unicode character or characters.
1501 * Parameters: UINT wVirtKey virtual-key code
1502 * UINT wScanCode scan code
1503 * PBYTE lpKeyState address of key-state array
1504 * LPWSTR pwszBuff buffer for translated key
1505 * int cchBuff size of translated key buffer
1506 * UINT wFlags set of function-conditioning flags
1507 * Variables :
1508 * Result : - 1 The specified virtual key is a dead-key character (accent or
1509 * diacritic). This value is returned regardless of the keyboard
1510 * layout, even if several characters have been typed and are
1511 * stored in the keyboard state. If possible, even with Unicode
1512 * keyboard layouts, the function has written a spacing version of
1513 * the dead-key character to the buffer specified by pwszBuffer.
1514 * For example, the function writes the character SPACING ACUTE
1515 * (0x00B4), rather than the character NON_SPACING ACUTE (0x0301).
1516 * 0 The specified virtual key has no translation for the current
1517 * state of the keyboard. Nothing was written to the buffer
1518 * specified by pwszBuffer.
1519 * 1 One character was written to the buffer specified by pwszBuffer.
1520 * 2 or more Two or more characters were written to the buffer specified by
1521 * pwszBuff. The most common cause for this is that a dead-key
1522 * character (accent or diacritic) stored in the keyboard layout
1523 * could not be combined with the specified virtual key to form a
1524 * single character.
1525 * Remark :
1526 * Status : UNTESTED STUB
1527 *
1528 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
1529 *****************************************************************************/
1530int WIN32API ToUnicode(UINT uVirtKey,
1531 UINT uScanCode,
1532 PBYTE lpKeyState,
1533 LPWSTR pwszBuff,
1534 int cchBuff,
1535 UINT wFlags)
1536{
1537 dprintf(("USER32:ToUnicode (%u,%u,%08xh,%08xh,%u,%08x) not implemented.\n",
1538 uVirtKey,
1539 uScanCode,
1540 lpKeyState,
1541 pwszBuff,
1542 cchBuff,
1543 wFlags));
1544
1545 return (0);
1546}
1547/*****************************************************************************
1548 * Name : BOOL WIN32API UnloadKeyboardLayout
1549 * Purpose : The UnloadKeyboardLayout function removes a keyboard layout.
1550 * Parameters: HKL hkl handle of keyboard layout
1551 * Variables :
1552 * Result : If the function succeeds, the return value is the handle of the
1553 * keyboard layout; otherwise, it is NULL. To get extended error
1554 * information, use the GetLastError function.
1555 * Remark :
1556 * Status : UNTESTED STUB
1557 *
1558 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
1559 *****************************************************************************/
1560BOOL WIN32API UnloadKeyboardLayout (HKL hkl)
1561{
1562 dprintf(("USER32:UnloadKeyboardLayout (%08x) not implemented.\n",
1563 hkl));
1564
1565 return (0);
1566}
1567//******************************************************************************
1568//******************************************************************************
1569BOOL WIN32API UnregisterHotKey(HWND hwnd, int idHotKey)
1570{
1571 dprintf(("USER32: UnregisterHotKey, not implemented\n"));
1572 hwnd = Win32Window::Win32ToOS2Handle(hwnd);
1573
1574 return(TRUE);
1575}
1576//******************************************************************************
1577//SvL: 24-6-'97 - Added
1578//******************************************************************************
1579WORD WIN32API VkKeyScanA( char ch)
1580{
1581 dprintf(("USER32: VkKeyScanA\n"));
1582 return O32_VkKeyScan(ch);
1583}
1584//******************************************************************************
1585//******************************************************************************
1586WORD WIN32API VkKeyScanW( WCHAR wch)
1587{
1588 dprintf(("USER32: VkKeyScanW\n"));
1589 // NOTE: This will not work as is (needs UNICODE support)
1590 return O32_VkKeyScan((char)wch);
1591}
1592/*****************************************************************************
1593 * Name : SHORT WIN32API VkKeyScanExW
1594 * Purpose : The VkKeyScanEx function translates a character to the
1595 * corresponding virtual-key code and shift state. The function
1596 * translates the character using the input language and physical
1597 * keyboard layout identified by the given keyboard layout handle.
1598 * Parameters: UINT uChar character to translate
1599 * HKL hkl keyboard layout handle
1600 * Variables :
1601 * Result : see docs
1602 * Remark :
1603 * Status : UNTESTED STUB
1604 *
1605 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
1606 *****************************************************************************/
1607WORD WIN32API VkKeyScanExW(WCHAR uChar,
1608 HKL hkl)
1609{
1610 dprintf(("USER32:VkKeyScanExW (%u,%08x) not implemented.\n",
1611 uChar,
1612 hkl));
1613
1614 return (uChar);
1615}
1616/*****************************************************************************
1617 * Name : SHORT WIN32API VkKeyScanExA
1618 * Purpose : The VkKeyScanEx function translates a character to the
1619 * corresponding virtual-key code and shift state. The function
1620 * translates the character using the input language and physical
1621 * keyboard layout identified by the given keyboard layout handle.
1622 * Parameters: UINT uChar character to translate
1623 * HKL hkl keyboard layout handle
1624 * Variables :
1625 * Result : see docs
1626 * Remark :
1627 * Status : UNTESTED STUB
1628 *
1629 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
1630 *****************************************************************************/
1631WORD WIN32API VkKeyScanExA(CHAR uChar,
1632 HKL hkl)
1633{
1634 dprintf(("USER32:VkKeyScanExA (%u,%08x) not implemented.\n",
1635 uChar,
1636 hkl));
1637
1638 return (uChar);
1639}
1640
1641/* Window Functions */
1642
1643/*****************************************************************************
1644 * Name : BOOL WIN32API AnyPopup
1645 * Purpose : The AnyPopup function indicates whether an owned, visible,
1646 * top-level pop-up, or overlapped window exists on the screen. The
1647 * function searches the entire Windows screen, not just the calling
1648 * application's client area.
1649 * Parameters: VOID
1650 * Variables :
1651 * Result : If a pop-up window exists, the return value is TRUE even if the
1652 * pop-up window is completely covered by other windows. Otherwise,
1653 * it is FALSE.
1654 * Remark : AnyPopup is a Windows version 1.x function and is retained for
1655 * compatibility purposes. It is generally not useful.
1656 * Status : UNTESTED STUB
1657 *
1658 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
1659 *****************************************************************************/
1660BOOL WIN32API AnyPopup(VOID)
1661{
1662 dprintf(("USER32:AnyPopup() not implemented.\n"));
1663
1664 return (FALSE);
1665}
1666
1667/*****************************************************************************
1668 * Name : BOOL WIN32API PaintDesktop
1669 * Purpose : The PaintDesktop function fills the clipping region in the
1670 * specified device context with the desktop pattern or wallpaper.
1671 * The function is provided primarily for shell desktops.
1672 * Parameters:
1673 * Variables :
1674 * Result : If the function succeeds, the return value is TRUE.
1675 * If the function fails, the return value is FALSE.
1676 * Remark :
1677 * Status : UNTESTED STUB
1678 *
1679 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
1680 *****************************************************************************/
1681BOOL WIN32API PaintDesktop(HDC hdc)
1682{
1683 dprintf(("USER32:PaintDesktop (%08x) not implemented.\n",
1684 hdc));
1685
1686 return (FALSE);
1687}
1688
1689/* Filled Shape Functions */
1690
1691
1692int WIN32API FillRect(HDC hDC, const RECT * lprc, HBRUSH hbr)
1693{
1694 dprintf2(("USER32: FillRect (%d,%d)(%d,%d) brush %X\n", lprc->left, lprc->top, lprc->right, lprc->bottom, hbr));
1695 return O32_FillRect(hDC,lprc,hbr);
1696}
1697//******************************************************************************
1698//******************************************************************************
1699int WIN32API FrameRect( HDC hDC, const RECT * lprc, HBRUSH hbr)
1700{
1701 dprintf(("USER32: FrameRect"));
1702 return O32_FrameRect(hDC,lprc,hbr);
1703}
1704//******************************************************************************
1705//******************************************************************************
1706BOOL WIN32API InvertRect( HDC hDC, const RECT * lprc)
1707{
1708 dprintf(("USER32: InvertRect\n"));
1709 return O32_InvertRect(hDC,lprc);
1710}
1711
1712/* System Information Functions */
1713
1714int WIN32API GetKeyboardType( int nTypeFlag)
1715{
1716 dprintf(("USER32: GetKeyboardType\n"));
1717 return O32_GetKeyboardType(nTypeFlag);
1718}
1719
1720/* Window Station and Desktop Functions */
1721
1722/*****************************************************************************
1723 * Name : HDESK WIN32API GetThreadDesktop
1724 * Purpose : The GetThreadDesktop function returns a handle to the desktop
1725 * associated with a specified thread.
1726 * Parameters: DWORD dwThreadId thread identifier
1727 * Variables :
1728 * Result : If the function succeeds, the return value is the handle of the
1729 * desktop associated with the specified thread.
1730 * Remark :
1731 * Status : UNTESTED STUB
1732 *
1733 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
1734 *****************************************************************************/
1735HDESK WIN32API GetThreadDesktop(DWORD dwThreadId)
1736{
1737 dprintf(("USER32:GetThreadDesktop (%u) not implemented.\n",
1738 dwThreadId));
1739
1740 return (NULL);
1741}
1742
1743/*****************************************************************************
1744 * Name : BOOL WIN32API CloseDesktop
1745 * Purpose : The CloseDesktop function closes an open handle of a desktop
1746 * object. A desktop is a secure object contained within a window
1747 * station object. A desktop has a logical display surface and
1748 * contains windows, menus and hooks.
1749 * Parameters: HDESK hDesktop
1750 * Variables :
1751 * Result : If the function succeeds, the return value is TRUE.
1752 * If the functions fails, the return value is FALSE. To get
1753 * extended error information, call GetLastError.
1754 * Remark :
1755 * Status : UNTESTED STUB
1756 *
1757 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
1758 *****************************************************************************/
1759BOOL WIN32API CloseDesktop(HDESK hDesktop)
1760{
1761 dprintf(("USER32:CloseDesktop(%08x) not implemented.\n",
1762 hDesktop));
1763
1764 return (FALSE);
1765}
1766/*****************************************************************************
1767 * Name : BOOL WIN32API CloseWindowStation
1768 * Purpose : The CloseWindowStation function closes an open window station handle.
1769 * Parameters: HWINSTA hWinSta
1770 * Variables :
1771 * Result :
1772 * Remark : If the function succeeds, the return value is TRUE.
1773 * If the functions fails, the return value is FALSE. To get
1774 * extended error information, call GetLastError.
1775 * Status : UNTESTED STUB
1776 *
1777 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
1778 *****************************************************************************/
1779BOOL WIN32API CloseWindowStation(HWINSTA hWinSta)
1780{
1781 dprintf(("USER32:CloseWindowStation(%08x) not implemented.\n",
1782 hWinSta));
1783
1784 return (FALSE);
1785}
1786/*****************************************************************************
1787 * Name : HDESK WIN32API CreateDesktopA
1788 * Purpose : The CreateDesktop function creates a new desktop on the window
1789 * station associated with the calling process.
1790 * Parameters: LPCTSTR lpszDesktop name of the new desktop
1791 * LPCTSTR lpszDevice name of display device to assign to the desktop
1792 * LPDEVMODE pDevMode reserved; must be NULL
1793 * DWORD dwFlags flags to control interaction with other applications
1794 * DWORD dwDesiredAccess specifies access of returned handle
1795 * LPSECURITY_ATTRIBUTES lpsa specifies security attributes of the desktop
1796 * Variables :
1797 * Result : If the function succeeds, the return value is a handle of the
1798 * newly created desktop.
1799 * If the function fails, the return value is NULL. To get extended
1800 * error information, call GetLastError.
1801 * Remark :
1802 * Status : UNTESTED STUB
1803 *
1804 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
1805 *****************************************************************************/
1806HDESK WIN32API CreateDesktopA(LPCTSTR lpszDesktop,
1807 LPCTSTR lpszDevice,
1808 LPDEVMODEA pDevMode,
1809 DWORD dwFlags,
1810 DWORD dwDesiredAccess,
1811 LPSECURITY_ATTRIBUTES lpsa)
1812{
1813 dprintf(("USER32:CreateDesktopA(%s,%s,%08xh,%08xh,%08xh,%08x) not implemented.\n",
1814 lpszDesktop,
1815 lpszDevice,
1816 pDevMode,
1817 dwFlags,
1818 dwDesiredAccess,
1819 lpsa));
1820
1821 return (NULL);
1822}
1823/*****************************************************************************
1824 * Name : HDESK WIN32API CreateDesktopW
1825 * Purpose : The CreateDesktop function creates a new desktop on the window
1826 * station associated with the calling process.
1827 * Parameters: LPCTSTR lpszDesktop name of the new desktop
1828 * LPCTSTR lpszDevice name of display device to assign to the desktop
1829 * LPDEVMODE pDevMode reserved; must be NULL
1830 * DWORD dwFlags flags to control interaction with other applications
1831 * DWORD dwDesiredAccess specifies access of returned handle
1832 * LPSECURITY_ATTRIBUTES lpsa specifies security attributes of the desktop
1833 * Variables :
1834 * Result : If the function succeeds, the return value is a handle of the
1835 * newly created desktop.
1836 * If the function fails, the return value is NULL. To get extended
1837 * error information, call GetLastError.
1838 * Remark :
1839 * Status : UNTESTED STUB
1840 *
1841 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
1842 *****************************************************************************/
1843HDESK WIN32API CreateDesktopW(LPCTSTR lpszDesktop,
1844 LPCTSTR lpszDevice,
1845 LPDEVMODEW pDevMode,
1846 DWORD dwFlags,
1847 DWORD dwDesiredAccess,
1848 LPSECURITY_ATTRIBUTES lpsa)
1849{
1850 dprintf(("USER32:CreateDesktopW(%s,%s,%08xh,%08xh,%08xh,%08x) not implemented.\n",
1851 lpszDesktop,
1852 lpszDevice,
1853 pDevMode,
1854 dwFlags,
1855 dwDesiredAccess,
1856 lpsa));
1857
1858 return (NULL);
1859}
1860/*****************************************************************************
1861 * Name : HWINSTA WIN32API CreateWindowStationA
1862 * Purpose : The CreateWindowStation function creates a window station object.
1863 * It returns a handle that can be used to access the window station.
1864 * A window station is a secure object that contains a set of global
1865 * atoms, a clipboard, and a set of desktop objects.
1866 * Parameters: LPTSTR lpwinsta name of the new window station
1867 * DWORD dwReserved reserved; must be NULL
1868 * DWORD dwDesiredAccess specifies access of returned handle
1869 * LPSECURITY_ATTRIBUTES lpsa specifies security attributes of the window station
1870 * Variables :
1871 * Result : If the function succeeds, the return value is the handle to the
1872 * newly created window station.
1873 * If the function fails, the return value is NULL. To get extended
1874 * error information, call GetLastError.
1875 * Remark :
1876 * Status : UNTESTED STUB
1877 *
1878 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
1879 *****************************************************************************/
1880HWINSTA WIN32API CreateWindowStationA(LPTSTR lpWinSta,
1881 DWORD dwReserved,
1882 DWORD dwDesiredAccess,
1883 LPSECURITY_ATTRIBUTES lpsa)
1884{
1885 dprintf(("USER32:CreateWindowStationA(%s,%08xh,%08xh,%08x) not implemented.\n",
1886 lpWinSta,
1887 dwReserved,
1888 dwDesiredAccess,
1889 lpsa));
1890
1891 return (NULL);
1892}
1893/*****************************************************************************
1894 * Name : HWINSTA WIN32API CreateWindowStationW
1895 * Purpose : The CreateWindowStation function creates a window station object.
1896 * It returns a handle that can be used to access the window station.
1897 * A window station is a secure object that contains a set of global
1898 * atoms, a clipboard, and a set of desktop objects.
1899 * Parameters: LPTSTR lpwinsta name of the new window station
1900 * DWORD dwReserved reserved; must be NULL
1901 * DWORD dwDesiredAccess specifies access of returned handle
1902 * LPSECURITY_ATTRIBUTES lpsa specifies security attributes of the window station
1903 * Variables :
1904 * Result : If the function succeeds, the return value is the handle to the
1905 * newly created window station.
1906 * If the function fails, the return value is NULL. To get extended
1907 * error information, call GetLastError.
1908 * Remark :
1909 * Status : UNTESTED STUB
1910 *
1911 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
1912 *****************************************************************************/
1913HWINSTA WIN32API CreateWindowStationW(LPWSTR lpWinSta,
1914 DWORD dwReserved,
1915 DWORD dwDesiredAccess,
1916 LPSECURITY_ATTRIBUTES lpsa)
1917{
1918 dprintf(("USER32:CreateWindowStationW(%s,%08xh,%08xh,%08x) not implemented.\n",
1919 lpWinSta,
1920 dwReserved,
1921 dwDesiredAccess,
1922 lpsa));
1923
1924 return (NULL);
1925}
1926/*****************************************************************************
1927 * Name : BOOL WIN32API EnumDesktopWindows
1928 * Purpose : The EnumDesktopWindows function enumerates all windows in a
1929 * desktop by passing the handle of each window, in turn, to an
1930 * application-defined callback function.
1931 * Parameters: HDESK hDesktop handle of desktop to enumerate
1932 * WNDENUMPROC lpfn points to application's callback function
1933 * LPARAM lParam 32-bit value to pass to the callback function
1934 * Variables :
1935 * Result : If the function succeeds, the return value is TRUE.
1936 * If the function fails, the return value is FALSE. To get
1937 * extended error information, call GetLastError.
1938 * Remark :
1939 * Status : UNTESTED STUB
1940 *
1941 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
1942 *****************************************************************************/
1943BOOL WIN32API EnumDesktopWindows(HDESK hDesktop,
1944 WNDENUMPROC lpfn,
1945 LPARAM lParam)
1946{
1947 dprintf(("USER32:EnumDesktopWindows (%08xh,%08xh,%08x) not implemented.\n",
1948 hDesktop,
1949 lpfn,
1950 lParam));
1951
1952 return (FALSE);
1953}
1954/*****************************************************************************
1955 * Name : BOOL WIN32API EnumDesktopsA
1956 * Purpose : The EnumDesktops function enumerates all desktops in the window
1957 * station assigned to the calling process. The function does so by
1958 * passing the name of each desktop, in turn, to an application-
1959 * defined callback function.
1960 * Parameters: HWINSTA hwinsta handle of window station to enumerate
1961 * DESKTOPENUMPROC lpEnumFunc points to application's callback function
1962 * LPARAM lParam 32-bit value to pass to the callback function
1963 * Variables :
1964 * Result : If the function succeeds, the return value is TRUE.
1965 * If the function fails, the return value is FALSE. To get extended
1966 * error information, call GetLastError.
1967 * Remark :
1968 * Status : UNTESTED STUB
1969 *
1970 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
1971 *****************************************************************************/
1972BOOL WIN32API EnumDesktopsA(HWINSTA hWinSta,
1973 DESKTOPENUMPROCA lpEnumFunc,
1974 LPARAM lParam)
1975{
1976 dprintf(("USER32:EnumDesktopsA (%08xh,%08xh,%08x) not implemented.\n",
1977 hWinSta,
1978 lpEnumFunc,
1979 lParam));
1980
1981 return (FALSE);
1982}
1983/*****************************************************************************
1984 * Name : BOOL WIN32API EnumDesktopsW
1985 * Purpose : The EnumDesktops function enumerates all desktops in the window
1986 * station assigned to the calling process. The function does so by
1987 * passing the name of each desktop, in turn, to an application-
1988 * defined callback function.
1989 * Parameters: HWINSTA hwinsta handle of window station to enumerate
1990 * DESKTOPENUMPROC lpEnumFunc points to application's callback function
1991 * LPARAM lParam 32-bit value to pass to the callback function
1992 * Variables :
1993 * Result : If the function succeeds, the return value is TRUE.
1994 * If the function fails, the return value is FALSE. To get extended
1995 * error information, call GetLastError.
1996 * Remark :
1997 * Status : UNTESTED STUB
1998 *
1999 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
2000 *****************************************************************************/
2001BOOL WIN32API EnumDesktopsW(HWINSTA hWinSta,
2002 DESKTOPENUMPROCW lpEnumFunc,
2003 LPARAM lParam)
2004{
2005 dprintf(("USER32:EnumDesktopsW (%08xh,%08xh,%08x) not implemented.\n",
2006 hWinSta,
2007 lpEnumFunc,
2008 lParam));
2009
2010 return (FALSE);
2011}
2012/*****************************************************************************
2013 * Name : BOOL WIN32API EnumWindowStationsA
2014 * Purpose : The EnumWindowStations function enumerates all windowstations
2015 * in the system by passing the name of each window station, in
2016 * turn, to an application-defined callback function.
2017 * Parameters:
2018 * Variables : WINSTAENUMPROC lpEnumFunc points to application's callback function
2019 * LPARAM lParam 32-bit value to pass to the callback function
2020 * Result : If the function succeeds, the return value is TRUE.
2021 * If the function fails the return value is FALSE. To get extended
2022 * error information, call GetLastError.
2023 * Remark :
2024 * Status : UNTESTED STUB
2025 *
2026 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
2027 *****************************************************************************/
2028BOOL WIN32API EnumWindowStationsA(WINSTAENUMPROCA lpEnumFunc,
2029 LPARAM lParam)
2030{
2031 dprintf(("USER32:EnumWindowStationsA (%08xh,%08x) not implemented.\n",
2032 lpEnumFunc,
2033 lParam));
2034
2035 return (FALSE);
2036}
2037/*****************************************************************************
2038 * Name : BOOL WIN32API EnumWindowStationsW
2039 * Purpose : The EnumWindowStations function enumerates all windowstations
2040 * in the system by passing the name of each window station, in
2041 * turn, to an application-defined callback function.
2042 * Parameters:
2043 * Variables : WINSTAENUMPROC lpEnumFunc points to application's callback function
2044 * LPARAM lParam 32-bit value to pass to the callback function
2045 * Result : If the function succeeds, the return value is TRUE.
2046 * If the function fails the return value is FALSE. To get extended
2047 * error information, call GetLastError.
2048 * Remark :
2049 * Status : UNTESTED STUB
2050 *
2051 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
2052 *****************************************************************************/
2053BOOL WIN32API EnumWindowStationsW(WINSTAENUMPROCW lpEnumFunc,
2054 LPARAM lParam)
2055{
2056 dprintf(("USER32:EnumWindowStationsW (%08xh,%08x) not implemented.\n",
2057 lpEnumFunc,
2058 lParam));
2059
2060 return (FALSE);
2061}
2062/*****************************************************************************
2063 * Name : HWINSTA WIN32API GetProcessWindowStation
2064 * Purpose : The GetProcessWindowStation function returns a handle of the
2065 * window station associated with the calling process.
2066 * Parameters:
2067 * Variables :
2068 * Result : If the function succeeds, the return value is a handle of the
2069 * window station associated with the calling process.
2070 * If the function fails, the return value is NULL. This can occur
2071 * if the calling process is not an application written for Windows
2072 * NT. To get extended error information, call GetLastError.
2073 * Remark :
2074 * Status : UNTESTED STUB
2075 *
2076 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
2077 *****************************************************************************/
2078HWINSTA WIN32API GetProcessWindowStation(VOID)
2079{
2080 dprintf(("USER32:GetProcessWindowStation () not implemented.\n"));
2081
2082 return (NULL);
2083}
2084/*****************************************************************************
2085 * Name : BOOL WIN32API GetUserObjectInformationA
2086 * Purpose : The GetUserObjectInformation function returns information about
2087 * a window station or desktop object.
2088 * Parameters: HANDLE hObj handle of object to get information for
2089 * int nIndex type of information to get
2090 * PVOID pvInfo points to buffer that receives the information
2091 * DWORD nLength size, in bytes, of pvInfo buffer
2092 * LPDWORD lpnLengthNeeded receives required size, in bytes, of pvInfo buffer
2093 * Variables :
2094 * Result : If the function succeeds, the return value is TRUE.
2095 * If the function fails, the return value is FALSE. To get extended
2096 * error information, call GetLastError.
2097 * Remark :
2098 * Status : UNTESTED STUB
2099 *
2100 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
2101 *****************************************************************************/
2102BOOL WIN32API GetUserObjectInformationA(HANDLE hObj,
2103 int nIndex,
2104 PVOID pvInfo,
2105 DWORD nLength,
2106 LPDWORD lpnLengthNeeded)
2107{
2108 dprintf(("USER32:GetUserObjectInformationA (%08xh,%08xh,%08xh,%u,%08x) not implemented.\n",
2109 hObj,
2110 nIndex,
2111 pvInfo,
2112 nLength,
2113 lpnLengthNeeded));
2114
2115 return (FALSE);
2116}
2117/*****************************************************************************
2118 * Name : BOOL WIN32API GetUserObjectInformationW
2119 * Purpose : The GetUserObjectInformation function returns information about
2120 * a window station or desktop object.
2121 * Parameters: HANDLE hObj handle of object to get information for
2122 * int nIndex type of information to get
2123 * PVOID pvInfo points to buffer that receives the information
2124 * DWORD nLength size, in bytes, of pvInfo buffer
2125 * LPDWORD lpnLengthNeeded receives required size, in bytes, of pvInfo buffer
2126 * Variables :
2127 * Result : If the function succeeds, the return value is TRUE.
2128 * If the function fails, the return value is FALSE. To get extended
2129 * error information, call GetLastError.
2130 * Remark :
2131 * Status : UNTESTED STUB
2132 *
2133 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
2134 *****************************************************************************/
2135BOOL WIN32API GetUserObjectInformationW(HANDLE hObj,
2136 int nIndex,
2137 PVOID pvInfo,
2138 DWORD nLength,
2139 LPDWORD lpnLengthNeeded)
2140{
2141 dprintf(("USER32:GetUserObjectInformationW (%08xh,%08xh,%08xh,%u,%08x) not implemented.\n",
2142 hObj,
2143 nIndex,
2144 pvInfo,
2145 nLength,
2146 lpnLengthNeeded));
2147
2148 return (FALSE);
2149}
2150/*****************************************************************************
2151 * Name : BOOL WIN32API GetUserObjectSecurity
2152 * Purpose : The GetUserObjectSecurity function retrieves security information
2153 * for the specified user object.
2154 * Parameters: HANDLE hObj handle of user object
2155 * SECURITY_INFORMATION * pSIRequested address of requested security information
2156 * LPSECURITY_DESCRIPTOR pSID address of security descriptor
2157 * DWORD nLength size of buffer for security descriptor
2158 * LPDWORD lpnLengthNeeded address of required size of buffer
2159 * Variables :
2160 * Result : If the function succeeds, the return value is TRUE.
2161 * If the function fails, the return value is FALSE. To get extended
2162 * error information, call GetLastError.
2163 * Remark :
2164 * Status : UNTESTED STUB
2165 *
2166 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
2167 *****************************************************************************/
2168BOOL WIN32API GetUserObjectSecurity(HANDLE hObj,
2169 PSECURITY_INFORMATION pSIRequested,
2170 PSECURITY_DESCRIPTOR pSID,
2171 DWORD nLength,
2172 LPDWORD lpnLengthNeeded)
2173{
2174 dprintf(("USER32:GetUserObjectSecurity (%08xh,%08xh,%08xh,%u,%08x) not implemented.\n",
2175 hObj,
2176 pSIRequested,
2177 pSID,
2178 nLength,
2179 lpnLengthNeeded));
2180
2181 return (FALSE);
2182}
2183/*****************************************************************************
2184 * Name : HDESK WIN32API OpenDesktopA
2185 * Purpose : The OpenDesktop function returns a handle to an existing desktop.
2186 * A desktop is a secure object contained within a window station
2187 * object. A desktop has a logical display surface and contains
2188 * windows, menus and hooks.
2189 * Parameters: LPCTSTR lpszDesktopName name of the desktop to open
2190 * DWORD dwFlags flags to control interaction with other applications
2191 * BOOL fInherit specifies whether returned handle is inheritable
2192 * DWORD dwDesiredAccess specifies access of returned handle
2193 * Variables :
2194 * Result : If the function succeeds, the return value is the handle to the
2195 * opened desktop.
2196 * If the function fails, the return value is NULL. To get extended
2197 * error information, call GetLastError.
2198 * Remark :
2199 * Status : UNTESTED STUB
2200 *
2201 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
2202 *****************************************************************************/
2203HDESK WIN32API OpenDesktopA(LPCTSTR lpszDesktopName,
2204 DWORD dwFlags,
2205 BOOL fInherit,
2206 DWORD dwDesiredAccess)
2207{
2208 dprintf(("USER32:OpenDesktopA (%s,%08xh,%08xh,%08x) not implemented.\n",
2209 lpszDesktopName,
2210 dwFlags,
2211 fInherit,
2212 dwDesiredAccess));
2213
2214 return (NULL);
2215}
2216/*****************************************************************************
2217 * Name : HDESK WIN32API OpenDesktopW
2218 * Purpose : The OpenDesktop function returns a handle to an existing desktop.
2219 * A desktop is a secure object contained within a window station
2220 * object. A desktop has a logical display surface and contains
2221 * windows, menus and hooks.
2222 * Parameters: LPCTSTR lpszDesktopName name of the desktop to open
2223 * DWORD dwFlags flags to control interaction with other applications
2224 * BOOL fInherit specifies whether returned handle is inheritable
2225 * DWORD dwDesiredAccess specifies access of returned handle
2226 * Variables :
2227 * Result : If the function succeeds, the return value is the handle to the
2228 * opened desktop.
2229 * If the function fails, the return value is NULL. To get extended
2230 * error information, call GetLastError.
2231 * Remark :
2232 * Status : UNTESTED STUB
2233 *
2234 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
2235 *****************************************************************************/
2236HDESK WIN32API OpenDesktopW(LPCTSTR lpszDesktopName,
2237 DWORD dwFlags,
2238 BOOL fInherit,
2239 DWORD dwDesiredAccess)
2240{
2241 dprintf(("USER32:OpenDesktopW (%s,%08xh,%08xh,%08x) not implemented.\n",
2242 lpszDesktopName,
2243 dwFlags,
2244 fInherit,
2245 dwDesiredAccess));
2246
2247 return (NULL);
2248}
2249/*****************************************************************************
2250 * Name : HDESK WIN32API OpenInputDesktop
2251 * Purpose : The OpenInputDesktop function returns a handle to the desktop
2252 * that receives user input. The input desktop is a desktop on the
2253 * window station associated with the logged-on user.
2254 * Parameters: DWORD dwFlags flags to control interaction with other applications
2255 * BOOL fInherit specifies whether returned handle is inheritable
2256 * DWORD dwDesiredAccess specifies access of returned handle
2257 * Variables :
2258 * Result : If the function succeeds, the return value is a handle of the
2259 * desktop that receives user input.
2260 * If the function fails, the return value is NULL. To get extended
2261 * error information, call GetLastError.
2262 * Remark :
2263 * Status : UNTESTED STUB
2264 *
2265 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
2266 *****************************************************************************/
2267HDESK WIN32API OpenInputDesktop(DWORD dwFlags,
2268 BOOL fInherit,
2269 DWORD dwDesiredAccess)
2270{
2271 dprintf(("USER32:OpenInputDesktop (%08xh,%08xh,%08x) not implemented.\n",
2272 dwFlags,
2273 fInherit,
2274 dwDesiredAccess));
2275
2276 return (NULL);
2277}
2278/*****************************************************************************
2279 * Name : HWINSTA WIN32API OpenWindowStationA
2280 * Purpose : The OpenWindowStation function returns a handle to an existing
2281 * window station.
2282 * Parameters: LPCTSTR lpszWinStaName name of the window station to open
2283 * BOOL fInherit specifies whether returned handle is inheritable
2284 * DWORD dwDesiredAccess specifies access of returned handle
2285 * Variables :
2286 * Result : If the function succeeds, the return value is the handle to the
2287 * specified window station.
2288 * If the function fails, the return value is NULL. To get extended
2289 * error information, call GetLastError.
2290 * Remark :
2291 * Status : UNTESTED STUB
2292 *
2293 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
2294 *****************************************************************************/
2295HWINSTA WIN32API OpenWindowStationA(LPCTSTR lpszWinStaName,
2296 BOOL fInherit,
2297 DWORD dwDesiredAccess)
2298{
2299 dprintf(("USER32:OpenWindowStatieonA (%s,%08xh,%08x) not implemented.\n",
2300 lpszWinStaName,
2301 fInherit,
2302 dwDesiredAccess));
2303
2304 return (NULL);
2305}
2306/*****************************************************************************
2307 * Name : HWINSTA WIN32API OpenWindowStationW
2308 * Purpose : The OpenWindowStation function returns a handle to an existing
2309 * window station.
2310 * Parameters: LPCTSTR lpszWinStaName name of the window station to open
2311 * BOOL fInherit specifies whether returned handle is inheritable
2312 * DWORD dwDesiredAccess specifies access of returned handle
2313 * Variables :
2314 * Result : If the function succeeds, the return value is the handle to the
2315 * specified window station.
2316 * If the function fails, the return value is NULL. To get extended
2317 * error information, call GetLastError.
2318
2319
2320 * Remark :
2321 * Status : UNTESTED STUB
2322 *
2323 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
2324 *****************************************************************************/
2325HWINSTA WIN32API OpenWindowStationW(LPCTSTR lpszWinStaName,
2326 BOOL fInherit,
2327 DWORD dwDesiredAccess)
2328{
2329 dprintf(("USER32:OpenWindowStatieonW (%s,%08xh,%08x) not implemented.\n",
2330 lpszWinStaName,
2331 fInherit,
2332 dwDesiredAccess));
2333
2334 return (NULL);
2335}
2336/*****************************************************************************
2337 * Name : BOOL WIN32API SetProcessWindowStation
2338 * Purpose : The SetProcessWindowStation function assigns a window station
2339 * to the calling process. This enables the process to access
2340 * objects in the window station such as desktops, the clipboard,
2341 * and global atoms. All subsequent operations on the window station
2342 * use the access rights granted to hWinSta.
2343 * Parameters:
2344 * Variables :
2345 * Result : If the function succeeds, the return value is TRUE.
2346 * If the function fails, the return value is FALSE. To get extended
2347 * error information, call GetLastError.
2348 * Remark :
2349 * Status : UNTESTED STUB
2350 *
2351 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
2352 *****************************************************************************/
2353BOOL WIN32API SetProcessWindowStation(HWINSTA hWinSta)
2354{
2355 dprintf(("USER32:SetProcessWindowStation (%08x) not implemented.\n",
2356 hWinSta));
2357
2358 return (FALSE);
2359}
2360/*****************************************************************************
2361 * Name : BOOL WIN32API SetThreadDesktop
2362 * Purpose : The SetThreadDesktop function assigns a desktop to the calling
2363 * thread. All subsequent operations on the desktop use the access
2364 * rights granted to hDesk.
2365 * Parameters: HDESK hDesk handle of the desktop to assign to this thread
2366 * Variables :
2367 * Result : If the function succeeds, the return value is TRUE.
2368 * If the function fails, the return value is FALSE. To get extended
2369 * error information, call GetLastError.
2370 * Remark :
2371 * Status : UNTESTED STUB
2372 *
2373 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
2374 *****************************************************************************/
2375BOOL WIN32API SetThreadDesktop(HDESK hDesktop)
2376{
2377 dprintf(("USER32:SetThreadDesktop (%08x) not implemented.\n",
2378 hDesktop));
2379
2380 return (FALSE);
2381}
2382/*****************************************************************************
2383 * Name : BOOL WIN32API SetUserObjectInformationA
2384 * Purpose : The SetUserObjectInformation function sets information about a
2385 * window station or desktop object.
2386 * Parameters: HANDLE hObject handle of the object for which to set information
2387 * int nIndex type of information to set
2388 * PVOID lpvInfo points to a buffer that contains the information
2389 * DWORD cbInfo size, in bytes, of lpvInfo buffer
2390 * Variables :
2391 * Result : If the function succeeds, the return value is TRUE.
2392 * If the function fails the return value is FALSE. To get extended
2393 * error information, call GetLastError.
2394 * Remark :
2395 * Status : UNTESTED STUB
2396 *
2397 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
2398 *****************************************************************************/
2399BOOL WIN32API SetUserObjectInformationA(HANDLE hObject,
2400 int nIndex,
2401 PVOID lpvInfo,
2402 DWORD cbInfo)
2403{
2404 dprintf(("USER32:SetUserObjectInformationA (%08xh,%u,%08xh,%08x) not implemented.\n",
2405 hObject,
2406 nIndex,
2407 lpvInfo,
2408 cbInfo));
2409
2410 return (FALSE);
2411}
2412/*****************************************************************************
2413 * Name : BOOL WIN32API SetUserObjectInformationW
2414 * Purpose : The SetUserObjectInformation function sets information about a
2415 * window station or desktop object.
2416 * Parameters: HANDLE hObject handle of the object for which to set information
2417 * int nIndex type of information to set
2418 * PVOID lpvInfo points to a buffer that contains the information
2419 * DWORD cbInfo size, in bytes, of lpvInfo buffer
2420 * Variables :
2421 * Result : If the function succeeds, the return value is TRUE.
2422 * If the function fails the return value is FALSE. To get extended
2423 * error information, call GetLastError.
2424 * Remark :
2425 * Status : UNTESTED STUB
2426 *
2427 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
2428 *****************************************************************************/
2429BOOL WIN32API SetUserObjectInformationW(HANDLE hObject,
2430 int nIndex,
2431 PVOID lpvInfo,
2432 DWORD cbInfo)
2433{
2434 dprintf(("USER32:SetUserObjectInformationW (%08xh,%u,%08xh,%08x) not implemented.\n",
2435 hObject,
2436 nIndex,
2437 lpvInfo,
2438 cbInfo));
2439
2440 return (FALSE);
2441}
2442/*****************************************************************************
2443 * Name : BOOL WIN32API SetUserObjectSecurity
2444 * Purpose : The SetUserObjectSecurity function sets the security of a user
2445 * object. This can be, for example, a window or a DDE conversation
2446 * Parameters: HANDLE hObject handle of user object
2447 * SECURITY_INFORMATION * psi address of security information
2448 * LPSECURITY_DESCRIPTOR psd address of security descriptor
2449 * Variables :
2450 * Result : If the function succeeds, the return value is TRUE.
2451 * If the function fails, the return value is FALSE. To get extended
2452 * error information, call GetLastError.
2453 * Remark :
2454 * Status : UNTESTED STUB
2455 *
2456 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
2457 *****************************************************************************/
2458BOOL WIN32API SetUserObjectSecurity(HANDLE hObject,
2459 PSECURITY_INFORMATION psi,
2460 PSECURITY_DESCRIPTOR psd)
2461{
2462 dprintf(("USER32:SetUserObjectSecuroty (%08xh,%08xh,%08x) not implemented.\n",
2463 hObject,
2464 psi,
2465 psd));
2466
2467 return (FALSE);
2468}
2469/*****************************************************************************
2470 * Name : BOOL WIN32API SwitchDesktop
2471 * Purpose : The SwitchDesktop function makes a desktop visible and activates
2472 * it. This enables the desktop to receive input from the user. The
2473 * calling process must have DESKTOP_SWITCHDESKTOP access to the
2474 * desktop for the SwitchDesktop function to succeed.
2475 * Parameters:
2476 * Variables :
2477 * Result : If the function succeeds, the return value is TRUE.
2478 * If the function fails, the return value is FALSE. To get extended
2479 * error information, call GetLastError.
2480 * Remark :
2481 * Status : UNTESTED STUB
2482 *
2483 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
2484 *****************************************************************************/
2485BOOL WIN32API SwitchDesktop(HDESK hDesktop)
2486{
2487 dprintf(("USER32:SwitchDesktop (%08x) not implemented.\n",
2488 hDesktop));
2489
2490 return (FALSE);
2491}
2492
2493/* Debugging Functions */
2494
2495/*****************************************************************************
2496 * Name : VOID WIN32API SetDebugErrorLevel
2497 * Purpose : The SetDebugErrorLevel function sets the minimum error level at
2498 * which Windows will generate debugging events and pass them to a debugger.
2499 * Parameters: DWORD dwLevel debugging error level
2500 * Variables :
2501 * Result :
2502 * Remark :
2503 * Status : UNTESTED STUB
2504 *
2505 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
2506 *****************************************************************************/
2507VOID WIN32API SetDebugErrorLevel(DWORD dwLevel)
2508{
2509 dprintf(("USER32:SetDebugErrorLevel (%08x) not implemented.\n",
2510 dwLevel));
2511}
2512
2513/* Drag'n'drop */
2514
2515/*****************************************************************************
2516 * Name : BOOL WIN32API DragObject
2517 * Purpose : Unknown
2518 * Parameters: Unknown
2519 * Variables :
2520 * Result :
2521 * Remark :
2522 * Status : UNTESTED UNKNOWN STUB
2523 *
2524 * Author : Patrick Haller [Wed, 1998/06/16 11:55]
2525 *****************************************************************************/
2526DWORD WIN32API DragObject(HWND x1,HWND x2,UINT x3,DWORD x4,HCURSOR x5)
2527{
2528 dprintf(("USER32: DragObject(%08x,%08xh,%08xh,%08xh,%08xh) not implemented.\n",
2529 x1,
2530 x2,
2531 x3,
2532 x4,
2533 x5));
2534
2535 return (FALSE); /* default */
2536}
2537
2538/* Unknown */
2539
2540/*****************************************************************************
2541 * Name : BOOL WIN32API SetShellWindow
2542 * Purpose : Unknown
2543 * Parameters: Unknown
2544 * Variables :
2545 * Result :
2546 * Remark :
2547 * Status : UNTESTED UNKNOWN STUB
2548 *
2549 * Author : Patrick Haller [Wed, 1998/06/16 11:55]
2550 *****************************************************************************/
2551BOOL WIN32API SetShellWindow(DWORD x1)
2552{
2553 dprintf(("USER32: SetShellWindow(%08x) not implemented.\n",
2554 x1));
2555
2556 return (FALSE); /* default */
2557}
2558/*****************************************************************************
2559 * Name : BOOL WIN32API PlaySoundEvent
2560 * Purpose : Unknown
2561 * Parameters: Unknown
2562 * Variables :
2563 * Result :
2564 * Remark :
2565 * Status : UNTESTED UNKNOWN STUB
2566 *
2567 * Author : Patrick Haller [Wed, 1998/06/16 11:55]
2568 *****************************************************************************/
2569BOOL WIN32API PlaySoundEvent(DWORD x1)
2570{
2571 dprintf(("USER32: PlaySoundEvent(%08x) not implemented.\n",
2572 x1));
2573
2574 return (FALSE); /* default */
2575}
2576/*****************************************************************************
2577 * Name : BOOL WIN32API SetSysColorsTemp
2578 * Purpose : Unknown
2579 * Parameters: Unknown
2580 * Variables :
2581 * Result :
2582 * Remark :
2583 * Status : UNTESTED UNKNOWN STUB
2584 *
2585 * Author : Patrick Haller [Wed, 1998/06/16 11:55]
2586 *****************************************************************************/
2587BOOL WIN32API SetSysColorsTemp(void)
2588{
2589 dprintf(("USER32: SetSysColorsTemp() not implemented.\n"));
2590
2591 return (FALSE); /* default */
2592}
2593/*****************************************************************************
2594 * Name : BOOL WIN32API RegisterNetworkCapabilities
2595 * Purpose : Unknown
2596 * Parameters: Unknown
2597 * Variables :
2598 * Result :
2599 * Remark :
2600 * Status : UNTESTED UNKNOWN STUB
2601 *
2602 * Author : Patrick Haller [Wed, 1998/06/16 11:55]
2603 *****************************************************************************/
2604BOOL WIN32API RegisterNetworkCapabilities(DWORD x1,
2605 DWORD x2)
2606{
2607 dprintf(("USER32: RegisterNetworkCapabilities(%08xh,%08xh) not implemented.\n",
2608 x1,
2609 x2));
2610
2611 return (FALSE); /* default */
2612}
2613/*****************************************************************************
2614 * Name : BOOL WIN32API EndTask
2615 * Purpose : Unknown
2616 * Parameters: Unknown
2617 * Variables :
2618 * Result :
2619 * Remark :
2620 * Status : UNTESTED UNKNOWN STUB
2621 *
2622 * Author : Patrick Haller [Wed, 1998/06/16 11:55]
2623 *****************************************************************************/
2624BOOL WIN32API EndTask(DWORD x1,
2625 DWORD x2,
2626 DWORD x3)
2627{
2628 dprintf(("USER32: EndTask(%08xh,%08xh,%08xh) not implemented.\n",
2629 x1,
2630 x2,
2631 x3));
2632
2633 return (FALSE); /* default */
2634}
2635/*****************************************************************************
2636 * Name : BOOL WIN32API GetNextQueueWindow
2637 * Purpose : Unknown
2638 * Parameters: Unknown
2639 * Variables :
2640 * Result :
2641 * Remark :
2642 * Status : UNTESTED UNKNOWN STUB
2643 *
2644 * Author : Patrick Haller [Wed, 1998/06/16 11:55]
2645 *****************************************************************************/
2646BOOL WIN32API GetNextQueueWindow(DWORD x1,
2647 DWORD x2)
2648{
2649 dprintf(("USER32: GetNextQueueWindow(%08xh,%08xh) not implemented.\n",
2650 x1,
2651 x2));
2652
2653 return (FALSE); /* default */
2654}
2655/*****************************************************************************
2656 * Name : BOOL WIN32API YieldTask
2657 * Purpose : Unknown
2658 * Parameters: Unknown
2659 * Variables :
2660 * Result :
2661 * Remark :
2662 * Status : UNTESTED UNKNOWN STUB
2663 *
2664 * Author : Patrick Haller [Wed, 1998/06/16 11:55]
2665 *****************************************************************************/
2666BOOL WIN32API YieldTask(void)
2667{
2668 dprintf(("USER32: YieldTask() not implemented.\n"));
2669
2670 return (FALSE); /* default */
2671}
2672/*****************************************************************************
2673 * Name : BOOL WIN32API WinOldAppHackoMatic
2674 * Purpose : Unknown
2675 * Parameters: Unknown
2676 * Variables :
2677 * Result :
2678 * Remark :
2679 * Status : UNTESTED UNKNOWN STUB
2680 *
2681 * Author : Patrick Haller [Wed, 1998/06/16 11:55]
2682 *****************************************************************************/
2683BOOL WIN32API WinOldAppHackoMatic(DWORD x1)
2684{
2685 dprintf(("USER32: WinOldAppHackoMatic(%08x) not implemented.\n",
2686 x1));
2687
2688 return (FALSE); /* default */
2689}
2690/*****************************************************************************
2691 * Name : BOOL WIN32API RegisterSystemThread
2692 * Purpose : Unknown
2693 * Parameters: Unknown
2694 * Variables :
2695 * Result :
2696 * Remark :
2697 * Status : UNTESTED UNKNOWN STUB
2698 *
2699 * Author : Patrick Haller [Wed, 1998/06/16 11:55]
2700 *****************************************************************************/
2701BOOL WIN32API RegisterSystemThread(DWORD x1,
2702 DWORD x2)
2703{
2704 dprintf(("USER32: RegisterSystemThread(%08xh,%08xh) not implemented.\n",
2705 x1,
2706 x2));
2707
2708 return (FALSE); /* default */
2709}
2710/*****************************************************************************
2711 * Name : BOOL WIN32API IsHungThread
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 IsHungThread(DWORD x1)
2722{
2723 dprintf(("USER32: IsHungThread(%08xh) not implemented.\n",
2724 x1));
2725
2726 return (FALSE); /* default */
2727}
2728/*****************************************************************************
2729 * Name : BOOL WIN32API UserSignalProc
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 UserSignalProc(DWORD x1,
2740 DWORD x2,
2741 DWORD x3,
2742 DWORD x4)
2743{
2744 dprintf(("USER32: SysErrorBox(%08xh,%08xh,%08xh,%08xh) not implemented.\n",
2745 x1,
2746 x2,
2747 x3,
2748 x4));
2749
2750 return (FALSE); /* default */
2751}
2752/*****************************************************************************
2753 * Name : BOOL WIN32API GetShellWindow
2754 * Purpose : Unknown
2755 * Parameters: Unknown
2756 * Variables :
2757 * Result :
2758 * Remark :
2759 * Status : UNTESTED UNKNOWN STUB
2760 *
2761 * Author : Patrick Haller [Wed, 1998/06/16 11:55]
2762 *****************************************************************************/
2763HWND WIN32API GetShellWindow(void)
2764{
2765 dprintf(("USER32: GetShellWindow() not implemented.\n"));
2766
2767 return (0); /* default */
2768}
2769/***********************************************************************
2770 * RegisterTasklist32 [USER32.436]
2771 */
2772DWORD WIN32API RegisterTasklist (DWORD x)
2773{
2774 dprintf(("USER32: RegisterTasklist(%08xh) not implemented.\n",
2775 x));
2776
2777 return TRUE;
2778}
2779/***********************************************************************
2780 * SetLogonNotifyWindow (USER32.486)
2781 */
2782DWORD WIN32API SetLogonNotifyWindow(HWINSTA hwinsta,HWND hwnd)
2783{
2784 dprintf(("USER32: SetLogonNotifyWindow - empty stub!"));
2785
2786 return 1;
2787}
2788
Note: See TracBrowser for help on using the repository browser.