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

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

rectangle functions

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