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

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

RDW_FRAME support for GetDCEx; added wine dialog change; added extra logging

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