source: trunk/src/user32/new/user32.cpp@ 839

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

Dialog update

File size: 136.9 KB
Line 
1/* $Id: user32.cpp,v 1.19 1999-09-05 17:11:24 sandervl Exp $ */
2
3/*
4 * Win32 misc user32 API functions for OS/2
5 *
6 * Copyright 1998 Sander van Leeuwen
7 * Copyright 1998 Patrick Haller
8 * Copyright 1998 Peter Fitzsimmons
9 * Copyright 1999 Christoph Bratschi
10 *
11 *
12 * Project Odin Software License can be found in LICENSE.TXT
13 *
14 */
15/*****************************************************************************
16 * Name : USER32.CPP
17 * Purpose : This module maps all Win32 functions contained in USER32.DLL
18 * to their OS/2-specific counterparts as far as possible.
19 *****************************************************************************/
20
21/*
22 CB:
23 - don't replace GDI functions (hdc), only convert window handle
24 - always use OSRECTL for PM functions
25 - POINT == POINTL
26*/
27
28#include <os2win.h>
29#include "misc.h"
30
31#include "user32.h"
32#include <winicon.h>
33#include "usrcall.h"
34#include "syscolor.h"
35
36#include <wchar.h>
37#include <stdlib.h>
38#include <string.h>
39#include <oslibwin.h>
40#include <win32wnd.h>
41
42//undocumented stuff
43// WIN32API CalcChildScroll
44// WIN32API CascadeChildWindows
45// WIN32API ClientThreadConnect
46// WIN32API DragObject
47// WIN32API DrawFrame
48// WIN32API EditWndProc
49// WIN32API EndTask
50// WIN32API GetInputDesktop
51// WIN32API GetNextQueueWindow
52// WIN32API GetShellWindow
53// WIN32API InitSharedTable
54// WIN32API InitTask
55// WIN32API IsHungThread
56// WIN32API LockWindowStation
57// WIN32API ModifyAccess
58// WIN32API PlaySoundEvent
59// WIN32API RegisterLogonProcess
60// WIN32API RegisterNetworkCapabilities
61// WIN32API RegisterSystemThread
62// WIN32API SetDeskWallpaper
63// WIN32API SetDesktopBitmap
64// WIN32API SetInternalWindowPos
65// WIN32API SetLogonNotifyWindow
66// WIN32API SetShellWindow
67// WIN32API SetSysColorsTemp
68// WIN32API SetWindowFullScreenState
69// WIN32API SwitchToThisWindow
70// WIN32API SysErrorBox
71// WIN32API TileChildWindows
72// WIN32API UnlockWindowStation
73// WIN32API UserClientDllInitialize
74// WIN32API UserSignalProc
75// WIN32API WinOldAppHackoMatic
76// WIN32API WNDPROC_CALLBACK
77// WIN32API YieldTask
78
79/* Coordinate Transformation */
80
81inline void OS2ToWin32ScreenPos(POINT *dest,POINT *source)
82{
83 dest->x = source->x;
84 dest->y = OSLibWinQuerySysValue(OSLIB_HWND_DESKTOP,SVOS_CYSCREEN)-1-source->y;
85}
86
87inline void Win32ToOS2ScreenPos(POINT *dest,POINT *source)
88{
89 OS2ToWin32ScreenPos(dest,source); //transform back
90}
91
92/* Rectangle Functions - parts from wine/windows/rect.c */
93
94BOOL WIN32API CopyRect( PRECT lprcDst, const RECT * lprcSrc)
95{
96// ddprintf(("USER32: CopyRect\n"));
97 if (!lprcDst || !lprcSrc) {
98 SetLastError(ERROR_INVALID_PARAMETER);
99 return FALSE;
100 }
101
102 memcpy(lprcDst,lprcSrc,sizeof(RECT));
103
104 return TRUE;
105}
106//******************************************************************************
107//******************************************************************************
108BOOL WIN32API EqualRect( const RECT *lprc1, const RECT *lprc2)
109{
110#ifdef DEBUG
111 WriteLog("USER32: EqualRect\n");
112#endif
113 if (!lprc1 || !lprc2)
114 {
115 SetLastError(ERROR_INVALID_PARAMETER);
116 return FALSE;
117 }
118
119 return (lprc1->left == lprc2->left &&
120 lprc1->right == lprc2->right &&
121 lprc1->top == lprc2->top &&
122 lprc1->bottom == lprc2->bottom);
123}
124//******************************************************************************
125//******************************************************************************
126BOOL WIN32API InflateRect( PRECT lprc, int dx, int dy)
127{
128#ifdef DEBUG
129 WriteLog("USER32: InflateRect\n");
130#endif
131 if (!lprc)
132 {
133 SetLastError(ERROR_INVALID_PARAMETER);
134 return FALSE;
135 }
136
137 lprc->left -= dx;
138 lprc->right += dx;
139 lprc->top -= dy;
140 lprc->bottom += dy;
141
142 return TRUE;
143}
144//******************************************************************************
145//******************************************************************************
146BOOL WIN32API IntersectRect( PRECT lprcDst, const RECT * lprcSrc1, const RECT * lprcSrc2)
147{
148#ifdef DEBUG
149//// WriteLog("USER32: IntersectRect\n");
150#endif
151 if (!lprcDst || !lprcSrc1 || !lprcSrc2)
152 {
153 SetLastError(ERROR_INVALID_PARAMETER);
154 return FALSE;
155 }
156
157 if (IsRectEmpty(lprcSrc1) || IsRectEmpty(lprcSrc2) ||
158 (lprcSrc1->left >= lprcSrc2->right) || (lprcSrc2->left >= lprcSrc1->right) ||
159 (lprcSrc1->top >= lprcSrc2->bottom) || (lprcSrc2->top >= lprcSrc1->bottom))
160 {
161 SetLastError(ERROR_INVALID_PARAMETER);
162 SetRectEmpty(lprcDst);
163 return FALSE;
164 }
165 lprcDst->left = MAX(lprcSrc1->left,lprcSrc2->left);
166 lprcDst->right = MIN(lprcSrc1->right,lprcSrc2->right);
167 lprcDst->top = MAX(lprcSrc1->top,lprcSrc2->top);
168 lprcDst->bottom = MIN(lprcSrc1->bottom,lprcSrc2->bottom);
169
170 return TRUE;
171}
172//******************************************************************************
173//******************************************************************************
174BOOL WIN32API IsRectEmpty( const RECT * lprc)
175{
176 if (!lprc)
177 {
178 SetLastError(ERROR_INVALID_PARAMETER);
179 return FALSE;
180 }
181
182 return (lprc->left == lprc->right || lprc->top == lprc->bottom);
183}
184//******************************************************************************
185//******************************************************************************
186BOOL WIN32API OffsetRect( PRECT lprc, int x, int y)
187{
188#ifdef DEBUG
189//// WriteLog("USER32: OffsetRect\n");
190#endif
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#ifdef DEBUG1
209 WriteLog("USER32: PtInRect\n");
210#endif
211 if (!lprc)
212 {
213 SetLastError(ERROR_INVALID_PARAMETER);
214 return FALSE;
215 }
216
217 return (pt.x >= lprc->left &&
218 pt.x < lprc->right &&
219 pt.y >= lprc->top &&
220 pt.y < lprc->bottom);
221}
222//******************************************************************************
223//******************************************************************************
224BOOL WIN32API SetRect( PRECT lprc, int nLeft, int nTop, int nRight, int nBottom)
225{
226 if (!lprc)
227 {
228 SetLastError(ERROR_INVALID_PARAMETER);
229 return FALSE;
230 }
231
232 lprc->left = nLeft;
233 lprc->top = nTop;
234 lprc->right = nRight;
235 lprc->bottom = nBottom;
236
237 return TRUE;
238}
239//******************************************************************************
240//******************************************************************************
241BOOL WIN32API SetRectEmpty( PRECT lprc)
242{
243 if (!lprc)
244 {
245 SetLastError(ERROR_INVALID_PARAMETER);
246 return FALSE;
247 }
248
249 lprc->left = lprc->right = lprc->top = lprc->bottom = 0;
250
251 return TRUE;
252}
253//******************************************************************************
254//******************************************************************************
255BOOL WIN32API SubtractRect( PRECT lprcDest, const RECT * lprcSrc1, const RECT * lprcSrc2)
256{
257#ifdef DEBUG
258 WriteLog("USER32: SubtractRect");
259#endif
260 RECT tmp;
261
262 if (!lprcDest || !lprcSrc1 || !lprcSrc2)
263 {
264 SetLastError(ERROR_INVALID_PARAMETER);
265 return FALSE;
266 }
267
268 if (IsRectEmpty(lprcSrc1))
269 {
270 SetLastError(ERROR_INVALID_PARAMETER);
271 SetRectEmpty(lprcDest);
272 return FALSE;
273 }
274 *lprcDest = *lprcSrc1;
275 if (IntersectRect(&tmp,lprcSrc1,lprcSrc2))
276 {
277 if (EqualRect(&tmp,lprcDest))
278 {
279 SetRectEmpty(lprcDest);
280 return FALSE;
281 }
282 if ((tmp.top == lprcDest->top) && (tmp.bottom == lprcDest->bottom))
283 {
284 if (tmp.left == lprcDest->left) lprcDest->left = tmp.right;
285 else if (tmp.right == lprcDest->right) lprcDest->right = tmp.left;
286 }
287 else if ((tmp.left == lprcDest->left) && (tmp.right == lprcDest->right))
288 {
289 if (tmp.top == lprcDest->top) lprcDest->top = tmp.bottom;
290 else if (tmp.bottom == lprcDest->bottom) lprcDest->bottom = tmp.top;
291 }
292 }
293
294 return TRUE;
295}
296//******************************************************************************
297//******************************************************************************
298BOOL WIN32API UnionRect( PRECT lprcDst, const RECT *lprcSrc1, const RECT *lprcSrc2)
299{
300#ifdef DEBUG
301 WriteLog("USER32: UnionRect\n");
302#endif
303 if (!lprcDst || !lprcSrc1 || !lprcSrc2)
304 {
305 SetLastError(ERROR_INVALID_PARAMETER);
306 return FALSE;
307 }
308
309 if (IsRectEmpty(lprcSrc1))
310 {
311 if (IsRectEmpty(lprcSrc2))
312 {
313 SetLastError(ERROR_INVALID_PARAMETER);
314 SetRectEmpty(lprcDst);
315 return FALSE;
316 }
317 else *lprcDst = *lprcSrc2;
318 }
319 else
320 {
321 if (IsRectEmpty(lprcSrc2)) *lprcDst = *lprcSrc1;
322 else
323 {
324 lprcDst->left = MIN(lprcSrc1->left,lprcSrc2->left);
325 lprcDst->right = MAX(lprcSrc1->right,lprcSrc2->right);
326 lprcDst->top = MIN(lprcSrc1->top,lprcSrc2->top);
327 lprcDst->bottom = MAX(lprcSrc1->bottom,lprcSrc2->bottom);
328 }
329 }
330
331 return TRUE;
332}
333
334/* String Manipulating Functions */
335
336int __cdecl wsprintfA(char *lpOut, LPCSTR lpFmt, ...)
337{
338 int rc;
339 va_list argptr;
340
341#ifdef DEBUG
342 WriteLog("USER32: wsprintfA\n");
343 WriteLog("USER32: %s\n", lpFmt);
344#endif
345 va_start(argptr, lpFmt);
346 rc = O32_wvsprintf(lpOut, (char *)lpFmt, argptr);
347 va_end(argptr);
348#ifdef DEBUG
349 WriteLog("USER32: %s\n", lpOut);
350#endif
351 return(rc);
352}
353//******************************************************************************
354//******************************************************************************
355int __cdecl wsprintfW(LPWSTR lpOut, LPCWSTR lpFmt, ...)
356{
357 int rc;
358 char *lpFmtA;
359 char szOut[512];
360 va_list argptr;
361
362 dprintf(("USER32: wsprintfW(%08xh,%08xh).\n",
363 lpOut,
364 lpFmt));
365
366 lpFmtA = UnicodeToAsciiString((LPWSTR)lpFmt);
367
368 /* @@@PH 98/07/13 transform "%s" to "%ls" does the unicode magic */
369 {
370 PCHAR pszTemp;
371 PCHAR pszTemp1;
372 ULONG ulStrings;
373 ULONG ulIndex; /* temporary string counter */
374
375 for (ulStrings = 0, /* determine number of placeholders */
376 pszTemp = lpFmtA;
377
378 (pszTemp != NULL) &&
379 (*pszTemp != 0);
380
381 ulStrings++)
382 {
383 pszTemp = strstr(pszTemp,
384 "%s");
385 if (pszTemp != NULL) /* skip 2 characters */
386 {
387 pszTemp++;
388 pszTemp++;
389 }
390 else
391 break; /* leave loop immediately */
392 }
393
394 if (ulStrings != 0) /* transformation required ? */
395 {
396 /* now reallocate lpFmt */
397 ulStrings += strlen(lpFmtA); /* calculate total string length */
398 pszTemp = lpFmtA; /* save string pointer */
399 pszTemp1 = lpFmtA; /* save string pointer */
400
401 /* @@@PH allocation has to be compatible to FreeAsciiString !!! */
402 lpFmtA = (char *)malloc(ulStrings + 1);
403 if (lpFmtA == NULL) /* check proper allocation */
404 return (0); /* raise error condition */
405
406 for (ulIndex = 0;
407 ulIndex <= ulStrings;
408 ulIndex++,
409 pszTemp++)
410 {
411 if ((pszTemp[0] == '%') &&
412 (pszTemp[1] == 's') )
413 {
414 /* replace %s by %ls */
415 lpFmtA[ulIndex++] = '%';
416 lpFmtA[ulIndex ] = 'l';
417 lpFmtA[ulIndex+1] = 's';
418 }
419 else
420 lpFmtA[ulIndex] = *pszTemp; /* just copy over the character */
421 }
422
423 lpFmtA[ulStrings] = 0; /* string termination */
424
425 FreeAsciiString(pszTemp1); /* the original string is obsolete */
426 }
427 }
428
429 dprintf(("USER32: wsprintfW (%s).\n",
430 lpFmt));
431
432 va_start(argptr,
433 lpFmt);
434
435 rc = O32_wvsprintf(szOut,
436 lpFmtA,
437 argptr);
438
439 AsciiToUnicode(szOut,
440 lpOut);
441
442 FreeAsciiString(lpFmtA);
443 return(rc);
444}
445//******************************************************************************
446//******************************************************************************
447BOOL WIN32API MessageBeep( UINT uType)
448{
449 INT flStyle;
450
451#ifdef DEBUG
452 WriteLog("USER32: MessageBeep\n");
453#endif
454
455 switch (uType)
456 {
457 case 0xFFFFFFFF:
458 OSLibDosBeep(500,50);
459 return TRUE;
460 case MB_ICONASTERISK:
461 flStyle = WAOS_NOTE;
462 break;
463 case MB_ICONEXCLAMATION:
464 flStyle = WAOS_WARNING;
465 break;
466 case MB_ICONHAND:
467 case MB_ICONQUESTION:
468 case MB_OK:
469 flStyle = WAOS_NOTE;
470 break;
471 default:
472 flStyle = WAOS_ERROR; //CB: should be right
473 break;
474 }
475 return OSLibWinAlarm(OSLIB_HWND_DESKTOP,flStyle);
476}
477//******************************************************************************
478//******************************************************************************
479int WIN32API GetSystemMetrics(int nIndex)
480{
481 int rc = 0;
482
483 switch(nIndex) {
484 case SM_CXICONSPACING: //TODO: size of grid cell for large icons
485 rc = OSLibWinQuerySysValue(OSLIB_HWND_DESKTOP,SVOS_CXICON);
486 //CB: return standard windows icon size?
487 //rc = 32;
488 break;
489 case SM_CYICONSPACING:
490 rc = OSLibWinQuerySysValue(OSLIB_HWND_DESKTOP,SVOS_CYICON);
491 //read SM_CXICONSPACING comment
492 //rc = 32;
493 break;
494 case SM_PENWINDOWS:
495 rc = FALSE;
496 break;
497 case SM_DBCSENABLED:
498 rc = FALSE;
499 break;
500 case SM_CXEDGE: //size of 3D window edge (not supported)
501 rc = 1;
502 break;
503 case SM_CYEDGE:
504 rc = 1;
505 break;
506 case SM_CXMINSPACING: //can be SM_CXMINIMIZED or larger
507 //CB: replace with const
508 rc = O32_GetSystemMetrics(SM_CXMINIMIZED);
509 break;
510 case SM_CYMINSPACING:
511 //CB: replace with const
512 rc = GetSystemMetrics(SM_CYMINIMIZED);
513 break;
514 case SM_CXSMICON: //recommended size of small icons (TODO: adjust to screen res.)
515 rc = 16;
516 break;
517 case SM_CYSMICON:
518 rc = 16;
519 break;
520 case SM_CYSMCAPTION: //size in pixels of a small caption (TODO: ????)
521 rc = 8;
522 break;
523 case SM_CXSMSIZE: //size of small caption buttons (pixels) (TODO: implement properly)
524 rc = 16;
525 break;
526 case SM_CYSMSIZE:
527 rc = 16;
528 break;
529 case SM_CXMENUSIZE: //TODO: size of menu bar buttons (such as MDI window close)
530 rc = 16;
531 break;
532 case SM_CYMENUSIZE:
533 rc = 16;
534 break;
535 case SM_ARRANGE:
536 rc = ARW_BOTTOMLEFT | ARW_LEFT;
537 break;
538 case SM_CXMINIMIZED:
539 break;
540 case SM_CYMINIMIZED:
541 break;
542 case SM_CXMAXTRACK: //max window size
543 case SM_CXMAXIMIZED: //max toplevel window size
544 rc = OSLibWinQuerySysValue(OSLIB_HWND_DESKTOP,SVOS_CXSCREEN);
545 break;
546 case SM_CYMAXTRACK:
547 case SM_CYMAXIMIZED:
548 rc = OSLibWinQuerySysValue(OSLIB_HWND_DESKTOP,SVOS_CYSCREEN);
549 break;
550 case SM_NETWORK:
551 rc = 0x01; //TODO: default = yes
552 break;
553 case SM_CLEANBOOT:
554 rc = 0; //normal boot
555 break;
556 case SM_CXDRAG: //nr of pixels before drag becomes a real one
557 rc = 2;
558 break;
559 case SM_CYDRAG:
560 rc = 2;
561 break;
562 case SM_SHOWSOUNDS: //show instead of play sound
563 rc = FALSE;
564 break;
565 case SM_CXMENUCHECK:
566 rc = 4; //TODO
567 break;
568 case SM_CYMENUCHECK:
569 rc = OSLibWinQuerySysValue(OSLIB_HWND_DESKTOP,SVOS_CYMENU);
570 break;
571 case SM_SLOWMACHINE:
572 rc = FALSE; //even a slow machine is fast with OS/2 :)
573 break;
574 case SM_MIDEASTENABLED:
575 rc = FALSE;
576 break;
577 case SM_CMETRICS:
578 //CB: replace with const
579 rc = O32_GetSystemMetrics(44); //Open32 changed this one
580 break;
581 default:
582 //better than nothing
583 rc = O32_GetSystemMetrics(nIndex);
584 break;
585 }
586#ifdef DEBUG
587 WriteLog("USER32: GetSystemMetrics %d returned %d\n", nIndex, rc);
588#endif
589 return(rc);
590}
591//******************************************************************************
592//******************************************************************************
593UINT WIN32API SetTimer( HWND hwnd, UINT idTimer, UINT uTimeout, TIMERPROC tmprc)
594{
595#ifdef DEBUG
596 WriteLog("USER32: SetTimer INCORRECT CALLING CONVENTION FOR HANDLER!!!!!\n");
597#endif
598 hwnd = Win32Window::Win32ToOS2Handle(hwnd);
599 //SvL: Write callback handler class for this one
600 //CB: replace
601 return O32_SetTimer(hwnd,idTimer,uTimeout,(TIMERPROC_O32)tmprc);
602}
603//******************************************************************************
604//******************************************************************************
605BOOL WIN32API KillTimer(HWND hWnd, UINT uIDEvent)
606{
607#ifdef DEBUG
608 WriteLog("USER32: KillTimer\n");
609#endif
610 hWnd = Win32Window::Win32ToOS2Handle(hWnd);
611 //WinStopTimer
612 //CB: replace
613 return O32_KillTimer(hWnd,uIDEvent);
614}
615//******************************************************************************
616//******************************************************************************
617//******************************************************************************
618//TODO:How can we emulate this one in OS/2???
619//******************************************************************************
620DWORD WIN32API WaitForInputIdle(HANDLE hProcess, DWORD dwTimeOut)
621{
622#ifdef DEBUG
623 WriteLog("USER32: WaitForInputIdle (Not Implemented) %d\n", dwTimeOut);
624#endif
625
626 if(dwTimeOut == INFINITE) return(0);
627
628// DosSleep(dwTimeOut/16);
629 return(0);
630}
631//******************************************************************************
632//******************************************************************************
633int WIN32API ShowCursor( BOOL arg1)
634{
635#ifdef DEBUG
636 WriteLog("USER32: ShowCursor\n");
637#endif
638 //WinShowCursor(OSLIB_HWND_DESKTOP,arg1); //CB: not the same
639 return O32_ShowCursor(arg1);
640}
641//******************************************************************************
642//******************************************************************************
643BOOL WIN32API WinHelpA( HWND hwnd, LPCSTR lpszHelp, UINT uCommand, DWORD dwData)
644{
645#ifdef DEBUG
646 WriteLog("USER32: WinHelp not implemented %s\n", lpszHelp);
647#endif
648// hwnd = Win32Window::Win32ToOS2Handle(hwnd);
649// return O32_WinHelp(arg1, arg2, arg3, arg4);
650
651 return(TRUE);
652}
653//******************************************************************************
654//SvL: 24-6-'97 - Added
655//******************************************************************************
656BOOL WIN32API ClipCursor(const RECT * lpRect)
657{
658#ifdef DEBUG
659 WriteLog("USER32: ClipCursor\n");
660#endif
661 //CB: how to replace?
662 return O32_ClipCursor(lpRect);
663}
664//******************************************************************************
665//SvL: 24-6-'97 - Added
666//TODO: Not implemented
667//******************************************************************************
668WORD WIN32API GetAsyncKeyState(INT nVirtKey)
669{
670#ifdef DEBUG
671//// WriteLog("USER32: GetAsyncKeyState Not implemented\n");
672#endif
673 return 0;
674}
675//******************************************************************************
676//SvL: 24-6-'97 - Added
677//******************************************************************************
678HCURSOR WIN32API GetCursor(void)
679{
680#ifdef DEBUG
681//// WriteLog("USER32: GetCursor\n");
682#endif
683 return O32_GetCursor();
684}
685//******************************************************************************
686//SvL: 24-6-'97 - Added
687//******************************************************************************
688BOOL WIN32API GetCursorPos( PPOINT lpPoint)
689{
690 BOOL rc;
691 POINT point;
692#ifdef DEBUG
693//// WriteLog("USER32: GetCursorPos\n");
694#endif
695 if (!lpPoint) return FALSE;
696 if (OSLibWinQueryPointerPos(OSLIB_HWND_DESKTOP,&point)) //POINT == POINTL
697 {
698 OS2ToWin32ScreenPos(lpPoint,&point);
699 return TRUE;
700 } else return FALSE;
701}
702//******************************************************************************
703//SvL: 24-6-'97 - Added
704//******************************************************************************
705WORD WIN32API VkKeyScanA( char ch)
706{
707#ifdef DEBUG
708 WriteLog("USER32: VkKeyScanA\n");
709#endif
710 return O32_VkKeyScan(ch);
711}
712//******************************************************************************
713//SvL: 24-6-'97 - Added
714//******************************************************************************
715SHORT WIN32API GetKeyState( int nVirtKey)
716{
717#ifdef DEBUG
718 WriteLog("USER32: GetKeyState %d\n", nVirtKey);
719#endif
720 return O32_GetKeyState(nVirtKey);
721}
722//******************************************************************************
723//******************************************************************************
724HCURSOR WIN32API SetCursor( HCURSOR hcur)
725{
726#ifdef DEBUG
727 WriteLog("USER32: SetCursor\n");
728#endif
729 return O32_SetCursor(hcur);
730}
731//******************************************************************************
732//******************************************************************************
733BOOL WIN32API SetCursorPos( int arg1, int arg2)
734{
735#ifdef DEBUG
736 WriteLog("USER32: SetCursorPos\n");
737#endif
738//CB:{a} stopped here
739 return O32_SetCursorPos(arg1, arg2);
740}
741//******************************************************************************
742//******************************************************************************
743HWND WIN32API SetCapture( HWND arg1)
744{
745#ifdef DEBUG
746 WriteLog("USER32: SetCapture\n");
747#endif
748 return O32_SetCapture(arg1);
749}
750//******************************************************************************
751//******************************************************************************
752BOOL WIN32API ReleaseCapture(void)
753{
754#ifdef DEBUG
755 WriteLog("USER32: ReleaseCapture\n");
756#endif
757 return O32_ReleaseCapture();
758}
759//******************************************************************************
760//******************************************************************************
761DWORD WIN32API MsgWaitForMultipleObjects( DWORD arg1, LPHANDLE arg2, BOOL arg3, DWORD arg4, DWORD arg5)
762{
763#ifdef DEBUG
764 WriteLog("USER32: MsgWaitForMultipleObjects\n");
765#endif
766 return O32_MsgWaitForMultipleObjects(arg1, arg2, arg3, arg4, arg5);
767}
768//******************************************************************************
769//******************************************************************************
770BOOL WIN32API CheckRadioButton( HWND arg1, UINT arg2, UINT arg3, UINT arg4)
771{
772#ifdef DEBUG
773 WriteLog("USER32: CheckRadioButton\n");
774#endif
775 //CB: check radio buttons in interval
776 if (arg2 > arg3) return (FALSE);
777 for (UINT x=arg2;x <= arg3;x++)
778 {
779 SendDlgItemMessageA(arg1,x,BM_SETCHECK,(x == arg4) ? BST_CHECKED : BST_UNCHECKED,0);
780 }
781 return (TRUE);
782}
783//******************************************************************************
784//******************************************************************************
785BOOL WIN32API CreateCaret( HWND arg1, HBITMAP arg2, int arg3, int arg4)
786{
787#ifdef DEBUG
788 WriteLog("USER32: CreateCaret\n");
789#endif
790 return O32_CreateCaret(arg1, arg2, arg3, arg4);
791}
792//******************************************************************************
793//******************************************************************************
794HCURSOR WIN32API CreateCursor( HINSTANCE arg1, int arg2, int arg3, int arg4, int arg5, const VOID * arg6, const VOID * arg7)
795{
796#ifdef DEBUG
797 WriteLog("USER32: CreateCursor\n");
798#endif
799 return O32_CreateCursor(arg1, arg2, arg3, arg4, arg5, arg6, arg7);
800}
801//******************************************************************************
802//******************************************************************************
803//******************************************************************************
804//******************************************************************************
805BOOL WIN32API DestroyCaret(void)
806{
807#ifdef DEBUG
808 WriteLog("USER32: DestroyCaret\n");
809#endif
810 return O32_DestroyCaret();
811}
812//******************************************************************************
813//******************************************************************************
814BOOL WIN32API DestroyCursor( HCURSOR arg1)
815{
816#ifdef DEBUG
817 WriteLog("USER32: DestroyCursor\n");
818#endif
819 return O32_DestroyCursor(arg1);
820}
821//******************************************************************************
822//******************************************************************************
823BOOL WIN32API EndDeferWindowPos( HDWP arg1)
824{
825#ifdef DEBUG
826 WriteLog("USER32: EndDeferWindowPos\n");
827#endif
828 return O32_EndDeferWindowPos(arg1);
829}
830//******************************************************************************
831//******************************************************************************
832BOOL WIN32API EnumChildWindows(HWND hwnd, WNDENUMPROC lpfn, LPARAM lParam)
833{
834 BOOL rc;
835 EnumWindowCallback *callback = new EnumWindowCallback(lpfn, lParam);
836
837#ifdef DEBUG
838 WriteLog("USER32: EnumChildWindows\n");
839#endif
840 rc = O32_EnumChildWindows(hwnd, callback->GetOS2Callback(), (LPARAM)callback);
841 if(callback)
842 delete callback;
843 return(rc);
844}
845//******************************************************************************
846//******************************************************************************
847BOOL WIN32API EnumWindows(WNDENUMPROC lpfn, LPARAM lParam)
848{
849 BOOL rc;
850 EnumWindowCallback *callback = new EnumWindowCallback(lpfn, lParam);
851
852#ifdef DEBUG
853 WriteLog("USER32: EnumWindows\n");
854#endif
855 rc = O32_EnumWindows(callback->GetOS2Callback(), (LPARAM)callback);
856 if(callback)
857 delete callback;
858 return(rc);
859}
860//******************************************************************************
861//******************************************************************************
862INT WIN32API ExcludeUpdateRgn( HDC arg1, HWND arg2)
863{
864#ifdef DEBUG
865 WriteLog("USER32: ExcludeUpdateRgn\n");
866#endif
867 return O32_ExcludeUpdateRgn(arg1, arg2);
868}
869//******************************************************************************
870//******************************************************************************
871BOOL WIN32API ExitWindowsEx( UINT arg1, DWORD arg2)
872{
873#ifdef DEBUG
874 WriteLog("USER32: ExitWindowsEx\n");
875#endif
876 return O32_ExitWindowsEx(arg1, arg2);
877}
878//******************************************************************************
879//******************************************************************************
880int WIN32API FillRect(HDC arg1, const RECT * arg2, HBRUSH arg3)
881{
882#ifdef DEBUG
883 WriteLog("USER32: FillRect (%d,%d)(%d,%d) brush %X\n", arg2->left, arg2->top, arg2->right, arg2->bottom, arg3);
884#endif
885 return O32_FillRect(arg1, arg2, arg3);
886}
887//******************************************************************************
888//******************************************************************************
889HWND WIN32API FindWindowW( LPCWSTR arg1, LPCWSTR arg2)
890{
891 char *astring1 = UnicodeToAsciiString((LPWSTR)arg1);
892 char *astring2 = UnicodeToAsciiString((LPWSTR)arg2);
893 HWND rc;
894
895#ifdef DEBUG
896 WriteLog("USER32: FindWindowW\n");
897#endif
898 rc = O32_FindWindow(astring1, astring2);
899 FreeAsciiString(astring1);
900 FreeAsciiString(astring2);
901 return rc;
902}
903//******************************************************************************
904//******************************************************************************
905int WIN32API FrameRect( HDC arg1, const RECT * arg2, HBRUSH arg3)
906{
907#ifdef DEBUG
908 WriteLog("USER32: FrameRect\n");
909#endif
910 return O32_FrameRect(arg1, arg2, arg3);
911}
912//******************************************************************************
913//******************************************************************************
914HWND WIN32API GetCapture(void)
915{
916#ifdef DEBUG
917 WriteLog("USER32: GetCapture\n");
918#endif
919 return O32_GetCapture();
920}
921//******************************************************************************
922//******************************************************************************
923UINT WIN32API GetCaretBlinkTime(void)
924{
925#ifdef DEBUG
926 WriteLog("USER32: GetCaretBlinkTime\n");
927#endif
928 return O32_GetCaretBlinkTime();
929}
930//******************************************************************************
931//******************************************************************************
932BOOL WIN32API GetCaretPos( PPOINT arg1)
933{
934#ifdef DEBUG
935 WriteLog("USER32: GetCaretPos\n");
936#endif
937 return O32_GetCaretPos(arg1);
938}
939//******************************************************************************
940//******************************************************************************
941BOOL WIN32API GetClipCursor( PRECT arg1)
942{
943#ifdef DEBUG
944 WriteLog("USER32: GetClipCursor\n");
945#endif
946 return O32_GetClipCursor(arg1);
947}
948//******************************************************************************
949//******************************************************************************
950UINT WIN32API GetDoubleClickTime(void)
951{
952#ifdef DEBUG
953 WriteLog("USER32: GetDoubleClickTime\n");
954#endif
955 return O32_GetDoubleClickTime();
956}
957//******************************************************************************
958//******************************************************************************
959HWND WIN32API GetForegroundWindow(void)
960{
961#ifdef DEBUG
962 WriteLog("USER32: GetForegroundWindow\n");
963#endif
964 return O32_GetForegroundWindow();
965}
966//******************************************************************************
967//******************************************************************************
968int WIN32API GetKeyNameTextA( LPARAM arg1, LPSTR arg2, int arg3)
969{
970#ifdef DEBUG
971 WriteLog("USER32: GetKeyNameTextA\n");
972#endif
973 return O32_GetKeyNameText(arg1, arg2, arg3);
974}
975//******************************************************************************
976//******************************************************************************
977int WIN32API GetKeyNameTextW( LPARAM arg1, LPWSTR arg2, int arg3)
978{
979#ifdef DEBUG
980 WriteLog("USER32: GetKeyNameTextW DOES NOT WORK\n");
981#endif
982 // NOTE: This will not work as is (needs UNICODE support)
983 return 0;
984// return O32_GetKeyNameText(arg1, arg2, arg3);
985}
986//******************************************************************************
987//******************************************************************************
988int WIN32API GetKeyboardType( int arg1)
989{
990#ifdef DEBUG
991 WriteLog("USER32: GetKeyboardType\n");
992#endif
993 return O32_GetKeyboardType(arg1);
994}
995//******************************************************************************
996//******************************************************************************
997HWND WIN32API GetLastActivePopup( HWND arg1)
998{
999#ifdef DEBUG
1000 WriteLog("USER32: GetLastActivePopup\n");
1001#endif
1002 return O32_GetLastActivePopup(arg1);
1003}
1004//******************************************************************************
1005//******************************************************************************
1006//******************************************************************************
1007//******************************************************************************
1008DWORD WIN32API GetQueueStatus( UINT arg1)
1009{
1010#ifdef DEBUG
1011 WriteLog("USER32: GetQueueStatus\n");
1012#endif
1013 return O32_GetQueueStatus(arg1);
1014}
1015//******************************************************************************
1016//******************************************************************************
1017DWORD WIN32API GetTabbedTextExtentA( HDC arg1, LPCSTR arg2, int arg3, int arg4, int * arg5)
1018{
1019#ifdef DEBUG
1020 WriteLog("USER32: GetTabbedTextExtentA\n");
1021#endif
1022 return O32_GetTabbedTextExtent(arg1, arg2, arg3, arg4, arg5);
1023}
1024//******************************************************************************
1025//******************************************************************************
1026DWORD WIN32API GetTabbedTextExtentW( HDC arg1, LPCWSTR arg2, int arg3, int arg4, int * arg5)
1027{
1028 char *astring = UnicodeToAsciiString((LPWSTR)arg2);
1029 DWORD rc;
1030
1031#ifdef DEBUG
1032 WriteLog("USER32: GetTabbedTextExtentW\n");
1033#endif
1034 rc = O32_GetTabbedTextExtent(arg1, astring, arg3, arg4, arg5);
1035 FreeAsciiString(astring);
1036 return rc;
1037}
1038//******************************************************************************
1039//******************************************************************************
1040int WIN32API GetUpdateRgn( HWND arg1, HRGN arg2, BOOL arg3)
1041{
1042#ifdef DEBUG
1043 WriteLog("USER32: GetUpdateRgn\n");
1044#endif
1045 return O32_GetUpdateRgn(arg1, arg2, arg3);
1046}
1047//******************************************************************************
1048
1049
1050//******************************************************************************
1051//******************************************************************************
1052//******************************************************************************
1053DWORD WIN32API GetWindowThreadProcessId(HWND arg1, PDWORD arg2)
1054{
1055#ifdef DEBUG
1056 WriteLog("USER32: GetWindowThreadProcessId\n");
1057#endif
1058 return O32_GetWindowThreadProcessId(arg1, arg2);
1059}
1060//******************************************************************************
1061//******************************************************************************
1062BOOL WIN32API HideCaret( HWND arg1)
1063{
1064#ifdef DEBUG
1065 WriteLog("USER32: HideCaret\n");
1066#endif
1067 return O32_HideCaret(arg1);
1068}
1069//******************************************************************************
1070//******************************************************************************
1071BOOL WIN32API InvalidateRgn( HWND arg1, HRGN arg2, BOOL arg3)
1072{
1073#ifdef DEBUG
1074 WriteLog("USER32: InvalidateRgn\n");
1075#endif
1076 return O32_InvalidateRgn(arg1, arg2, arg3);
1077}
1078//******************************************************************************
1079//******************************************************************************
1080BOOL WIN32API InvertRect( HDC arg1, const RECT * arg2)
1081{
1082#ifdef DEBUG
1083 WriteLog("USER32: InvertRect\n");
1084#endif
1085 return O32_InvertRect(arg1, arg2);
1086}
1087//******************************************************************************
1088//******************************************************************************
1089BOOL WIN32API MapDialogRect( HWND arg1, PRECT arg2)
1090{
1091#ifdef DEBUG
1092 WriteLog("USER32: MapDialogRect\n");
1093#endif
1094 return O32_MapDialogRect(arg1, arg2);
1095}
1096//******************************************************************************
1097//******************************************************************************
1098UINT WIN32API MapVirtualKeyA( UINT arg1, UINT arg2)
1099{
1100#ifdef DEBUG
1101 WriteLog("USER32: MapVirtualKeyA\n");
1102#endif
1103 return O32_MapVirtualKey(arg1, arg2);
1104}
1105//******************************************************************************
1106//******************************************************************************
1107UINT WIN32API MapVirtualKeyW( UINT arg1, UINT arg2)
1108{
1109#ifdef DEBUG
1110 WriteLog("USER32: MapVirtualKeyW\n");
1111#endif
1112 // NOTE: This will not work as is (needs UNICODE support)
1113 return O32_MapVirtualKey(arg1, arg2);
1114}
1115//******************************************************************************
1116//******************************************************************************
1117int WIN32API MapWindowPoints( HWND arg1, HWND arg2, LPPOINT arg3, UINT arg4)
1118{
1119#ifdef DEBUG
1120 WriteLog("USER32: MapWindowPoints\n");
1121#endif
1122 return O32_MapWindowPoints(arg1, arg2, arg3, arg4);
1123}
1124//******************************************************************************
1125//******************************************************************************
1126BOOL WIN32API ScreenToClient( HWND arg1, LPPOINT arg2)
1127{
1128#ifdef DEBUG
1129 WriteLog("USER32: ScreenToClient\n");
1130#endif
1131 return O32_ScreenToClient(arg1, arg2);
1132}
1133//******************************************************************************
1134//******************************************************************************
1135BOOL WIN32API ScrollDC( HDC arg1, int arg2, int arg3, const RECT * arg4, const RECT * arg5, HRGN arg6, PRECT arg7)
1136{
1137#ifdef DEBUG
1138 WriteLog("USER32: ScrollDC\n");
1139#endif
1140 return O32_ScrollDC(arg1, arg2, arg3, arg4, arg5, arg6, arg7);
1141}
1142//******************************************************************************
1143//******************************************************************************
1144BOOL WIN32API SetCaretBlinkTime( UINT arg1)
1145{
1146#ifdef DEBUG
1147 WriteLog("USER32: SetCaretBlinkTime\n");
1148#endif
1149 return O32_SetCaretBlinkTime(arg1);
1150}
1151//******************************************************************************
1152//******************************************************************************
1153BOOL WIN32API SetCaretPos( int arg1, int arg2)
1154{
1155 dprintf(("USER32: SetCaretPos\n"));
1156 return O32_SetCaretPos(arg1, arg2);
1157}
1158//******************************************************************************
1159//******************************************************************************
1160BOOL WIN32API SetDoubleClickTime( UINT arg1)
1161{
1162#ifdef DEBUG
1163 WriteLog("USER32: SetDoubleClickTime\n");
1164#endif
1165 return O32_SetDoubleClickTime(arg1);
1166}
1167//******************************************************************************
1168//******************************************************************************
1169BOOL WIN32API ShowCaret( HWND arg1)
1170{
1171 dprintf(("USER32: ShowCaret\n"));
1172 return O32_ShowCaret(arg1);
1173}
1174//******************************************************************************
1175//******************************************************************************
1176BOOL WIN32API SwapMouseButton( BOOL arg1)
1177{
1178#ifdef DEBUG
1179 WriteLog("USER32: SwapMouseButton\n");
1180#endif
1181 return O32_SwapMouseButton(arg1);
1182}
1183//******************************************************************************
1184/* Not support by Open32 (not included are the new win9x parameters):
1185 case SPI_GETFASTTASKSWITCH:
1186 case SPI_GETGRIDGRANULARITY:
1187 case SPI_GETICONTITLELOGFONT:
1188 case SPI_GETICONTITLEWRAP:
1189 case SPI_GETMENUDROPALIGNMENT:
1190 case SPI_ICONHORIZONTALSPACING:
1191 case SPI_ICONVERTICALSPACING:
1192 case SPI_LANGDRIVER:
1193 case SPI_SETFASTTASKSWITCH:
1194 case SPI_SETGRIDGRANULARITY:
1195 case SPI_SETICONTITLELOGFONT:
1196 case SPI_SETICONTITLEWRAP:
1197 case SPI_SETMENUDROPALIGNMENT:
1198 case SPI_GETSCREENSAVEACTIVE:
1199 case SPI_GETSCREENSAVETIMEOUT:
1200 case SPI_SETDESKPATTERN:
1201 case SPI_SETDESKWALLPAPER:
1202 case SPI_SETSCREENSAVEACTIVE:
1203 case SPI_SETSCREENSAVETIMEOUT:
1204*/
1205//******************************************************************************
1206BOOL WIN32API SystemParametersInfoA(UINT uiAction, UINT uiParam, PVOID pvParam, UINT fWinIni)
1207{
1208 BOOL rc = TRUE;
1209 NONCLIENTMETRICSA *cmetric = (NONCLIENTMETRICSA *)pvParam;
1210
1211 switch(uiAction) {
1212 case SPI_SCREENSAVERRUNNING:
1213 *(BOOL *)pvParam = FALSE;
1214 break;
1215 case SPI_GETDRAGFULLWINDOWS:
1216 *(BOOL *)pvParam = FALSE;
1217 break;
1218 case SPI_GETNONCLIENTMETRICS:
1219 memset(cmetric, 0, sizeof(NONCLIENTMETRICSA));
1220 cmetric->cbSize = sizeof(NONCLIENTMETRICSA);
1221 //CB: font info not valid, needs improvements
1222 O32_SystemParametersInfo(SPI_GETICONTITLELOGFONT, 0, (LPVOID)&(cmetric->lfCaptionFont),0);
1223 O32_SystemParametersInfo(SPI_GETICONTITLELOGFONT, 0, (LPVOID)&(cmetric->lfMenuFont),0);
1224 //CB: experimental change for statusbar (and tooltips)
1225
1226 //O32_SystemParametersInfo(SPI_GETICONTITLELOGFONT, 0, (LPVOID)&(cmetric->lfStatusFont),0);
1227 lstrcpyA(cmetric->lfStatusFont.lfFaceName,"WarpSans");
1228 cmetric->lfStatusFont.lfHeight = 9;
1229
1230 O32_SystemParametersInfo(SPI_GETICONTITLELOGFONT, 0, (LPVOID)&(cmetric->lfMessageFont),0);
1231 cmetric->iBorderWidth = GetSystemMetrics(SM_CXBORDER);
1232 cmetric->iScrollWidth = GetSystemMetrics(SM_CXHSCROLL);
1233 cmetric->iScrollHeight = GetSystemMetrics(SM_CYHSCROLL);
1234 cmetric->iCaptionWidth = 32; //TODO
1235 cmetric->iCaptionHeight = 16; //TODO
1236 cmetric->iSmCaptionWidth = GetSystemMetrics(SM_CXSMSIZE);
1237 cmetric->iSmCaptionHeight = GetSystemMetrics(SM_CYSMSIZE);
1238 cmetric->iMenuWidth = 32; //TODO
1239 cmetric->iMenuHeight = GetSystemMetrics(SM_CYMENU);
1240 break;
1241 case SPI_GETICONTITLELOGFONT:
1242 {
1243 LPLOGFONTA lpLogFont = (LPLOGFONTA)pvParam;
1244
1245 /* from now on we always have an alias for MS Sans Serif */
1246 strcpy(lpLogFont->lfFaceName, "MS Sans Serif");
1247 lpLogFont->lfHeight = -GetProfileIntA("Desktop","IconTitleSize", 8);
1248 lpLogFont->lfWidth = 0;
1249 lpLogFont->lfEscapement = lpLogFont->lfOrientation = 0;
1250 lpLogFont->lfWeight = FW_NORMAL;
1251 lpLogFont->lfItalic = FALSE;
1252 lpLogFont->lfStrikeOut = FALSE;
1253 lpLogFont->lfUnderline = FALSE;
1254 lpLogFont->lfCharSet = ANSI_CHARSET;
1255 lpLogFont->lfOutPrecision = OUT_DEFAULT_PRECIS;
1256 lpLogFont->lfClipPrecision = CLIP_DEFAULT_PRECIS;
1257 lpLogFont->lfPitchAndFamily = DEFAULT_PITCH | FF_SWISS;
1258 break;
1259 }
1260 case SPI_GETBORDER:
1261 *(INT *)pvParam = GetSystemMetrics( SM_CXFRAME );
1262 break;
1263
1264 case SPI_GETWORKAREA:
1265 SetRect( (RECT *)pvParam, 0, 0,
1266 GetSystemMetrics( SM_CXSCREEN ),
1267 GetSystemMetrics( SM_CYSCREEN )
1268 );
1269 break;
1270
1271 case 104: //TODO: Undocumented
1272 rc = 16;
1273 break;
1274 default:
1275 rc = O32_SystemParametersInfo(uiAction, uiParam, pvParam, fWinIni);
1276 break;
1277 }
1278#ifdef DEBUG
1279 WriteLog("USER32: SystemParametersInfoA %d, returned %d\n", uiAction, rc);
1280#endif
1281 return(rc);
1282}
1283//******************************************************************************
1284//TODO: Check for more options that have different structs for Unicode!!!!
1285//******************************************************************************
1286BOOL WIN32API SystemParametersInfoW(UINT uiAction, UINT uiParam, PVOID pvParam, UINT fWinIni)
1287{
1288 BOOL rc;
1289 NONCLIENTMETRICSW *clientMetricsW = (NONCLIENTMETRICSW *)pvParam;
1290 NONCLIENTMETRICSA clientMetricsA = {0};
1291 PVOID pvParamA;
1292 UINT uiParamA;
1293
1294 switch(uiAction) {
1295 case SPI_SETNONCLIENTMETRICS:
1296 clientMetricsA.cbSize = sizeof(NONCLIENTMETRICSA);
1297 clientMetricsA.iBorderWidth = clientMetricsW->iBorderWidth;
1298 clientMetricsA.iScrollWidth = clientMetricsW->iScrollWidth;
1299 clientMetricsA.iScrollHeight = clientMetricsW->iScrollHeight;
1300 clientMetricsA.iCaptionWidth = clientMetricsW->iCaptionWidth;
1301 clientMetricsA.iCaptionHeight = clientMetricsW->iCaptionHeight;
1302 ConvertFontWA(&clientMetricsW->lfCaptionFont, &clientMetricsA.lfCaptionFont);
1303 clientMetricsA.iSmCaptionWidth = clientMetricsW->iSmCaptionWidth;
1304 clientMetricsA.iSmCaptionHeight = clientMetricsW->iSmCaptionHeight;
1305 ConvertFontWA(&clientMetricsW->lfSmCaptionFont, &clientMetricsA.lfSmCaptionFont);
1306 clientMetricsA.iMenuWidth = clientMetricsW->iMenuWidth;
1307 clientMetricsA.iMenuHeight = clientMetricsW->iMenuHeight;
1308 ConvertFontWA(&clientMetricsW->lfMenuFont, &clientMetricsA.lfMenuFont);
1309 ConvertFontWA(&clientMetricsW->lfStatusFont, &clientMetricsA.lfStatusFont);
1310 ConvertFontWA(&clientMetricsW->lfMessageFont, &clientMetricsA.lfMessageFont);
1311 //no break
1312 case SPI_GETNONCLIENTMETRICS:
1313 uiParamA = sizeof(NONCLIENTMETRICSA);
1314 pvParamA = &clientMetricsA;
1315 break;
1316 case SPI_GETICONTITLELOGFONT:
1317 {
1318 LPLOGFONTW lpLogFont = (LPLOGFONTW)pvParam;
1319
1320 /* from now on we always have an alias for MS Sans Serif */
1321 lstrcpyW(lpLogFont->lfFaceName, (LPCWSTR)L"MS Sans Serif");
1322 lpLogFont->lfHeight = -GetProfileIntA("Desktop","IconTitleSize", 8);
1323 lpLogFont->lfWidth = 0;
1324 lpLogFont->lfEscapement = lpLogFont->lfOrientation = 0;
1325 lpLogFont->lfWeight = FW_NORMAL;
1326 lpLogFont->lfItalic = FALSE;
1327 lpLogFont->lfStrikeOut = FALSE;
1328 lpLogFont->lfUnderline = FALSE;
1329 lpLogFont->lfCharSet = ANSI_CHARSET;
1330 lpLogFont->lfOutPrecision = OUT_DEFAULT_PRECIS;
1331 lpLogFont->lfClipPrecision = CLIP_DEFAULT_PRECIS;
1332 lpLogFont->lfPitchAndFamily = DEFAULT_PITCH | FF_SWISS;
1333 return TRUE;
1334 }
1335 default:
1336 pvParamA = pvParam;
1337 uiParamA = uiParam;
1338 break;
1339 }
1340 rc = SystemParametersInfoA(uiAction, uiParamA, pvParamA, fWinIni);
1341
1342 switch(uiAction) {
1343 case SPI_GETNONCLIENTMETRICS:
1344 clientMetricsW->cbSize = sizeof(*clientMetricsW);
1345 clientMetricsW->iBorderWidth = clientMetricsA.iBorderWidth;
1346 clientMetricsW->iScrollWidth = clientMetricsA.iScrollWidth;
1347 clientMetricsW->iScrollHeight = clientMetricsA.iScrollHeight;
1348 clientMetricsW->iCaptionWidth = clientMetricsA.iCaptionWidth;
1349 clientMetricsW->iCaptionHeight = clientMetricsA.iCaptionHeight;
1350 ConvertFontAW(&clientMetricsA.lfCaptionFont, &clientMetricsW->lfCaptionFont);
1351
1352 clientMetricsW->iSmCaptionWidth = clientMetricsA.iSmCaptionWidth;
1353 clientMetricsW->iSmCaptionHeight = clientMetricsA.iSmCaptionHeight;
1354 ConvertFontAW(&clientMetricsA.lfSmCaptionFont, &clientMetricsW->lfSmCaptionFont);
1355
1356 clientMetricsW->iMenuWidth = clientMetricsA.iMenuWidth;
1357 clientMetricsW->iMenuHeight = clientMetricsA.iMenuHeight;
1358 ConvertFontAW(&clientMetricsA.lfMenuFont, &clientMetricsW->lfMenuFont);
1359 ConvertFontAW(&clientMetricsA.lfStatusFont, &clientMetricsW->lfStatusFont);
1360 ConvertFontAW(&clientMetricsA.lfMessageFont, &clientMetricsW->lfMessageFont);
1361 break;
1362 }
1363#ifdef DEBUG
1364 WriteLog("USER32: SystemParametersInfoW %d, returned %d\n", uiAction, rc);
1365#endif
1366 return(rc);
1367}
1368//******************************************************************************
1369//******************************************************************************
1370LONG WIN32API TabbedTextOutA( HDC arg1, int arg2, int arg3, LPCSTR arg4, int arg5, int arg6, int * arg7, int arg8)
1371{
1372#ifdef DEBUG
1373 WriteLog("USER32: TabbedTextOutA\n");
1374#endif
1375 return O32_TabbedTextOut(arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8);
1376}
1377//******************************************************************************
1378//******************************************************************************
1379LONG WIN32API TabbedTextOutW( HDC arg1, int arg2, int arg3, LPCWSTR arg4, int arg5, int arg6, int * arg7, int arg8)
1380{
1381 char *astring = UnicodeToAsciiString((LPWSTR)arg4);
1382 LONG rc;
1383
1384#ifdef DEBUG
1385 WriteLog("USER32: TabbedTextOutW\n");
1386#endif
1387 rc = O32_TabbedTextOut(arg1, arg2, arg3, astring, arg5, arg6, arg7, arg8);
1388 FreeAsciiString(astring);
1389 return rc;
1390}
1391//******************************************************************************
1392//******************************************************************************
1393BOOL WIN32API ValidateRect( HWND arg1, const RECT * arg2)
1394{
1395#ifdef DEBUG
1396 WriteLog("USER32: ValidateRect\n");
1397#endif
1398 return O32_ValidateRect(arg1, arg2);
1399}
1400//******************************************************************************
1401//******************************************************************************
1402BOOL WIN32API ValidateRgn( HWND arg1, HRGN arg2)
1403{
1404#ifdef DEBUG
1405 WriteLog("USER32: ValidateRgn\n");
1406#endif
1407 return O32_ValidateRgn(arg1, arg2);
1408}
1409//******************************************************************************
1410//******************************************************************************
1411WORD WIN32API VkKeyScanW( WCHAR arg1)
1412{
1413#ifdef DEBUG
1414 WriteLog("USER32: VkKeyScanW\n");
1415#endif
1416 // NOTE: This will not work as is (needs UNICODE support)
1417 return O32_VkKeyScan((char)arg1);
1418}
1419//******************************************************************************
1420//******************************************************************************
1421BOOL WIN32API WinHelpW( HWND arg1, LPCWSTR arg2, UINT arg3, DWORD arg4)
1422{
1423 char *astring = UnicodeToAsciiString((LPWSTR)arg2);
1424 BOOL rc;
1425
1426#ifdef DEBUG
1427 WriteLog("USER32: WinHelpW\n");
1428#endif
1429 rc = WinHelpA(arg1, astring, arg3, arg4);
1430 FreeAsciiString(astring);
1431 return rc;
1432}
1433//******************************************************************************
1434//******************************************************************************
1435int WIN32API wvsprintfA( LPSTR arg1, LPCSTR arg2, va_list arg3)
1436{
1437#ifdef DEBUG
1438 WriteLog("USER32: wvsprintfA\n");
1439#endif
1440 return O32_wvsprintf(arg1, arg2, (LPCVOID *)arg3);
1441}
1442//******************************************************************************
1443//******************************************************************************
1444int WIN32API wvsprintfW(LPWSTR lpOut, LPCWSTR lpFmt, va_list argptr)
1445{
1446 int rc;
1447 char szOut[256];
1448 char *lpFmtA;
1449
1450 lpFmtA = UnicodeToAsciiString((LPWSTR)lpFmt);
1451#ifdef DEBUG
1452 WriteLog("USER32: wvsprintfW, DOES NOT HANDLE UNICODE STRINGS!\n");
1453 WriteLog("USER32: %s\n", lpFmt);
1454#endif
1455 rc = O32_wvsprintf(szOut, lpFmtA, (LPCVOID)argptr);
1456
1457 AsciiToUnicode(szOut, lpOut);
1458#ifdef DEBUG
1459 WriteLog("USER32: %s\n", lpOut);
1460#endif
1461 FreeAsciiString(lpFmtA);
1462 return(rc);
1463}
1464//******************************************************************************
1465//TODO: Not complete
1466//******************************************************************************
1467BOOL WIN32API GrayStringA(HDC hdc, HBRUSH hBrush, GRAYSTRINGPROC lpOutputFunc,
1468 LPARAM lpData, int nCount, int X, int Y, int nWidth,
1469 int nHeight)
1470{
1471 BOOL rc;
1472 COLORREF curclr;
1473
1474#ifdef DEBUG
1475 WriteLog("USER32: GrayStringA, not completely implemented\n");
1476#endif
1477 if(lpOutputFunc == NULL && lpData == NULL) {
1478#ifdef DEBUG
1479 WriteLog("USER32: lpOutputFunc == NULL && lpData == NULL\n");
1480#endif
1481 return(FALSE);
1482 }
1483 if(lpOutputFunc) {
1484 return(lpOutputFunc(hdc, lpData, nCount));
1485 }
1486 curclr = SetTextColor(hdc, GetSysColor(COLOR_GRAYTEXT));
1487 rc = TextOutA(hdc, X, Y, (char *)lpData, nCount);
1488 SetTextColor(hdc, curclr);
1489
1490 return(rc);
1491}
1492//******************************************************************************
1493//******************************************************************************
1494BOOL WIN32API GrayStringW(HDC hdc, HBRUSH hBrush, GRAYSTRINGPROC lpOutputFunc,
1495 LPARAM lpData, int nCount, int X, int Y, int nWidth,
1496 int nHeight)
1497{
1498 BOOL rc;
1499 char *astring;
1500 COLORREF curclr;
1501
1502#ifdef DEBUG
1503 WriteLog("USER32: GrayStringW, not completely implemented\n");
1504#endif
1505
1506 if(lpOutputFunc == NULL && lpData == NULL) {
1507#ifdef DEBUG
1508 WriteLog("USER32: lpOutputFunc == NULL && lpData == NULL\n");
1509#endif
1510 return(FALSE);
1511 }
1512 if(nCount == 0)
1513 nCount = UniStrlen((UniChar*)lpData);
1514
1515 if(lpOutputFunc) {
1516 return(lpOutputFunc(hdc, lpData, nCount));
1517 }
1518 astring = UnicodeToAsciiString((LPWSTR)lpData);
1519
1520 curclr = SetTextColor(hdc, GetSysColor(COLOR_GRAYTEXT));
1521 rc = TextOutA(hdc, X, Y, astring, nCount);
1522 SetTextColor(hdc, curclr);
1523
1524 FreeAsciiString(astring);
1525 return(rc);
1526}
1527//******************************************************************************
1528//TODO:
1529//******************************************************************************
1530HANDLE WIN32API CopyImage(HANDLE hImage, UINT uType, int cxDesired, int cyDesired, UINT fuFlags)
1531{
1532#ifdef DEBUG
1533 WriteLog("USER32: CopyImage, not implemented\n");
1534#endif
1535 switch(uType) {
1536 case IMAGE_BITMAP:
1537 case IMAGE_CURSOR:
1538 case IMAGE_ICON:
1539 default:
1540#ifdef DEBUG
1541 WriteLog("USER32: CopyImage, unknown type\n");
1542#endif
1543 return(NULL);
1544 }
1545 return(NULL);
1546}
1547//******************************************************************************
1548//******************************************************************************
1549BOOL WIN32API GetKeyboardState(PBYTE lpKeyState)
1550{
1551#ifdef DEBUG
1552 WriteLog("USER32: GetKeyboardState, not properly implemented\n");
1553#endif
1554 memset(lpKeyState, 0, 256);
1555 return(TRUE);
1556}
1557//******************************************************************************
1558//******************************************************************************
1559BOOL WIN32API SetKeyboardState(PBYTE lpKeyState)
1560{
1561#ifdef DEBUG
1562 WriteLog("USER32: SetKeyboardState, not implemented\n");
1563#endif
1564 return(TRUE);
1565}
1566//******************************************************************************
1567//2nd parameter not used according to SDK (yet?)
1568//******************************************************************************
1569VOID WIN32API SetLastErrorEx(DWORD dwErrCode, DWORD dwType)
1570{
1571#ifdef DEBUG
1572 WriteLog("USER32: SetLastErrorEx\n");
1573#endif
1574 SetLastError(dwErrCode);
1575}
1576//******************************************************************************
1577//******************************************************************************
1578BOOL WIN32API ActivateKeyboardLayout(HKL hkl, UINT fuFlags)
1579{
1580#ifdef DEBUG
1581 WriteLog("USER32: ActivateKeyboardLayout, not implemented\n");
1582#endif
1583 return(TRUE);
1584}
1585//******************************************************************************
1586//******************************************************************************
1587int WIN32API GetKeyboardLayoutList(int nBuff, HKL *lpList)
1588{
1589#ifdef DEBUG
1590 WriteLog("USER32: GetKeyboardLayoutList, not implemented\n");
1591#endif
1592 return(0);
1593}
1594//******************************************************************************
1595//******************************************************************************
1596HKL WIN32API GetKeyboardLayout(DWORD dwLayout)
1597{
1598#ifdef DEBUG
1599 WriteLog("USER32: GetKeyboardLayout, not implemented\n");
1600#endif
1601 return(0);
1602}
1603//******************************************************************************
1604//******************************************************************************
1605int WIN32API LookupIconIdFromDirectory(PBYTE presbits, BOOL fIcon)
1606{
1607#ifdef DEBUG
1608 WriteLog("USER32: LookupIconIdFromDirectory, not implemented\n");
1609#endif
1610 return(0);
1611}
1612//******************************************************************************
1613//******************************************************************************
1614int WIN32API LookupIconIdFromDirectoryEx(PBYTE presbits, BOOL fIcon,
1615 int cxDesired, int cyDesired,
1616 UINT Flags)
1617{
1618#ifdef DEBUG
1619 WriteLog("USER32: LookupIconIdFromDirectoryEx, not implemented\n");
1620#endif
1621 return(0);
1622}
1623//******************************************************************************
1624//DWORD idAttach; /* thread to attach */
1625//DWORD idAttachTo; /* thread to attach to */
1626//BOOL fAttach; /* attach or detach */
1627//******************************************************************************
1628BOOL WIN32API AttachThreadInput(DWORD idAttach, DWORD idAttachTo, BOOL fAttach)
1629{
1630#ifdef DEBUG
1631 WriteLog("USER32: AttachThreadInput, not implemented\n");
1632#endif
1633 return(TRUE);
1634}
1635//******************************************************************************
1636//******************************************************************************
1637BOOL WIN32API RegisterHotKey(HWND hwnd, int idHotKey, UINT fuModifiers, UINT uVirtKey)
1638{
1639#ifdef DEBUG
1640 WriteLog("USER32: RegisterHotKey, not implemented\n");
1641#endif
1642 return(TRUE);
1643}
1644//******************************************************************************
1645//******************************************************************************
1646BOOL WIN32API UnregisterHotKey(HWND hwnd, int idHotKey)
1647{
1648#ifdef DEBUG
1649 WriteLog("USER32: UnregisterHotKey, not implemented\n");
1650#endif
1651 return(TRUE);
1652}
1653//******************************************************************************
1654//******************************************************************************
1655BOOL WIN32API SetWindowContextHelpId(HWND hwnd, DWORD dwContextHelpId)
1656{
1657#ifdef DEBUG
1658 WriteLog("USER32: SetWindowContextHelpId, not implemented\n");
1659#endif
1660 return(TRUE);
1661}
1662//******************************************************************************
1663//******************************************************************************
1664DWORD WIN32API GetWindowContextHelpId(HWND hwnd)
1665{
1666#ifdef DEBUG
1667 WriteLog("USER32: GetWindowContextHelpId, not implemented\n");
1668#endif
1669 return(0);
1670}
1671//******************************************************************************
1672//******************************************************************************
1673BOOL WIN32API GetMonitorInfoA(HMONITOR,LPMONITORINFO)
1674{
1675#ifdef DEBUG
1676 WriteLog("USER32: GetMonitorInfoA not supported!!\n");
1677#endif
1678 return(FALSE);
1679}
1680//******************************************************************************
1681//******************************************************************************
1682BOOL WIN32API GetMonitorInfoW(HMONITOR,LPMONITORINFO)
1683{
1684#ifdef DEBUG
1685 WriteLog("USER32: GetMonitorInfoW not supported!!\n");
1686#endif
1687 return(FALSE);
1688}
1689//******************************************************************************
1690//******************************************************************************
1691HMONITOR WIN32API MonitorFromWindow(HWND hwnd, DWORD dwFlags)
1692{
1693#ifdef DEBUG
1694 WriteLog("USER32: MonitorFromWindow not correctly supported??\n");
1695#endif
1696 return(0);
1697}
1698//******************************************************************************
1699//******************************************************************************
1700HMONITOR WIN32API MonitorFromRect(LPRECT rect, DWORD dwFlags)
1701{
1702#ifdef DEBUG
1703 WriteLog("USER32: MonitorFromRect not correctly supported??\n");
1704#endif
1705 return(0);
1706}
1707//******************************************************************************
1708//******************************************************************************
1709HMONITOR WIN32API MonitorFromPoint(POINT point, DWORD dwflags)
1710{
1711#ifdef DEBUG
1712 WriteLog("USER32: MonitorFromPoint not correctly supported??\n");
1713#endif
1714 return(0);
1715}
1716//******************************************************************************
1717//******************************************************************************
1718BOOL WIN32API EnumDisplayMonitors(HDC,LPRECT,MONITORENUMPROC,LPARAM)
1719{
1720#ifdef DEBUG
1721 WriteLog("USER32: EnumDisplayMonitors not supported??\n");
1722#endif
1723 return(FALSE);
1724}
1725//******************************************************************************
1726//******************************************************************************
1727BOOL WIN32API EnumDisplaySettingsA(LPCSTR lpszDeviceName, DWORD iModeNum,
1728 LPDEVMODEA lpDevMode)
1729{
1730#ifdef DEBUG
1731 WriteLog("USER32: EnumDisplaySettingsA FAKED\n");
1732#endif
1733 switch(iModeNum) {
1734 case 0:
1735 lpDevMode->dmBitsPerPel = 16;
1736 lpDevMode->dmPelsWidth = 768;
1737 lpDevMode->dmPelsHeight = 1024;
1738 lpDevMode->dmDisplayFlags = 0;
1739 lpDevMode->dmDisplayFrequency = 70;
1740 break;
1741 case 1:
1742 lpDevMode->dmBitsPerPel = 16;
1743 lpDevMode->dmPelsWidth = 640;
1744 lpDevMode->dmPelsHeight = 480;
1745 lpDevMode->dmDisplayFlags = 0;
1746 lpDevMode->dmDisplayFrequency = 70;
1747 break;
1748 default:
1749 return(FALSE);
1750 }
1751 return(TRUE);
1752}
1753//******************************************************************************
1754//******************************************************************************
1755LONG WIN32API ChangeDisplaySettingsA(LPDEVMODEA lpDevMode, DWORD dwFlags)
1756{
1757#ifdef DEBUG
1758 if(lpDevMode) {
1759 WriteLog("USER32: ChangeDisplaySettingsA FAKED %X\n", dwFlags);
1760 WriteLog("USER32: ChangeDisplaySettingsA lpDevMode->dmBitsPerPel %d\n", lpDevMode->dmBitsPerPel);
1761 WriteLog("USER32: ChangeDisplaySettingsA lpDevMode->dmPelsWidth %d\n", lpDevMode->dmPelsWidth);
1762 WriteLog("USER32: ChangeDisplaySettingsA lpDevMode->dmPelsHeight %d\n", lpDevMode->dmPelsHeight);
1763 }
1764#endif
1765 return(DISP_CHANGE_SUCCESSFUL);
1766}
1767//******************************************************************************
1768//******************************************************************************
1769
1770
1771/*****************************************************************************
1772 * Name : BOOL WIN32API AnyPopup
1773 * Purpose : The AnyPopup function indicates whether an owned, visible,
1774 * top-level pop-up, or overlapped window exists on the screen. The
1775 * function searches the entire Windows screen, not just the calling
1776 * application's client area.
1777 * Parameters: VOID
1778 * Variables :
1779 * Result : If a pop-up window exists, the return value is TRUE even if the
1780 * pop-up window is completely covered by other windows. Otherwise,
1781 * it is FALSE.
1782 * Remark : AnyPopup is a Windows version 1.x function and is retained for
1783 * compatibility purposes. It is generally not useful.
1784 * Status : UNTESTED STUB
1785 *
1786 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
1787 *****************************************************************************/
1788
1789BOOL WIN32API AnyPopup(VOID)
1790{
1791 dprintf(("USER32:AnyPopup() not implemented.\n"));
1792
1793 return (FALSE);
1794}
1795
1796
1797
1798/*****************************************************************************
1799 * Name : LONG WIN32API ChangeDisplaySettingsW
1800 * Purpose : The ChangeDisplaySettings function changes the display settings
1801 * to the specified graphics mode.
1802 * Parameters: LPDEVMODEW lpDevModeW
1803 * DWORD dwFlags
1804 * Variables :
1805 * Result : DISP_CHANGE_SUCCESSFUL The settings change was successful.
1806 * DISP_CHANGE_RESTART The computer must be restarted in order for the graphics mode to work.
1807 * DISP_CHANGE_BADFLAGS An invalid set of flags was passed in.
1808 * DISP_CHANGE_FAILED The display driver failed the specified graphics mode.
1809 * DISP_CHANGE_BADMODE The graphics mode is not supported.
1810 * DISP_CHANGE_NOTUPDATED Unable to write settings to the registry.
1811 * Remark :
1812 * Status : UNTESTED STUB
1813 *
1814 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
1815 *****************************************************************************/
1816
1817LONG WIN32API ChangeDisplaySettingsW(LPDEVMODEW lpDevMode,
1818 DWORD dwFlags)
1819{
1820 dprintf(("USER32:ChangeDisplaySettingsW(%08xh,%08x) not implemented.\n",
1821 lpDevMode,
1822 dwFlags));
1823
1824 return (ChangeDisplaySettingsA((LPDEVMODEA)lpDevMode,
1825 dwFlags));
1826}
1827
1828/*****************************************************************************
1829 * Name : BOOL WIN32API CloseDesktop
1830 * Purpose : The CloseDesktop function closes an open handle of a desktop
1831 * object. A desktop is a secure object contained within a window
1832 * station object. A desktop has a logical display surface and
1833 * contains windows, menus and hooks.
1834 * Parameters: HDESK hDesktop
1835 * Variables :
1836 * Result : If the function succeeds, the return value is TRUE.
1837 * If the functions fails, the return value is FALSE. To get
1838 * extended error information, call GetLastError.
1839 * Remark :
1840 * Status : UNTESTED STUB
1841 *
1842 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
1843 *****************************************************************************/
1844
1845BOOL WIN32API CloseDesktop(HDESK hDesktop)
1846{
1847 dprintf(("USER32:CloseDesktop(%08x) not implemented.\n",
1848 hDesktop));
1849
1850 return (FALSE);
1851}
1852
1853
1854/*****************************************************************************
1855 * Name : BOOL WIN32API CloseWindowStation
1856 * Purpose : The CloseWindowStation function closes an open window station handle.
1857 * Parameters: HWINSTA hWinSta
1858 * Variables :
1859 * Result :
1860 * Remark : If the function succeeds, the return value is TRUE.
1861 * If the functions fails, the return value is FALSE. To get
1862 * extended error information, call GetLastError.
1863 * Status : UNTESTED STUB
1864 *
1865 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
1866 *****************************************************************************/
1867
1868BOOL WIN32API CloseWindowStation(HWINSTA hWinSta)
1869{
1870 dprintf(("USER32:CloseWindowStation(%08x) not implemented.\n",
1871 hWinSta));
1872
1873 return (FALSE);
1874}
1875
1876
1877/*****************************************************************************
1878 * Name : HDESK WIN32API CreateDesktopA
1879 * Purpose : The CreateDesktop function creates a new desktop on the window
1880 * station associated with the calling process.
1881 * Parameters: LPCTSTR lpszDesktop name of the new desktop
1882 * LPCTSTR lpszDevice name of display device to assign to the desktop
1883 * LPDEVMODE pDevMode reserved; must be NULL
1884 * DWORD dwFlags flags to control interaction with other applications
1885 * DWORD dwDesiredAccess specifies access of returned handle
1886 * LPSECURITY_ATTRIBUTES lpsa specifies security attributes of the desktop
1887 * Variables :
1888 * Result : If the function succeeds, the return value is a handle of the
1889 * newly created desktop.
1890 * If the function fails, the return value is NULL. To get extended
1891 * error information, call GetLastError.
1892 * Remark :
1893 * Status : UNTESTED STUB
1894 *
1895 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
1896 *****************************************************************************/
1897
1898HDESK WIN32API CreateDesktopA(LPCTSTR lpszDesktop,
1899 LPCTSTR lpszDevice,
1900 LPDEVMODEA pDevMode,
1901 DWORD dwFlags,
1902 DWORD dwDesiredAccess,
1903 LPSECURITY_ATTRIBUTES lpsa)
1904{
1905 dprintf(("USER32:CreateDesktopA(%s,%s,%08xh,%08xh,%08xh,%08x) not implemented.\n",
1906 lpszDesktop,
1907 lpszDevice,
1908 pDevMode,
1909 dwFlags,
1910 dwDesiredAccess,
1911 lpsa));
1912
1913 return (NULL);
1914}
1915
1916
1917/*****************************************************************************
1918 * Name : HDESK WIN32API CreateDesktopW
1919 * Purpose : The CreateDesktop function creates a new desktop on the window
1920 * station associated with the calling process.
1921 * Parameters: LPCTSTR lpszDesktop name of the new desktop
1922 * LPCTSTR lpszDevice name of display device to assign to the desktop
1923 * LPDEVMODE pDevMode reserved; must be NULL
1924 * DWORD dwFlags flags to control interaction with other applications
1925 * DWORD dwDesiredAccess specifies access of returned handle
1926 * LPSECURITY_ATTRIBUTES lpsa specifies security attributes of the desktop
1927 * Variables :
1928 * Result : If the function succeeds, the return value is a handle of the
1929 * newly created desktop.
1930 * If the function fails, the return value is NULL. To get extended
1931 * error information, call GetLastError.
1932 * Remark :
1933 * Status : UNTESTED STUB
1934 *
1935 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
1936 *****************************************************************************/
1937
1938HDESK WIN32API CreateDesktopW(LPCTSTR lpszDesktop,
1939 LPCTSTR lpszDevice,
1940 LPDEVMODEW pDevMode,
1941 DWORD dwFlags,
1942 DWORD dwDesiredAccess,
1943 LPSECURITY_ATTRIBUTES lpsa)
1944{
1945 dprintf(("USER32:CreateDesktopW(%s,%s,%08xh,%08xh,%08xh,%08x) not implemented.\n",
1946 lpszDesktop,
1947 lpszDevice,
1948 pDevMode,
1949 dwFlags,
1950 dwDesiredAccess,
1951 lpsa));
1952
1953 return (NULL);
1954}
1955
1956
1957/*****************************************************************************
1958 * Name : HWINSTA WIN32API CreateWindowStationA
1959 * Purpose : The CreateWindowStation function creates a window station object.
1960 * It returns a handle that can be used to access the window station.
1961 * A window station is a secure object that contains a set of global
1962 * atoms, a clipboard, and a set of desktop objects.
1963 * Parameters: LPTSTR lpwinsta name of the new window station
1964 * DWORD dwReserved reserved; must be NULL
1965 * DWORD dwDesiredAccess specifies access of returned handle
1966 * LPSECURITY_ATTRIBUTES lpsa specifies security attributes of the window station
1967 * Variables :
1968 * Result : If the function succeeds, the return value is the handle to the
1969 * newly created window station.
1970 * If the function fails, the return value is NULL. To get extended
1971 * error information, call GetLastError.
1972 * Remark :
1973 * Status : UNTESTED STUB
1974 *
1975 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
1976 *****************************************************************************/
1977
1978HWINSTA WIN32API CreateWindowStationA(LPTSTR lpWinSta,
1979 DWORD dwReserved,
1980 DWORD dwDesiredAccess,
1981 LPSECURITY_ATTRIBUTES lpsa)
1982{
1983 dprintf(("USER32:CreateWindowStationA(%s,%08xh,%08xh,%08x) not implemented.\n",
1984 lpWinSta,
1985 dwReserved,
1986 dwDesiredAccess,
1987 lpsa));
1988
1989 return (NULL);
1990}
1991
1992
1993/*****************************************************************************
1994 * Name : HWINSTA WIN32API CreateWindowStationW
1995 * Purpose : The CreateWindowStation function creates a window station object.
1996 * It returns a handle that can be used to access the window station.
1997 * A window station is a secure object that contains a set of global
1998 * atoms, a clipboard, and a set of desktop objects.
1999 * Parameters: LPTSTR lpwinsta name of the new window station
2000 * DWORD dwReserved reserved; must be NULL
2001 * DWORD dwDesiredAccess specifies access of returned handle
2002 * LPSECURITY_ATTRIBUTES lpsa specifies security attributes of the window station
2003 * Variables :
2004 * Result : If the function succeeds, the return value is the handle to the
2005 * newly created window station.
2006 * If the function fails, the return value is NULL. To get extended
2007 * error information, call GetLastError.
2008 * Remark :
2009 * Status : UNTESTED STUB
2010 *
2011 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
2012 *****************************************************************************/
2013
2014HWINSTA WIN32API CreateWindowStationW(LPWSTR lpWinSta,
2015 DWORD dwReserved,
2016 DWORD dwDesiredAccess,
2017 LPSECURITY_ATTRIBUTES lpsa)
2018{
2019 dprintf(("USER32:CreateWindowStationW(%s,%08xh,%08xh,%08x) not implemented.\n",
2020 lpWinSta,
2021 dwReserved,
2022 dwDesiredAccess,
2023 lpsa));
2024
2025 return (NULL);
2026}
2027
2028/*****************************************************************************
2029 * Name : BOOL WIN32API DragDetect
2030 * Purpose : The DragDetect function captures the mouse and tracks its movement
2031 * Parameters: HWND hwnd
2032 * POINT pt
2033 * Variables :
2034 * Result : If the user moved the mouse outside of the drag rectangle while
2035 * holding the left button down, the return value is TRUE.
2036 * If the user did not move the mouse outside of the drag rectangle
2037 * while holding the left button down, the return value is FALSE.
2038 * Remark :
2039 * Status : UNTESTED STUB
2040 *
2041 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
2042 *****************************************************************************/
2043
2044BOOL WIN32API DragDetect(HWND hwnd,
2045 POINT pt)
2046{
2047 dprintf(("USER32:DragDetect(%08xh,...) not implemented.\n",
2048 hwnd));
2049
2050 return (FALSE);
2051}
2052
2053
2054
2055/*****************************************************************************
2056 * Name : BOOL WIN32API EnumDesktopWindows
2057 * Purpose : The EnumDesktopWindows function enumerates all windows in a
2058 * desktop by passing the handle of each window, in turn, to an
2059 * application-defined callback function.
2060 * Parameters: HDESK hDesktop handle of desktop to enumerate
2061 * WNDENUMPROC lpfn points to application's callback function
2062 * LPARAM lParam 32-bit value to pass to the callback function
2063 * Variables :
2064 * Result : If the function succeeds, the return value is TRUE.
2065 * If the function fails, the return value is FALSE. To get
2066 * extended error information, call GetLastError.
2067 * Remark :
2068 * Status : UNTESTED STUB
2069 *
2070 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
2071 *****************************************************************************/
2072
2073BOOL WIN32API EnumDesktopWindows(HDESK hDesktop,
2074 WNDENUMPROC lpfn,
2075 LPARAM lParam)
2076{
2077 dprintf(("USER32:EnumDesktopWindows (%08xh,%08xh,%08x) not implemented.\n",
2078 hDesktop,
2079 lpfn,
2080 lParam));
2081
2082 return (FALSE);
2083}
2084
2085
2086/*****************************************************************************
2087 * Name : BOOL WIN32API EnumDesktopsA
2088 * Purpose : The EnumDesktops function enumerates all desktops in the window
2089 * station assigned to the calling process. The function does so by
2090 * passing the name of each desktop, in turn, to an application-
2091 * defined callback function.
2092 * Parameters: HWINSTA hwinsta handle of window station to enumerate
2093 * DESKTOPENUMPROC lpEnumFunc points to application's callback function
2094 * LPARAM lParam 32-bit value to pass to the callback function
2095 * Variables :
2096 * Result : If the function succeeds, the return value is TRUE.
2097 * If the function fails, the return value is FALSE. To get extended
2098 * error information, call GetLastError.
2099 * Remark :
2100 * Status : UNTESTED STUB
2101 *
2102 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
2103 *****************************************************************************/
2104
2105BOOL WIN32API EnumDesktopsA(HWINSTA hWinSta,
2106 DESKTOPENUMPROCA lpEnumFunc,
2107 LPARAM lParam)
2108{
2109 dprintf(("USER32:EnumDesktopsA (%08xh,%08xh,%08x) not implemented.\n",
2110 hWinSta,
2111 lpEnumFunc,
2112 lParam));
2113
2114 return (FALSE);
2115}
2116
2117
2118/*****************************************************************************
2119 * Name : BOOL WIN32API EnumDesktopsW
2120 * Purpose : The EnumDesktops function enumerates all desktops in the window
2121 * station assigned to the calling process. The function does so by
2122 * passing the name of each desktop, in turn, to an application-
2123 * defined callback function.
2124 * Parameters: HWINSTA hwinsta handle of window station to enumerate
2125 * DESKTOPENUMPROC lpEnumFunc points to application's callback function
2126 * LPARAM lParam 32-bit value to pass to the callback function
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 *****************************************************************************/
2136
2137BOOL WIN32API EnumDesktopsW(HWINSTA hWinSta,
2138 DESKTOPENUMPROCW lpEnumFunc,
2139 LPARAM lParam)
2140{
2141 dprintf(("USER32:EnumDesktopsW (%08xh,%08xh,%08x) not implemented.\n",
2142 hWinSta,
2143 lpEnumFunc,
2144 lParam));
2145
2146 return (FALSE);
2147}
2148
2149
2150
2151/*****************************************************************************
2152 * Name : BOOL WIN32API EnumDisplaySettingsW
2153 * Purpose : The EnumDisplaySettings function obtains information about one
2154 * of a display device's graphics modes. You can obtain information
2155 * for all of a display device's graphics modes by making a series
2156 * of calls to this function.
2157 * Parameters: LPCTSTR lpszDeviceName specifies the display device
2158 * DWORD iModeNum specifies the graphics mode
2159 * LPDEVMODE lpDevMode points to structure to receive settings
2160 * Variables :
2161 * Result : If the function succeeds, the return value is TRUE.
2162 * If the function fails, the return value is FALSE.
2163 * Remark :
2164 * Status : UNTESTED STUB
2165 *
2166 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
2167 *****************************************************************************/
2168
2169BOOL WIN32API EnumDisplaySettingsW(LPCSTR lpszDeviceName,
2170 DWORD iModeNum,
2171 LPDEVMODEW lpDevMode)
2172{
2173 dprintf(("USER32:EnumDisplaySettingsW (%s,%08xh,%08x) not implemented.\n",
2174 lpszDeviceName,
2175 iModeNum,
2176 lpDevMode));
2177
2178 return (EnumDisplaySettingsA(lpszDeviceName,
2179 iModeNum,
2180 (LPDEVMODEA)lpDevMode));
2181}
2182
2183
2184/*****************************************************************************
2185 * Name : BOOL WIN32API EnumWindowStationsA
2186 * Purpose : The EnumWindowStations function enumerates all windowstations
2187 * in the system by passing the name of each window station, in
2188 * turn, to an application-defined callback function.
2189 * Parameters:
2190 * Variables : WINSTAENUMPROC lpEnumFunc points to application's callback function
2191 * LPARAM lParam 32-bit value to pass to the callback function
2192 * Result : If the function succeeds, the return value is TRUE.
2193 * If the function fails the return value is FALSE. To get extended
2194 * error information, call GetLastError.
2195 * Remark :
2196 * Status : UNTESTED STUB
2197 *
2198 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
2199 *****************************************************************************/
2200
2201BOOL WIN32API EnumWindowStationsA(WINSTAENUMPROCA lpEnumFunc,
2202 LPARAM lParam)
2203{
2204 dprintf(("USER32:EnumWindowStationsA (%08xh,%08x) not implemented.\n",
2205 lpEnumFunc,
2206 lParam));
2207
2208 return (FALSE);
2209}
2210
2211
2212/*****************************************************************************
2213 * Name : BOOL WIN32API EnumWindowStationsW
2214 * Purpose : The EnumWindowStations function enumerates all windowstations
2215 * in the system by passing the name of each window station, in
2216 * turn, to an application-defined callback function.
2217 * Parameters:
2218 * Variables : WINSTAENUMPROC lpEnumFunc points to application's callback function
2219 * LPARAM lParam 32-bit value to pass to the callback function
2220 * Result : If the function succeeds, the return value is TRUE.
2221 * If the function fails the return value is FALSE. To get extended
2222 * error information, call GetLastError.
2223 * Remark :
2224 * Status : UNTESTED STUB
2225 *
2226 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
2227 *****************************************************************************/
2228
2229BOOL WIN32API EnumWindowStationsW(WINSTAENUMPROCW lpEnumFunc,
2230 LPARAM lParam)
2231{
2232 dprintf(("USER32:EnumWindowStationsW (%08xh,%08x) not implemented.\n",
2233 lpEnumFunc,
2234 lParam));
2235
2236 return (FALSE);
2237}
2238
2239
2240
2241/*****************************************************************************
2242 * Name : BOOL WIN32API GetInputState
2243 * Purpose : The GetInputState function determines whether there are
2244 * mouse-button or keyboard messages in the calling thread's message queue.
2245 * Parameters:
2246 * Variables :
2247 * Result : If the queue contains one or more new mouse-button or keyboard
2248 * messages, the return value is TRUE.
2249 * If the function fails, the return value is FALSE.
2250 * Remark :
2251 * Status : UNTESTED STUB
2252 *
2253 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
2254 *****************************************************************************/
2255
2256BOOL WIN32API GetInputState(VOID)
2257{
2258 dprintf(("USER32:GetInputState () not implemented.\n"));
2259
2260 return (FALSE);
2261}
2262
2263
2264/*****************************************************************************
2265 * Name : UINT WIN32API GetKBCodePage
2266 * Purpose : The GetKBCodePage function is provided for compatibility with
2267 * earlier versions of Windows. In the Win32 application programming
2268 * interface (API) it just calls the GetOEMCP function.
2269 * Parameters:
2270 * Variables :
2271 * Result : If the function succeeds, the return value is an OEM code-page
2272 * identifier, or it is the default identifier if the registry
2273 * value is not readable. For a list of OEM code-page identifiers,
2274 * see GetOEMCP.
2275 * Remark :
2276 * Status : UNTESTED
2277 *
2278 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
2279 *****************************************************************************/
2280
2281UINT WIN32API GetKBCodePage(VOID)
2282{
2283 return (GetOEMCP());
2284}
2285
2286
2287/*****************************************************************************
2288 * Name : BOOL WIN32API GetKeyboardLayoutNameA
2289 * Purpose : The GetKeyboardLayoutName function retrieves the name of the
2290 * active keyboard layout.
2291 * Parameters: LPTSTR pwszKLID address of buffer for layout name
2292 * Variables :
2293 * Result : If the function succeeds, the return value is TRUE.
2294 * If the function fails, the return value is FALSE. 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 *****************************************************************************/
2301
2302// @@@PH Win32 BOOL's are casted to INTs
2303INT WIN32API GetKeyboardLayoutNameA(LPTSTR pwszKLID)
2304{
2305 dprintf(("USER32:GetKeyboardLayoutNameA (%08x) not implemented.",
2306 pwszKLID));
2307
2308 return(FALSE);
2309}
2310
2311
2312/*****************************************************************************
2313 * Name : BOOL WIN32API GetKeyboardLayoutNameW
2314 * Purpose : The GetKeyboardLayoutName function retrieves the name of the
2315 * active keyboard layout.
2316 * Parameters: LPTSTR pwszKLID address of buffer for layout name
2317 * Variables :
2318 * Result : If the function succeeds, the return value is TRUE.
2319 * If the function fails, the return value is FALSE. To get extended
2320 * error information, call GetLastError.
2321 * Remark :
2322 * Status : UNTESTED STUB
2323 *
2324 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
2325 *****************************************************************************/
2326
2327// @@@PH Win32 BOOL's are casted to INTs
2328INT WIN32API GetKeyboardLayoutNameW(LPWSTR pwszKLID)
2329{
2330 dprintf(("USER32:GetKeyboardLayoutNameW (%08x) not implemented.",
2331 pwszKLID));
2332
2333 return(FALSE);
2334}
2335
2336
2337
2338
2339/*****************************************************************************
2340 * Name : HWINSTA WIN32API GetProcessWindowStation
2341 * Purpose : The GetProcessWindowStation function returns a handle of the
2342 * window station associated with the calling process.
2343 * Parameters:
2344 * Variables :
2345 * Result : If the function succeeds, the return value is a handle of the
2346 * window station associated with the calling process.
2347 * If the function fails, the return value is NULL. This can occur
2348 * if the calling process is not an application written for Windows
2349 * NT. To get extended error information, call GetLastError.
2350 * Remark :
2351 * Status : UNTESTED STUB
2352 *
2353 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
2354 *****************************************************************************/
2355
2356HWINSTA WIN32API GetProcessWindowStation(VOID)
2357{
2358 dprintf(("USER32:GetProcessWindowStation () not implemented.\n"));
2359
2360 return (NULL);
2361}
2362
2363
2364
2365/*****************************************************************************
2366 * Name : HDESK WIN32API GetThreadDesktop
2367 * Purpose : The GetThreadDesktop function returns a handle to the desktop
2368 * associated with a specified thread.
2369 * Parameters: DWORD dwThreadId thread identifier
2370 * Variables :
2371 * Result : If the function succeeds, the return value is the handle of the
2372 * desktop associated with the specified thread.
2373 * Remark :
2374 * Status : UNTESTED STUB
2375 *
2376 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
2377 *****************************************************************************/
2378
2379HDESK WIN32API GetThreadDesktop(DWORD dwThreadId)
2380{
2381 dprintf(("USER32:GetThreadDesktop (%u) not implemented.\n",
2382 dwThreadId));
2383
2384 return (NULL);
2385}
2386
2387
2388/*****************************************************************************
2389 * Name : BOOL WIN32API GetUserObjectInformationA
2390 * Purpose : The GetUserObjectInformation function returns information about
2391 * a window station or desktop object.
2392 * Parameters: HANDLE hObj handle of object to get information for
2393 * int nIndex type of information to get
2394 * PVOID pvInfo points to buffer that receives the information
2395 * DWORD nLength size, in bytes, of pvInfo buffer
2396 * LPDWORD lpnLengthNeeded receives required size, in bytes, of pvInfo buffer
2397 * Variables :
2398 * Result : If the function succeeds, the return value is TRUE.
2399 * If the function fails, the return value is FALSE. To get extended
2400 * error information, call GetLastError.
2401 * Remark :
2402 * Status : UNTESTED STUB
2403 *
2404 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
2405 *****************************************************************************/
2406
2407BOOL WIN32API GetUserObjectInformationA(HANDLE hObj,
2408 int nIndex,
2409 PVOID pvInfo,
2410 DWORD nLength,
2411 LPDWORD lpnLengthNeeded)
2412{
2413 dprintf(("USER32:GetUserObjectInformationA (%08xh,%08xh,%08xh,%u,%08x) not implemented.\n",
2414 hObj,
2415 nIndex,
2416 pvInfo,
2417 nLength,
2418 lpnLengthNeeded));
2419
2420 return (FALSE);
2421}
2422
2423
2424/*****************************************************************************
2425 * Name : BOOL WIN32API GetUserObjectInformationW
2426 * Purpose : The GetUserObjectInformation function returns information about
2427 * a window station or desktop object.
2428 * Parameters: HANDLE hObj handle of object to get information for
2429 * int nIndex type of information to get
2430 * PVOID pvInfo points to buffer that receives the information
2431 * DWORD nLength size, in bytes, of pvInfo buffer
2432 * LPDWORD lpnLengthNeeded receives required size, in bytes, of pvInfo buffer
2433 * Variables :
2434 * Result : If the function succeeds, the return value is TRUE.
2435 * If the function fails, the return value is FALSE. To get extended
2436 * error information, call GetLastError.
2437 * Remark :
2438 * Status : UNTESTED STUB
2439 *
2440 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
2441 *****************************************************************************/
2442
2443BOOL WIN32API GetUserObjectInformationW(HANDLE hObj,
2444 int nIndex,
2445 PVOID pvInfo,
2446 DWORD nLength,
2447 LPDWORD lpnLengthNeeded)
2448{
2449 dprintf(("USER32:GetUserObjectInformationW (%08xh,%08xh,%08xh,%u,%08x) not implemented.\n",
2450 hObj,
2451 nIndex,
2452 pvInfo,
2453 nLength,
2454 lpnLengthNeeded));
2455
2456 return (FALSE);
2457}
2458
2459
2460/*****************************************************************************
2461 * Name : BOOL WIN32API GetUserObjectSecurity
2462 * Purpose : The GetUserObjectSecurity function retrieves security information
2463 * for the specified user object.
2464 * Parameters: HANDLE hObj handle of user object
2465 * SECURITY_INFORMATION * pSIRequested address of requested security information
2466 * LPSECURITY_DESCRIPTOR pSID address of security descriptor
2467 * DWORD nLength size of buffer for security descriptor
2468 * LPDWORD lpnLengthNeeded address of required size of buffer
2469 * Variables :
2470 * Result : If the function succeeds, the return value is TRUE.
2471 * If the function fails, the return value is FALSE. To get extended
2472 * error information, call GetLastError.
2473 * Remark :
2474 * Status : UNTESTED STUB
2475 *
2476 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
2477 *****************************************************************************/
2478
2479BOOL WIN32API GetUserObjectSecurity(HANDLE hObj,
2480 SECURITY_INFORMATION * pSIRequested,
2481 LPSECURITY_DESCRIPTOR pSID,
2482 DWORD nLength,
2483 LPDWORD lpnLengthNeeded)
2484{
2485 dprintf(("USER32:GetUserObjectSecurity (%08xh,%08xh,%08xh,%u,%08x) not implemented.\n",
2486 hObj,
2487 pSIRequested,
2488 pSID,
2489 nLength,
2490 lpnLengthNeeded));
2491
2492 return (FALSE);
2493}
2494
2495
2496
2497/*****************************************************************************
2498 * Name : int WIN32API GetWindowRgn
2499 * Purpose : The GetWindowRgn function obtains a copy of the window region of a window.
2500 * Parameters: HWND hWnd handle to window whose window region is to be obtained
2501 * HRGN hRgn handle to region that receives a copy of the window region
2502 * Variables :
2503 * Result : NULLREGION, SIMPLEREGION, COMPLEXREGION, ERROR
2504 * Remark :
2505 * Status : UNTESTED STUB
2506 *
2507 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
2508 *****************************************************************************/
2509
2510int WIN32API GetWindowRgn (HWND hWnd,
2511 HRGN hRgn)
2512{
2513 dprintf(("USER32:GetWindowRgn (%08xh,%08x) not implemented.\n",
2514 hWnd,
2515 hRgn));
2516
2517 return (NULLREGION);
2518}
2519
2520
2521
2522/*****************************************************************************
2523 * Name : HCURSOR WIN32API LoadCursorFromFileA
2524 * Purpose : The LoadCursorFromFile function creates a cursor based on data
2525 * contained in a file. The file is specified by its name or by a
2526 * system cursor identifier. The function returns a handle to the
2527 * newly created cursor. Files containing cursor data may be in
2528 * either cursor (.CUR) or animated cursor (.ANI) format.
2529 * Parameters: LPCTSTR lpFileName pointer to cursor file, or system cursor id
2530 * Variables :
2531 * Result : If the function is successful, the return value is a handle to
2532 * the new cursor.
2533 * If the function fails, the return value is NULL. To get extended
2534 * error information, call GetLastError. GetLastError may return
2535 * the following
2536 * Remark :
2537 * Status : UNTESTED STUB
2538 *
2539 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
2540 *****************************************************************************/
2541
2542HCURSOR WIN32API LoadCursorFromFileA(LPCTSTR lpFileName)
2543{
2544 dprintf(("USER32:LoadCursorFromFileA (%s) not implemented.\n",
2545 lpFileName));
2546
2547 return (NULL);
2548}
2549
2550
2551/*****************************************************************************
2552 * Name : HCURSOR WIN32API LoadCursorFromFileW
2553 * Purpose : The LoadCursorFromFile function creates a cursor based on data
2554 * contained in a file. The file is specified by its name or by a
2555 * system cursor identifier. The function returns a handle to the
2556 * newly created cursor. Files containing cursor data may be in
2557 * either cursor (.CUR) or animated cursor (.ANI) format.
2558 * Parameters: LPCTSTR lpFileName pointer to cursor file, or system cursor id
2559 * Variables :
2560 * Result : If the function is successful, the return value is a handle to
2561 * the new cursor.
2562 * If the function fails, the return value is NULL. To get extended
2563 * error information, call GetLastError. GetLastError may return
2564 * the following
2565 * Remark :
2566 * Status : UNTESTED STUB
2567 *
2568 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
2569 *****************************************************************************/
2570
2571HCURSOR WIN32API LoadCursorFromFileW(LPCWSTR lpFileName)
2572{
2573 dprintf(("USER32:LoadCursorFromFileW (%s) not implemented.\n",
2574 lpFileName));
2575
2576 return (NULL);
2577}
2578
2579
2580/*****************************************************************************
2581 * Name : HLK WIN32API LoadKeyboardLayoutA
2582 * Purpose : The LoadKeyboardLayout function loads a new keyboard layout into
2583 * the system. Several keyboard layouts can be loaded at a time, but
2584 * only one per process is active at a time. Loading multiple keyboard
2585 * layouts makes it possible to rapidly switch between layouts.
2586 * Parameters:
2587 * Variables :
2588 * Result : If the function succeeds, the return value is the handle of the
2589 * keyboard layout.
2590 * If the function fails, the return value is NULL. To get extended
2591 * error information, call GetLastError.
2592 * Remark :
2593 * Status : UNTESTED STUB
2594 *
2595 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
2596 *****************************************************************************/
2597
2598HKL WIN32API LoadKeyboardLayoutA(LPCTSTR pwszKLID,
2599 UINT Flags)
2600{
2601 dprintf(("USER32:LeadKeyboardLayoutA (%s,%u) not implemented.\n",
2602 pwszKLID,
2603 Flags));
2604
2605 return (NULL);
2606}
2607
2608
2609/*****************************************************************************
2610 * Name : HLK WIN32API LoadKeyboardLayoutW
2611 * Purpose : The LoadKeyboardLayout function loads a new keyboard layout into
2612 * the system. Several keyboard layouts can be loaded at a time, but
2613 * only one per process is active at a time. Loading multiple keyboard
2614 * layouts makes it possible to rapidly switch between layouts.
2615 * Parameters:
2616 * Variables :
2617 * Result : If the function succeeds, the return value is the handle of the
2618 * keyboard layout.
2619 * If the function fails, the return value is NULL. To get extended
2620 * error information, call GetLastError.
2621 * Remark :
2622 * Status : UNTESTED STUB
2623 *
2624 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
2625 *****************************************************************************/
2626
2627HKL WIN32API LoadKeyboardLayoutW(LPCWSTR pwszKLID,
2628 UINT Flags)
2629{
2630 dprintf(("USER32:LeadKeyboardLayoutW (%s,%u) not implemented.\n",
2631 pwszKLID,
2632 Flags));
2633
2634 return (NULL);
2635}
2636
2637
2638/*****************************************************************************
2639 * Name : UINT WIN32API MapVirtualKeyExA
2640 * Purpose : The MapVirtualKeyEx function translates (maps) a virtual-key
2641 * code into a scan code or character value, or translates a scan
2642 * code into a virtual-key code. The function translates the codes
2643 * using the input language and physical keyboard layout identified
2644 * by the given keyboard layout handle.
2645 * Parameters:
2646 * Variables :
2647 * Result : The return value is either a scan code, a virtual-key code, or
2648 * a character value, depending on the value of uCode and uMapType.
2649 * If there is no translation, the return value is zero.
2650 * Remark :
2651 * Status : UNTESTED STUB
2652 *
2653 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
2654 *****************************************************************************/
2655
2656UINT WIN32API MapVirtualKeyExA(UINT uCode,
2657 UINT uMapType,
2658 HKL dwhkl)
2659{
2660 dprintf(("USER32:MapVirtualKeyExA (%u,%u,%08x) not implemented.\n",
2661 uCode,
2662 uMapType,
2663 dwhkl));
2664
2665 return (0);
2666}
2667
2668
2669/*****************************************************************************
2670 * Name : UINT WIN32API MapVirtualKeyExW
2671 * Purpose : The MapVirtualKeyEx function translates (maps) a virtual-key
2672 * code into a scan code or character value, or translates a scan
2673 * code into a virtual-key code. The function translates the codes
2674 * using the input language and physical keyboard layout identified
2675 * by the given keyboard layout handle.
2676 * Parameters:
2677 * Variables :
2678 * Result : The return value is either a scan code, a virtual-key code, or
2679 * a character value, depending on the value of uCode and uMapType.
2680 * If there is no translation, the return value is zero.
2681 * Remark :
2682 * Status : UNTESTED STUB
2683
2684 *
2685 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
2686 *****************************************************************************/
2687
2688UINT WIN32API MapVirtualKeyExW(UINT uCode,
2689 UINT uMapType,
2690 HKL dwhkl)
2691{
2692 dprintf(("USER32:MapVirtualKeyExW (%u,%u,%08x) not implemented.\n",
2693 uCode,
2694 uMapType,
2695 dwhkl));
2696
2697 return (0);
2698}
2699
2700/*****************************************************************************
2701 * Name : DWORD WIN32API OemKeyScan
2702 * Purpose : The OemKeyScan function maps OEM ASCII codes 0 through 0x0FF
2703 * into the OEM scan codes and shift states. The function provides
2704 * information that allows a program to send OEM text to another
2705 * program by simulating keyboard input.
2706 * Parameters:
2707 * Variables :
2708 * Result :
2709 * Remark :
2710 * Status : UNTESTED STUB
2711 *
2712 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
2713 *****************************************************************************/
2714
2715DWORD WIN32API OemKeyScan(WORD wOemChar)
2716{
2717 dprintf(("USER32:OemKeyScan (%u) not implemented.\n",
2718 wOemChar));
2719
2720 return (wOemChar);
2721}
2722
2723
2724/*****************************************************************************
2725 * Name : HDESK WIN32API OpenDesktopA
2726 * Purpose : The OpenDesktop function returns a handle to an existing desktop.
2727 * A desktop is a secure object contained within a window station
2728 * object. A desktop has a logical display surface and contains
2729 * windows, menus and hooks.
2730 * Parameters: LPCTSTR lpszDesktopName name of the desktop to open
2731 * DWORD dwFlags flags to control interaction with other applications
2732 * BOOL fInherit specifies whether returned handle is inheritable
2733 * DWORD dwDesiredAccess specifies access of returned handle
2734 * Variables :
2735 * Result : If the function succeeds, the return value is the handle to the
2736 * opened desktop.
2737 * If the function fails, the return value is NULL. To get extended
2738 * error information, call GetLastError.
2739 * Remark :
2740 * Status : UNTESTED STUB
2741 *
2742 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
2743 *****************************************************************************/
2744
2745HDESK WIN32API OpenDesktopA(LPCTSTR lpszDesktopName,
2746 DWORD dwFlags,
2747 BOOL fInherit,
2748 DWORD dwDesiredAccess)
2749{
2750 dprintf(("USER32:OpenDesktopA (%s,%08xh,%08xh,%08x) not implemented.\n",
2751 lpszDesktopName,
2752 dwFlags,
2753 fInherit,
2754 dwDesiredAccess));
2755
2756 return (NULL);
2757}
2758
2759
2760/*****************************************************************************
2761 * Name : HDESK WIN32API OpenDesktopW
2762 * Purpose : The OpenDesktop function returns a handle to an existing desktop.
2763 * A desktop is a secure object contained within a window station
2764 * object. A desktop has a logical display surface and contains
2765 * windows, menus and hooks.
2766 * Parameters: LPCTSTR lpszDesktopName name of the desktop to open
2767 * DWORD dwFlags flags to control interaction with other applications
2768 * BOOL fInherit specifies whether returned handle is inheritable
2769 * DWORD dwDesiredAccess specifies access of returned handle
2770 * Variables :
2771 * Result : If the function succeeds, the return value is the handle to the
2772 * opened desktop.
2773 * If the function fails, the return value is NULL. To get extended
2774 * error information, call GetLastError.
2775 * Remark :
2776 * Status : UNTESTED STUB
2777 *
2778 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
2779 *****************************************************************************/
2780
2781HDESK WIN32API OpenDesktopW(LPCTSTR lpszDesktopName,
2782 DWORD dwFlags,
2783 BOOL fInherit,
2784 DWORD dwDesiredAccess)
2785{
2786 dprintf(("USER32:OpenDesktopW (%s,%08xh,%08xh,%08x) not implemented.\n",
2787 lpszDesktopName,
2788 dwFlags,
2789 fInherit,
2790 dwDesiredAccess));
2791
2792 return (NULL);
2793}
2794
2795
2796/*****************************************************************************
2797 * Name : HDESK WIN32API OpenInputDesktop
2798 * Purpose : The OpenInputDesktop function returns a handle to the desktop
2799 * that receives user input. The input desktop is a desktop on the
2800 * window station associated with the logged-on user.
2801 * Parameters: DWORD dwFlags flags to control interaction with other applications
2802 * BOOL fInherit specifies whether returned handle is inheritable
2803 * DWORD dwDesiredAccess specifies access of returned handle
2804 * Variables :
2805 * Result : If the function succeeds, the return value is a handle of the
2806 * desktop that receives user input.
2807 * If the function fails, the return value is NULL. To get extended
2808 * error information, call GetLastError.
2809 * Remark :
2810 * Status : UNTESTED STUB
2811 *
2812 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
2813 *****************************************************************************/
2814
2815HDESK WIN32API OpenInputDesktop(DWORD dwFlags,
2816 BOOL fInherit,
2817 DWORD dwDesiredAccess)
2818{
2819 dprintf(("USER32:OpenInputDesktop (%08xh,%08xh,%08x) not implemented.\n",
2820 dwFlags,
2821 fInherit,
2822 dwDesiredAccess));
2823
2824 return (NULL);
2825}
2826
2827
2828/*****************************************************************************
2829 * Name : HWINSTA WIN32API OpenWindowStationA
2830 * Purpose : The OpenWindowStation function returns a handle to an existing
2831 * window station.
2832 * Parameters: LPCTSTR lpszWinStaName name of the window station to open
2833 * BOOL fInherit specifies whether returned handle is inheritable
2834 * DWORD dwDesiredAccess specifies access of returned handle
2835 * Variables :
2836 * Result : If the function succeeds, the return value is the handle to the
2837 * specified window station.
2838 * If the function fails, the return value is NULL. To get extended
2839 * error information, call GetLastError.
2840 * Remark :
2841 * Status : UNTESTED STUB
2842 *
2843 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
2844 *****************************************************************************/
2845
2846HWINSTA WIN32API OpenWindowStationA(LPCTSTR lpszWinStaName,
2847 BOOL fInherit,
2848 DWORD dwDesiredAccess)
2849{
2850 dprintf(("USER32:OpenWindowStatieonA (%s,%08xh,%08x) not implemented.\n",
2851 lpszWinStaName,
2852 fInherit,
2853 dwDesiredAccess));
2854
2855 return (NULL);
2856}
2857
2858
2859/*****************************************************************************
2860 * Name : HWINSTA WIN32API OpenWindowStationW
2861 * Purpose : The OpenWindowStation function returns a handle to an existing
2862 * window station.
2863 * Parameters: LPCTSTR lpszWinStaName name of the window station to open
2864 * BOOL fInherit specifies whether returned handle is inheritable
2865 * DWORD dwDesiredAccess specifies access of returned handle
2866 * Variables :
2867 * Result : If the function succeeds, the return value is the handle to the
2868 * specified window station.
2869 * If the function fails, the return value is NULL. To get extended
2870 * error information, call GetLastError.
2871
2872
2873 * Remark :
2874 * Status : UNTESTED STUB
2875 *
2876 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
2877 *****************************************************************************/
2878
2879HWINSTA WIN32API OpenWindowStationW(LPCTSTR lpszWinStaName,
2880 BOOL fInherit,
2881 DWORD dwDesiredAccess)
2882{
2883 dprintf(("USER32:OpenWindowStatieonW (%s,%08xh,%08x) not implemented.\n",
2884 lpszWinStaName,
2885 fInherit,
2886 dwDesiredAccess));
2887
2888 return (NULL);
2889}
2890
2891
2892/*****************************************************************************
2893 * Name : BOOL WIN32API PaintDesktop
2894 * Purpose : The PaintDesktop function fills the clipping region in the
2895 * specified device context with the desktop pattern or wallpaper.
2896 * The function is provided primarily for shell desktops.
2897 * Parameters:
2898 * Variables :
2899 * Result : If the function succeeds, the return value is TRUE.
2900 * If the function fails, the return value is FALSE.
2901 * Remark :
2902 * Status : UNTESTED STUB
2903 *
2904 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
2905 *****************************************************************************/
2906
2907BOOL WIN32API PaintDesktop(HDC hdc)
2908{
2909 dprintf(("USER32:PaintDesktop (%08x) not implemented.\n",
2910 hdc));
2911
2912 return (FALSE);
2913}
2914
2915
2916
2917/*****************************************************************************
2918 * Name : VOID WIN32API SetDebugErrorLevel
2919 * Purpose : The SetDebugErrorLevel function sets the minimum error level at
2920 * which Windows will generate debugging events and pass them to a debugger.
2921 * Parameters: DWORD dwLevel debugging error level
2922 * Variables :
2923 * Result :
2924 * Remark :
2925 * Status : UNTESTED STUB
2926 *
2927 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
2928 *****************************************************************************/
2929
2930VOID WIN32API SetDebugErrorLevel(DWORD dwLevel)
2931{
2932 dprintf(("USER32:SetDebugErrorLevel (%08x) not implemented.\n",
2933 dwLevel));
2934}
2935
2936
2937/*****************************************************************************
2938 * Name : BOOL WIN32API SetProcessWindowStation
2939 * Purpose : The SetProcessWindowStation function assigns a window station
2940 * to the calling process. This enables the process to access
2941 * objects in the window station such as desktops, the clipboard,
2942 * and global atoms. All subsequent operations on the window station
2943 * use the access rights granted to hWinSta.
2944 * Parameters:
2945 * Variables :
2946 * Result : If the function succeeds, the return value is TRUE.
2947 * If the function fails, the return value is FALSE. To get extended
2948 * error information, call GetLastError.
2949 * Remark :
2950 * Status : UNTESTED STUB
2951 *
2952 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
2953 *****************************************************************************/
2954
2955BOOL WIN32API SetProcessWindowStation(HWINSTA hWinSta)
2956{
2957 dprintf(("USER32:SetProcessWindowStation (%08x) not implemented.\n",
2958 hWinSta));
2959
2960 return (FALSE);
2961}
2962
2963
2964/*****************************************************************************
2965 * Name : BOOL WIN32API SetSystemCursor
2966 * Purpose : The SetSystemCursor function replaces the contents of the system
2967 * cursor specified by dwCursorId with the contents of the cursor
2968 * specified by hCursor, and then destroys hCursor. This function
2969 * lets an application customize the system cursors.
2970 * Parameters: HCURSOR hCursor set specified system cursor to this cursor's
2971 * contents, then destroy this
2972 * DWORD dwCursorID system cursor specified by its identifier
2973 * Variables :
2974 * Result : If the function succeeds, the return value is TRUE.
2975 * If the function fails, the return value is FALSE. To get extended
2976 * error information, call GetLastError.
2977 * Remark :
2978 * Status : UNTESTED STUB
2979 *
2980 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
2981 *****************************************************************************/
2982
2983BOOL WIN32API SetSystemCursor(HCURSOR hCursor,
2984 DWORD dwCursorId)
2985{
2986 dprintf(("USER32:SetSystemCursor (%08xh,%08x) not implemented.\n",
2987 hCursor,
2988 dwCursorId));
2989
2990 return (FALSE);
2991}
2992
2993
2994/*****************************************************************************
2995 * Name : BOOL WIN32API SetThreadDesktop
2996 * Purpose : The SetThreadDesktop function assigns a desktop to the calling
2997 * thread. All subsequent operations on the desktop use the access
2998 * rights granted to hDesk.
2999 * Parameters: HDESK hDesk handle of the desktop to assign to this thread
3000 * Variables :
3001 * Result : If the function succeeds, the return value is TRUE.
3002 * If the function fails, the return value is FALSE. To get extended
3003 * error information, call GetLastError.
3004 * Remark :
3005 * Status : UNTESTED STUB
3006 *
3007 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
3008 *****************************************************************************/
3009
3010BOOL WIN32API SetThreadDesktop(HDESK hDesktop)
3011{
3012 dprintf(("USER32:SetThreadDesktop (%08x) not implemented.\n",
3013 hDesktop));
3014
3015 return (FALSE);
3016}
3017
3018
3019/*****************************************************************************
3020 * Name : BOOL WIN32API SetUserObjectInformationA
3021 * Purpose : The SetUserObjectInformation function sets information about a
3022 * window station or desktop object.
3023 * Parameters: HANDLE hObject handle of the object for which to set information
3024 * int nIndex type of information to set
3025 * PVOID lpvInfo points to a buffer that contains the information
3026 * DWORD cbInfo size, in bytes, of lpvInfo buffer
3027 * Variables :
3028 * Result : If the function succeeds, the return value is TRUE.
3029 * If the function fails the return value is FALSE. To get extended
3030 * error information, call GetLastError.
3031 * Remark :
3032 * Status : UNTESTED STUB
3033 *
3034 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
3035 *****************************************************************************/
3036
3037BOOL WIN32API SetUserObjectInformationA(HANDLE hObject,
3038 int nIndex,
3039 PVOID lpvInfo,
3040 DWORD cbInfo)
3041{
3042 dprintf(("USER32:SetUserObjectInformationA (%08xh,%u,%08xh,%08x) not implemented.\n",
3043 hObject,
3044 nIndex,
3045 lpvInfo,
3046 cbInfo));
3047
3048 return (FALSE);
3049}
3050
3051
3052/*****************************************************************************
3053 * Name : BOOL WIN32API SetUserObjectInformationW
3054 * Purpose : The SetUserObjectInformation function sets information about a
3055 * window station or desktop object.
3056 * Parameters: HANDLE hObject handle of the object for which to set information
3057 * int nIndex type of information to set
3058 * PVOID lpvInfo points to a buffer that contains the information
3059 * DWORD cbInfo size, in bytes, of lpvInfo buffer
3060 * Variables :
3061 * Result : If the function succeeds, the return value is TRUE.
3062 * If the function fails the return value is FALSE. To get extended
3063 * error information, call GetLastError.
3064 * Remark :
3065 * Status : UNTESTED STUB
3066 *
3067 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
3068 *****************************************************************************/
3069
3070BOOL WIN32API SetUserObjectInformationW(HANDLE hObject,
3071 int nIndex,
3072 PVOID lpvInfo,
3073 DWORD cbInfo)
3074{
3075 dprintf(("USER32:SetUserObjectInformationW (%08xh,%u,%08xh,%08x) not implemented.\n",
3076 hObject,
3077 nIndex,
3078 lpvInfo,
3079 cbInfo));
3080
3081 return (FALSE);
3082}
3083
3084
3085/*****************************************************************************
3086 * Name : BOOL WIN32API SetUserObjectSecurity
3087 * Purpose : The SetUserObjectSecurity function sets the security of a user
3088 * object. This can be, for example, a window or a DDE conversation
3089 * Parameters: HANDLE hObject handle of user object
3090 * SECURITY_INFORMATION * psi address of security information
3091 * LPSECURITY_DESCRIPTOR psd address of security descriptor
3092 * Variables :
3093 * Result : If the function succeeds, the return value is TRUE.
3094 * If the function fails, the return value is FALSE. To get extended
3095 * error information, call GetLastError.
3096 * Remark :
3097 * Status : UNTESTED STUB
3098 *
3099 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
3100 *****************************************************************************/
3101
3102BOOL WIN32API SetUserObjectSecurity(HANDLE hObject,
3103 SECURITY_INFORMATION * psi,
3104 LPSECURITY_DESCRIPTOR psd)
3105{
3106 dprintf(("USER32:SetUserObjectSecuroty (%08xh,%08xh,%08x) not implemented.\n",
3107 hObject,
3108 psi,
3109 psd));
3110
3111 return (FALSE);
3112}
3113
3114
3115/*****************************************************************************
3116 * Name : int WIN32API SetWindowRgn
3117 * Purpose : The SetWindowRgn function sets the window region of a window. The
3118 * window region determines the area within the window where the
3119 * operating system permits drawing. The operating system does not
3120 * display any portion of a window that lies outside of the window region
3121 * Parameters: HWND hWnd handle to window whose window region is to be set
3122 * HRGN hRgn handle to region
3123 * BOOL bRedraw window redraw flag
3124 * Variables :
3125 * Result : If the function succeeds, the return value is non-zero.
3126 * If the function fails, the return value is zero.
3127 * Remark :
3128 * Status : UNTESTED STUB
3129 *
3130 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
3131 *****************************************************************************/
3132
3133int WIN32API SetWindowRgn(HWND hWnd,
3134 HRGN hRgn,
3135 BOOL bRedraw)
3136{
3137 dprintf(("USER32:SetWindowRgn (%08xh,%08xh,%u) not implemented.\n",
3138 hWnd,
3139 hRgn,
3140 bRedraw));
3141
3142 return (0);
3143}
3144
3145
3146/*****************************************************************************
3147 * Name : BOOL WIN32API SetWindowsHookW
3148 * Purpose : The SetWindowsHook function is not implemented in the Win32 API.
3149 * Win32-based applications should use the SetWindowsHookEx function.
3150 * Parameters:
3151 * Variables :
3152 * Result :
3153 * Remark : ARGH ! MICROSOFT !
3154 * Status : UNTESTED STUB
3155 *
3156 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
3157 *****************************************************************************/
3158
3159HHOOK WIN32API SetWindowsHookW(int nFilterType, HOOKPROC pfnFilterProc)
3160
3161{
3162 return (FALSE);
3163}
3164
3165
3166/*****************************************************************************
3167 * Name : BOOL WIN32API ShowWindowAsync
3168 * Purpose : The ShowWindowAsync function sets the show state of a window
3169 * created by a different thread.
3170 * Parameters: HWND hwnd handle of window
3171 * int nCmdShow show state of window
3172 * Variables :
3173 * Result : If the window was previously visible, the return value is TRUE.
3174 * If the window was previously hidden, the return value is FALSE.
3175 * Remark :
3176 * Status : UNTESTED STUB
3177 *
3178 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
3179 *****************************************************************************/
3180
3181BOOL WIN32API ShowWindowAsync (HWND hWnd,
3182 int nCmdShow)
3183{
3184 dprintf(("USER32:ShowWindowAsync (%08xh,%08x) not implemented.\n",
3185 hWnd,
3186 nCmdShow));
3187
3188 return (FALSE);
3189}
3190
3191
3192/*****************************************************************************
3193 * Name : BOOL WIN32API SwitchDesktop
3194 * Purpose : The SwitchDesktop function makes a desktop visible and activates
3195 * it. This enables the desktop to receive input from the user. The
3196 * calling process must have DESKTOP_SWITCHDESKTOP access to the
3197 * desktop for the SwitchDesktop function to succeed.
3198 * Parameters:
3199 * Variables :
3200 * Result : If the function succeeds, the return value is TRUE.
3201 * If the function fails, the return value is FALSE. To get extended
3202 * error information, call GetLastError.
3203 * Remark :
3204 * Status : UNTESTED STUB
3205 *
3206 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
3207 *****************************************************************************/
3208
3209BOOL WIN32API SwitchDesktop(HDESK hDesktop)
3210{
3211 dprintf(("USER32:SwitchDesktop (%08x) not implemented.\n",
3212 hDesktop));
3213
3214 return (FALSE);
3215}
3216
3217
3218/*****************************************************************************
3219 * Name : WORD WIN32API TileWindows
3220 * Purpose : The TileWindows function tiles the specified windows, or the child
3221 * windows of the specified parent window.
3222 * Parameters: HWND hwndParent handle of parent window
3223 * WORD wFlags types of windows not to arrange
3224 * LPCRECT lpRect rectangle to arrange windows in
3225 * WORD cChildrenb number of windows to arrange
3226 * const HWND *ahwndChildren array of window handles
3227 * Variables :
3228 * Result : If the function succeeds, the return value is the number of
3229 * windows arranged.
3230 * If the function fails, the return value is zero.
3231 * Remark :
3232 * Status : UNTESTED STUB
3233 *
3234 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
3235 *****************************************************************************/
3236
3237WORD WIN32API TileWindows(HWND hwndParent,
3238 UINT wFlags,
3239 const LPRECT lpRect,
3240 UINT cChildrenb,
3241 const HWND *ahwndChildren)
3242{
3243 dprintf(("USER32:TileWindows (%08xh,%08xh,%08xh,%08xh,%08x) not implemented.\n",
3244 hwndParent,
3245 wFlags,
3246 lpRect,
3247 cChildrenb,
3248 ahwndChildren));
3249
3250 return (0);
3251}
3252
3253
3254/*****************************************************************************
3255 * Name : int WIN32API ToAscii
3256 * Purpose : The ToAscii function translates the specified virtual-key code
3257 * and keyboard state to the corresponding Windows character or characters.
3258 * Parameters: UINT uVirtKey virtual-key code
3259 * UINT uScanCode scan code
3260 * PBYTE lpbKeyState address of key-state array
3261 * LPWORD lpwTransKey buffer for translated key
3262 * UINT fuState active-menu flag
3263 * Variables :
3264 * Result : 0 The specified virtual key has no translation for the current
3265 * state of the keyboard.
3266 * 1 One Windows character was copied to the buffer.
3267 * 2 Two characters were copied to the buffer. This usually happens
3268 * when a dead-key character (accent or diacritic) stored in the
3269 * keyboard layout cannot be composed with the specified virtual
3270 * key to form a single character.
3271 * Remark :
3272 * Status : UNTESTED STUB
3273 *
3274 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
3275 *****************************************************************************/
3276
3277int WIN32API ToAscii(UINT uVirtKey,
3278 UINT uScanCode,
3279 PBYTE lpbKeyState,
3280 LPWORD lpwTransKey,
3281 UINT fuState)
3282{
3283 dprintf(("USER32:ToAscii (%u,%u,%08xh,%08xh,%u) not implemented.\n",
3284 uVirtKey,
3285 uScanCode,
3286 lpbKeyState,
3287 lpwTransKey,
3288 fuState));
3289
3290 return (0);
3291}
3292
3293
3294/*****************************************************************************
3295 * Name : int WIN32API ToAsciiEx
3296 * Purpose : The ToAscii function translates the specified virtual-key code
3297 * and keyboard state to the corresponding Windows character or characters.
3298 * Parameters: UINT uVirtKey virtual-key code
3299 * UINT uScanCode scan code
3300 * PBYTE lpbKeyState address of key-state array
3301 * LPWORD lpwTransKey buffer for translated key
3302 * UINT fuState active-menu flag
3303 * HLK hlk keyboard layout handle
3304 * Variables :
3305 * Result : 0 The specified virtual key has no translation for the current
3306 * state of the keyboard.
3307 * 1 One Windows character was copied to the buffer.
3308 * 2 Two characters were copied to the buffer. This usually happens
3309 * when a dead-key character (accent or diacritic) stored in the
3310 * keyboard layout cannot be composed with the specified virtual
3311 * key to form a single character.
3312 * Remark :
3313 * Status : UNTESTED STUB
3314 *
3315 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
3316 *****************************************************************************/
3317
3318int WIN32API ToAsciiEx(UINT uVirtKey,
3319 UINT uScanCode,
3320 PBYTE lpbKeyState,
3321 LPWORD lpwTransKey,
3322 UINT fuState,
3323 HKL hkl)
3324{
3325 dprintf(("USER32:ToAsciiEx (%u,%u,%08xh,%08xh,%u,%08x) not implemented.\n",
3326 uVirtKey,
3327 uScanCode,
3328 lpbKeyState,
3329 lpwTransKey,
3330 fuState,
3331 hkl));
3332
3333 return (0);
3334}
3335
3336
3337/*****************************************************************************
3338 * Name : int WIN32API ToUnicode
3339 * Purpose : The ToUnicode function translates the specified virtual-key code
3340 * and keyboard state to the corresponding Unicode character or characters.
3341 * Parameters: UINT wVirtKey virtual-key code
3342 * UINT wScanCode scan code
3343 * PBYTE lpKeyState address of key-state array
3344 * LPWSTR pwszBuff buffer for translated key
3345 * int cchBuff size of translated key buffer
3346 * UINT wFlags set of function-conditioning flags
3347 * Variables :
3348 * Result : - 1 The specified virtual key is a dead-key character (accent or
3349 * diacritic). This value is returned regardless of the keyboard
3350 * layout, even if several characters have been typed and are
3351 * stored in the keyboard state. If possible, even with Unicode
3352 * keyboard layouts, the function has written a spacing version of
3353 * the dead-key character to the buffer specified by pwszBuffer.
3354 * For example, the function writes the character SPACING ACUTE
3355 * (0x00B4), rather than the character NON_SPACING ACUTE (0x0301).
3356 * 0 The specified virtual key has no translation for the current
3357 * state of the keyboard. Nothing was written to the buffer
3358 * specified by pwszBuffer.
3359 * 1 One character was written to the buffer specified by pwszBuffer.
3360 * 2 or more Two or more characters were written to the buffer specified by
3361 * pwszBuff. The most common cause for this is that a dead-key
3362 * character (accent or diacritic) stored in the keyboard layout
3363 * could not be combined with the specified virtual key to form a
3364 * single character.
3365 * Remark :
3366 * Status : UNTESTED STUB
3367 *
3368 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
3369 *****************************************************************************/
3370
3371int WIN32API ToUnicode(UINT uVirtKey,
3372 UINT uScanCode,
3373 PBYTE lpKeyState,
3374 LPWSTR pwszBuff,
3375 int cchBuff,
3376 UINT wFlags)
3377{
3378 dprintf(("USER32:ToUnicode (%u,%u,%08xh,%08xh,%u,%08x) not implemented.\n",
3379 uVirtKey,
3380 uScanCode,
3381 lpKeyState,
3382 pwszBuff,
3383 cchBuff,
3384 wFlags));
3385
3386 return (0);
3387}
3388
3389
3390/*****************************************************************************
3391 * Name : BOOL WIN32API UnloadKeyboardLayout
3392 * Purpose : The UnloadKeyboardLayout function removes a keyboard layout.
3393 * Parameters: HKL hkl handle of keyboard layout
3394 * Variables :
3395 * Result : If the function succeeds, the return value is the handle of the
3396 * keyboard layout; otherwise, it is NULL. To get extended error
3397 * information, use the GetLastError function.
3398 * Remark :
3399 * Status : UNTESTED STUB
3400 *
3401 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
3402 *****************************************************************************/
3403
3404BOOL WIN32API UnloadKeyboardLayout (HKL hkl)
3405{
3406 dprintf(("USER32:UnloadKeyboardLayout (%08x) not implemented.\n",
3407 hkl));
3408
3409 return (0);
3410}
3411
3412
3413/*****************************************************************************
3414 * Name : SHORT WIN32API VkKeyScanExW
3415 * Purpose : The VkKeyScanEx function translates a character to the
3416 * corresponding virtual-key code and shift state. The function
3417 * translates the character using the input language and physical
3418 * keyboard layout identified by the given keyboard layout handle.
3419 * Parameters: UINT uChar character to translate
3420 * HKL hkl keyboard layout handle
3421 * Variables :
3422 * Result : see docs
3423 * Remark :
3424 * Status : UNTESTED STUB
3425 *
3426 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
3427 *****************************************************************************/
3428
3429WORD WIN32API VkKeyScanExW(WCHAR uChar,
3430 HKL hkl)
3431{
3432 dprintf(("USER32:VkKeyScanExW (%u,%08x) not implemented.\n",
3433 uChar,
3434 hkl));
3435
3436 return (uChar);
3437}
3438
3439
3440/*****************************************************************************
3441 * Name : SHORT WIN32API VkKeyScanExA
3442 * Purpose : The VkKeyScanEx function translates a character to the
3443 * corresponding virtual-key code and shift state. The function
3444 * translates the character using the input language and physical
3445 * keyboard layout identified by the given keyboard layout handle.
3446 * Parameters: UINT uChar character to translate
3447 * HKL hkl keyboard layout handle
3448 * Variables :
3449 * Result : see docs
3450 * Remark :
3451 * Status : UNTESTED STUB
3452 *
3453 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
3454 *****************************************************************************/
3455
3456WORD WIN32API VkKeyScanExA(CHAR uChar,
3457 HKL hkl)
3458{
3459 dprintf(("USER32:VkKeyScanExA (%u,%08x) not implemented.\n",
3460 uChar,
3461 hkl));
3462
3463 return (uChar);
3464}
3465
3466
3467/*****************************************************************************
3468 * Name : VOID WIN32API keybd_event
3469 * Purpose : The keybd_event function synthesizes a keystroke. The system
3470 * can use such a synthesized keystroke to generate a WM_KEYUP or
3471 * WM_KEYDOWN message. The keyboard driver's interrupt handler calls
3472 * the keybd_event function.
3473 * Parameters: BYTE bVk virtual-key code
3474
3475 * BYTE bScan hardware scan code
3476 * DWORD dwFlags flags specifying various function options
3477 * DWORD dwExtraInfo additional data associated with keystroke
3478 * Variables :
3479 * Result :
3480 * Remark :
3481 * Status : UNTESTED STUB
3482 *
3483 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
3484 *****************************************************************************/
3485
3486VOID WIN32API keybd_event (BYTE bVk,
3487 BYTE bScan,
3488 DWORD dwFlags,
3489 DWORD dwExtraInfo)
3490{
3491 dprintf(("USER32:keybd_event (%u,%u,%08xh,%08x) not implemented.\n",
3492 bVk,
3493 bScan,
3494 dwFlags,
3495 dwExtraInfo));
3496}
3497
3498
3499/*****************************************************************************
3500 * Name : VOID WIN32API mouse_event
3501 * Purpose : The mouse_event function synthesizes mouse motion and button clicks.
3502 * Parameters: DWORD dwFlags flags specifying various motion/click variants
3503 * DWORD dx horizontal mouse position or position change
3504 * DWORD dy vertical mouse position or position change
3505 * DWORD cButtons unused, reserved for future use, set to zero
3506 * DWORD dwExtraInfo 32 bits of application-defined information
3507 * Variables :
3508 * Result :
3509 * Remark :
3510 * Status : UNTESTED STUB
3511 *
3512 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
3513 *****************************************************************************/
3514
3515VOID WIN32API mouse_event(DWORD dwFlags,
3516 DWORD dx,
3517 DWORD dy,
3518 DWORD cButtons,
3519 DWORD dwExtraInfo)
3520{
3521 dprintf(("USER32:mouse_event (%08xh,%u,%u,%u,%08x) not implemented.\n",
3522 dwFlags,
3523 dx,
3524 dy,
3525 cButtons,
3526 dwExtraInfo));
3527}
3528
3529
3530/*****************************************************************************
3531 * Name : BOOL WIN32API SetShellWindow
3532 * Purpose : Unknown
3533 * Parameters: Unknown
3534 * Variables :
3535 * Result :
3536 * Remark :
3537 * Status : UNTESTED UNKNOWN STUB
3538 *
3539 * Author : Patrick Haller [Wed, 1998/06/16 11:55]
3540 *****************************************************************************/
3541
3542BOOL WIN32API SetShellWindow(DWORD x1)
3543{
3544 dprintf(("USER32: SetShellWindow(%08x) not implemented.\n",
3545 x1));
3546
3547 return (FALSE); /* default */
3548}
3549
3550
3551/*****************************************************************************
3552 * Name : BOOL WIN32API PlaySoundEvent
3553 * Purpose : Unknown
3554 * Parameters: Unknown
3555 * Variables :
3556 * Result :
3557 * Remark :
3558 * Status : UNTESTED UNKNOWN STUB
3559 *
3560 * Author : Patrick Haller [Wed, 1998/06/16 11:55]
3561 *****************************************************************************/
3562
3563BOOL WIN32API PlaySoundEvent(DWORD x1)
3564{
3565 dprintf(("USER32: PlaySoundEvent(%08x) not implemented.\n",
3566 x1));
3567
3568 return (FALSE); /* default */
3569}
3570
3571
3572/*****************************************************************************
3573 * Name : BOOL WIN32API TileChildWindows
3574 * Purpose : Unknown
3575 * Parameters: Unknown
3576 * Variables :
3577 * Result :
3578 * Remark :
3579 * Status : UNTESTED UNKNOWN STUB
3580 *
3581 * Author : Patrick Haller [Wed, 1998/06/16 11:55]
3582 *****************************************************************************/
3583
3584BOOL WIN32API TileChildWindows(DWORD x1,
3585 DWORD x2)
3586{
3587 dprintf(("USER32: TileChildWindows(%08xh,%08xh) not implemented.\n",
3588 x1,
3589 x2));
3590
3591 return (FALSE); /* default */
3592}
3593
3594
3595/*****************************************************************************
3596 * Name : BOOL WIN32API SetSysColorsTemp
3597 * Purpose : Unknown
3598 * Parameters: Unknown
3599 * Variables :
3600 * Result :
3601 * Remark :
3602 * Status : UNTESTED UNKNOWN STUB
3603 *
3604 * Author : Patrick Haller [Wed, 1998/06/16 11:55]
3605 *****************************************************************************/
3606
3607BOOL WIN32API SetSysColorsTemp(void)
3608{
3609 dprintf(("USER32: SetSysColorsTemp() not implemented.\n"));
3610
3611 return (FALSE); /* default */
3612}
3613
3614
3615/*****************************************************************************
3616 * Name : BOOL WIN32API RegisterNetworkCapabilities
3617 * Purpose : Unknown
3618 * Parameters: Unknown
3619 * Variables :
3620 * Result :
3621 * Remark :
3622 * Status : UNTESTED UNKNOWN STUB
3623 *
3624 * Author : Patrick Haller [Wed, 1998/06/16 11:55]
3625 *****************************************************************************/
3626
3627BOOL WIN32API RegisterNetworkCapabilities(DWORD x1,
3628 DWORD x2)
3629{
3630 dprintf(("USER32: RegisterNetworkCapabilities(%08xh,%08xh) not implemented.\n",
3631 x1,
3632 x2));
3633
3634 return (FALSE); /* default */
3635}
3636
3637
3638/*****************************************************************************
3639 * Name : BOOL WIN32API EndTask
3640 * Purpose : Unknown
3641 * Parameters: Unknown
3642 * Variables :
3643 * Result :
3644 * Remark :
3645 * Status : UNTESTED UNKNOWN STUB
3646 *
3647 * Author : Patrick Haller [Wed, 1998/06/16 11:55]
3648 *****************************************************************************/
3649
3650BOOL WIN32API EndTask(DWORD x1,
3651 DWORD x2,
3652 DWORD x3)
3653{
3654 dprintf(("USER32: EndTask(%08xh,%08xh,%08xh) not implemented.\n",
3655 x1,
3656 x2,
3657 x3));
3658
3659 return (FALSE); /* default */
3660}
3661
3662
3663
3664/*****************************************************************************
3665 * Name : BOOL WIN32API GetNextQueueWindow
3666 * Purpose : Unknown
3667 * Parameters: Unknown
3668 * Variables :
3669 * Result :
3670 * Remark :
3671 * Status : UNTESTED UNKNOWN STUB
3672 *
3673 * Author : Patrick Haller [Wed, 1998/06/16 11:55]
3674 *****************************************************************************/
3675
3676BOOL WIN32API GetNextQueueWindow(DWORD x1,
3677 DWORD x2)
3678{
3679 dprintf(("USER32: GetNextQueueWindow(%08xh,%08xh) not implemented.\n",
3680 x1,
3681 x2));
3682
3683 return (FALSE); /* default */
3684}
3685
3686
3687/*****************************************************************************
3688 * Name : BOOL WIN32API YieldTask
3689 * Purpose : Unknown
3690 * Parameters: Unknown
3691 * Variables :
3692 * Result :
3693 * Remark :
3694 * Status : UNTESTED UNKNOWN STUB
3695 *
3696 * Author : Patrick Haller [Wed, 1998/06/16 11:55]
3697 *****************************************************************************/
3698
3699BOOL WIN32API YieldTask(void)
3700{
3701 dprintf(("USER32: YieldTask() not implemented.\n"));
3702
3703 return (FALSE); /* default */
3704}
3705
3706
3707/*****************************************************************************
3708 * Name : BOOL WIN32API WinOldAppHackoMatic
3709 * Purpose : Unknown
3710 * Parameters: Unknown
3711 * Variables :
3712 * Result :
3713 * Remark :
3714 * Status : UNTESTED UNKNOWN STUB
3715 *
3716 * Author : Patrick Haller [Wed, 1998/06/16 11:55]
3717 *****************************************************************************/
3718
3719BOOL WIN32API WinOldAppHackoMatic(DWORD x1)
3720{
3721 dprintf(("USER32: WinOldAppHackoMatic(%08x) not implemented.\n",
3722 x1));
3723
3724 return (FALSE); /* default */
3725}
3726
3727
3728/*****************************************************************************
3729 * Name : BOOL WIN32API DragObject
3730 * Purpose : Unknown
3731 * Parameters: Unknown
3732 * Variables :
3733 * Result :
3734 * Remark :
3735 * Status : UNTESTED UNKNOWN STUB
3736 *
3737 * Author : Patrick Haller [Wed, 1998/06/16 11:55]
3738 *****************************************************************************/
3739
3740DWORD WIN32API DragObject(HWND x1,HWND x2,UINT x3,DWORD x4,HCURSOR x5)
3741{
3742 dprintf(("USER32: DragObject(%08x,%08xh,%08xh,%08xh,%08xh) not implemented.\n",
3743 x1,
3744 x2,
3745 x3,
3746 x4,
3747 x5));
3748
3749 return (FALSE); /* default */
3750}
3751
3752
3753/*****************************************************************************
3754 * Name : BOOL WIN32API CascadeChildWindows
3755 * Purpose : Unknown
3756 * Parameters: Unknown
3757 * Variables :
3758 * Result :
3759 * Remark :
3760 * Status : UNTESTED UNKNOWN STUB
3761 *
3762 * Author : Patrick Haller [Wed, 1998/06/16 11:55]
3763 *****************************************************************************/
3764
3765BOOL WIN32API CascadeChildWindows(DWORD x1,
3766 DWORD x2)
3767{
3768 dprintf(("USER32: CascadeChildWindows(%08xh,%08xh) not implemented.\n",
3769 x1,
3770 x2));
3771
3772 return (FALSE); /* default */
3773}
3774
3775
3776/*****************************************************************************
3777 * Name : BOOL WIN32API RegisterSystemThread
3778 * Purpose : Unknown
3779 * Parameters: Unknown
3780 * Variables :
3781 * Result :
3782 * Remark :
3783 * Status : UNTESTED UNKNOWN STUB
3784 *
3785 * Author : Patrick Haller [Wed, 1998/06/16 11:55]
3786 *****************************************************************************/
3787
3788BOOL WIN32API RegisterSystemThread(DWORD x1,
3789 DWORD x2)
3790{
3791 dprintf(("USER32: RegisterSystemThread(%08xh,%08xh) not implemented.\n",
3792 x1,
3793 x2));
3794
3795 return (FALSE); /* default */
3796}
3797
3798
3799/*****************************************************************************
3800 * Name : BOOL WIN32API IsHungThread
3801 * Purpose : Unknown
3802 * Parameters: Unknown
3803 * Variables :
3804 * Result :
3805 * Remark :
3806 * Status : UNTESTED UNKNOWN STUB
3807 *
3808 * Author : Patrick Haller [Wed, 1998/06/16 11:55]
3809 *****************************************************************************/
3810
3811BOOL WIN32API IsHungThread(DWORD x1)
3812{
3813 dprintf(("USER32: IsHungThread(%08xh) not implemented.\n",
3814 x1));
3815
3816 return (FALSE); /* default */
3817}
3818
3819
3820
3821/*****************************************************************************
3822 * Name : BOOL WIN32API UserSignalProc
3823 * Purpose : Unknown
3824 * Parameters: Unknown
3825 * Variables :
3826 * Result :
3827 * Remark :
3828 * Status : UNTESTED UNKNOWN STUB
3829 *
3830 * Author : Patrick Haller [Wed, 1998/06/16 11:55]
3831 *****************************************************************************/
3832
3833BOOL WIN32API UserSignalProc(DWORD x1,
3834 DWORD x2,
3835 DWORD x3,
3836 DWORD x4)
3837{
3838 dprintf(("USER32: SysErrorBox(%08xh,%08xh,%08xh,%08xh) not implemented.\n",
3839 x1,
3840 x2,
3841 x3,
3842 x4));
3843
3844 return (FALSE); /* default */
3845}
3846
3847
3848/*****************************************************************************
3849 * Name : BOOL WIN32API GetShellWindow
3850 * Purpose : Unknown
3851 * Parameters: Unknown
3852 * Variables :
3853 * Result :
3854 * Remark :
3855 * Status : UNTESTED UNKNOWN STUB
3856 *
3857 * Author : Patrick Haller [Wed, 1998/06/16 11:55]
3858 *****************************************************************************/
3859
3860HWND WIN32API GetShellWindow(void)
3861{
3862 dprintf(("USER32: GetShellWindow() not implemented.\n"));
3863
3864 return (0); /* default */
3865}
3866
3867
3868
3869/***********************************************************************
3870 * RegisterTasklist32 [USER32.436]
3871 */
3872DWORD WIN32API RegisterTasklist (DWORD x)
3873{
3874 dprintf(("USER32: RegisterTasklist(%08xh) not implemented.\n",
3875 x));
3876
3877 return TRUE;
3878}
3879
3880
Note: See TracBrowser for help on using the repository browser.