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

Last change on this file since 2804 was 2804, checked in by sandervl, 26 years ago

Added new logging feature

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