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

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

added v5.00 messages

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