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

Last change on this file since 3942 was 3942, checked in by bird, 25 years ago

Function status corrections.

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