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

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

API Open32 -> PM

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