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

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

MDI child/client changes

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