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

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

* empty log message *

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