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

Last change on this file since 802 was 780, checked in by phaller, 26 years ago

Fix: header file cleanup (win32type.h)

File size: 134.8 KB
Line 
1/* $Id: user32.cpp,v 1.16 1999-09-01 19:12:21 phaller 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;
1194 NONCLIENTMETRICSA *cmetric = (NONCLIENTMETRICSA *)pvParam;
1195
1196 switch(uiAction) {
1197 case SPI_SCREENSAVERRUNNING:
1198 *(BOOL *)pvParam = FALSE;
1199 rc = TRUE;
1200 break;
1201 case SPI_GETDRAGFULLWINDOWS:
1202 *(BOOL *)pvParam = FALSE;
1203 rc = TRUE;
1204 break;
1205 case SPI_GETNONCLIENTMETRICS:
1206 memset(cmetric, 0, sizeof(NONCLIENTMETRICSA));
1207 cmetric->cbSize = sizeof(NONCLIENTMETRICSA);
1208 //CB: font info not valid, needs improvements
1209 O32_SystemParametersInfo(SPI_GETICONTITLELOGFONT, 0, (LPVOID)&(cmetric->lfCaptionFont),0);
1210 O32_SystemParametersInfo(SPI_GETICONTITLELOGFONT, 0, (LPVOID)&(cmetric->lfMenuFont),0);
1211 //CB: experimental change for statusbar (and tooltips)
1212
1213 //O32_SystemParametersInfo(SPI_GETICONTITLELOGFONT, 0, (LPVOID)&(cmetric->lfStatusFont),0);
1214 lstrcpyA(cmetric->lfStatusFont.lfFaceName,"WarpSans");
1215 cmetric->lfStatusFont.lfHeight = 9;
1216
1217 O32_SystemParametersInfo(SPI_GETICONTITLELOGFONT, 0, (LPVOID)&(cmetric->lfMessageFont),0);
1218 cmetric->iBorderWidth = GetSystemMetrics(SM_CXBORDER);
1219 cmetric->iScrollWidth = GetSystemMetrics(SM_CXHSCROLL);
1220 cmetric->iScrollHeight = GetSystemMetrics(SM_CYHSCROLL);
1221 cmetric->iCaptionWidth = 32; //TODO
1222 cmetric->iCaptionHeight = 16; //TODO
1223 cmetric->iSmCaptionWidth = GetSystemMetrics(SM_CXSMSIZE);
1224 cmetric->iSmCaptionHeight = GetSystemMetrics(SM_CYSMSIZE);
1225 cmetric->iMenuWidth = 32; //TODO
1226 cmetric->iMenuHeight = GetSystemMetrics(SM_CYMENU);
1227 rc = TRUE;
1228 break;
1229 case 104: //TODO: Undocumented
1230 rc = 16;
1231 break;
1232 default:
1233 rc = O32_SystemParametersInfo(uiAction, uiParam, pvParam, fWinIni);
1234 break;
1235 }
1236#ifdef DEBUG
1237 WriteLog("USER32: SystemParametersInfoA %d, returned %d\n", uiAction, rc);
1238#endif
1239 return(rc);
1240}
1241//******************************************************************************
1242//TODO: Check for more options that have different structs for Unicode!!!!
1243//******************************************************************************
1244BOOL WIN32API SystemParametersInfoW(UINT uiAction, UINT uiParam, PVOID pvParam, UINT fWinIni)
1245{
1246 BOOL rc;
1247 NONCLIENTMETRICSW *clientMetricsW = (NONCLIENTMETRICSW *)pvParam;
1248 NONCLIENTMETRICSA clientMetricsA = {0};
1249 PVOID pvParamA;
1250 UINT uiParamA;
1251
1252 switch(uiAction) {
1253 case SPI_SETNONCLIENTMETRICS:
1254 clientMetricsA.cbSize = sizeof(NONCLIENTMETRICSA);
1255 clientMetricsA.iBorderWidth = clientMetricsW->iBorderWidth;
1256 clientMetricsA.iScrollWidth = clientMetricsW->iScrollWidth;
1257 clientMetricsA.iScrollHeight = clientMetricsW->iScrollHeight;
1258 clientMetricsA.iCaptionWidth = clientMetricsW->iCaptionWidth;
1259 clientMetricsA.iCaptionHeight = clientMetricsW->iCaptionHeight;
1260 ConvertFontWA(&clientMetricsW->lfCaptionFont, &clientMetricsA.lfCaptionFont);
1261 clientMetricsA.iSmCaptionWidth = clientMetricsW->iSmCaptionWidth;
1262 clientMetricsA.iSmCaptionHeight = clientMetricsW->iSmCaptionHeight;
1263 ConvertFontWA(&clientMetricsW->lfSmCaptionFont, &clientMetricsA.lfSmCaptionFont);
1264 clientMetricsA.iMenuWidth = clientMetricsW->iMenuWidth;
1265 clientMetricsA.iMenuHeight = clientMetricsW->iMenuHeight;
1266 ConvertFontWA(&clientMetricsW->lfMenuFont, &clientMetricsA.lfMenuFont);
1267 ConvertFontWA(&clientMetricsW->lfStatusFont, &clientMetricsA.lfStatusFont);
1268 ConvertFontWA(&clientMetricsW->lfMessageFont, &clientMetricsA.lfMessageFont);
1269 //no break
1270 case SPI_GETNONCLIENTMETRICS:
1271 uiParamA = sizeof(NONCLIENTMETRICSA);
1272 pvParamA = &clientMetricsA;
1273 break;
1274 default:
1275 pvParamA = pvParam;
1276 uiParamA = uiParam;
1277 break;
1278 }
1279 rc = SystemParametersInfoA(uiAction, uiParamA, pvParamA, fWinIni);
1280
1281 switch(uiAction) {
1282 case SPI_GETNONCLIENTMETRICS:
1283 clientMetricsW->cbSize = sizeof(*clientMetricsW);
1284 clientMetricsW->iBorderWidth = clientMetricsA.iBorderWidth;
1285 clientMetricsW->iScrollWidth = clientMetricsA.iScrollWidth;
1286 clientMetricsW->iScrollHeight = clientMetricsA.iScrollHeight;
1287 clientMetricsW->iCaptionWidth = clientMetricsA.iCaptionWidth;
1288 clientMetricsW->iCaptionHeight = clientMetricsA.iCaptionHeight;
1289 ConvertFontAW(&clientMetricsA.lfCaptionFont, &clientMetricsW->lfCaptionFont);
1290
1291 clientMetricsW->iSmCaptionWidth = clientMetricsA.iSmCaptionWidth;
1292 clientMetricsW->iSmCaptionHeight = clientMetricsA.iSmCaptionHeight;
1293 ConvertFontAW(&clientMetricsA.lfSmCaptionFont, &clientMetricsW->lfSmCaptionFont);
1294
1295 clientMetricsW->iMenuWidth = clientMetricsA.iMenuWidth;
1296 clientMetricsW->iMenuHeight = clientMetricsA.iMenuHeight;
1297 ConvertFontAW(&clientMetricsA.lfMenuFont, &clientMetricsW->lfMenuFont);
1298 ConvertFontAW(&clientMetricsA.lfStatusFont, &clientMetricsW->lfStatusFont);
1299 ConvertFontAW(&clientMetricsA.lfMessageFont, &clientMetricsW->lfMessageFont);
1300 break;
1301 }
1302#ifdef DEBUG
1303 WriteLog("USER32: SystemParametersInfoW %d, returned %d\n", uiAction, rc);
1304#endif
1305 return(rc);
1306}
1307//******************************************************************************
1308//******************************************************************************
1309LONG WIN32API TabbedTextOutA( HDC arg1, int arg2, int arg3, LPCSTR arg4, int arg5, int arg6, int * arg7, int arg8)
1310{
1311#ifdef DEBUG
1312 WriteLog("USER32: TabbedTextOutA\n");
1313#endif
1314 return O32_TabbedTextOut(arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8);
1315}
1316//******************************************************************************
1317//******************************************************************************
1318LONG WIN32API TabbedTextOutW( HDC arg1, int arg2, int arg3, LPCWSTR arg4, int arg5, int arg6, int * arg7, int arg8)
1319{
1320 char *astring = UnicodeToAsciiString((LPWSTR)arg4);
1321 LONG rc;
1322
1323#ifdef DEBUG
1324 WriteLog("USER32: TabbedTextOutW\n");
1325#endif
1326 rc = O32_TabbedTextOut(arg1, arg2, arg3, astring, arg5, arg6, arg7, arg8);
1327 FreeAsciiString(astring);
1328 return rc;
1329}
1330//******************************************************************************
1331//******************************************************************************
1332BOOL WIN32API ValidateRect( HWND arg1, const RECT * arg2)
1333{
1334#ifdef DEBUG
1335 WriteLog("USER32: ValidateRect\n");
1336#endif
1337 return O32_ValidateRect(arg1, arg2);
1338}
1339//******************************************************************************
1340//******************************************************************************
1341BOOL WIN32API ValidateRgn( HWND arg1, HRGN arg2)
1342{
1343#ifdef DEBUG
1344 WriteLog("USER32: ValidateRgn\n");
1345#endif
1346 return O32_ValidateRgn(arg1, arg2);
1347}
1348//******************************************************************************
1349//******************************************************************************
1350WORD WIN32API VkKeyScanW( WCHAR arg1)
1351{
1352#ifdef DEBUG
1353 WriteLog("USER32: VkKeyScanW\n");
1354#endif
1355 // NOTE: This will not work as is (needs UNICODE support)
1356 return O32_VkKeyScan((char)arg1);
1357}
1358//******************************************************************************
1359//******************************************************************************
1360BOOL WIN32API WinHelpW( HWND arg1, LPCWSTR arg2, UINT arg3, DWORD arg4)
1361{
1362 char *astring = UnicodeToAsciiString((LPWSTR)arg2);
1363 BOOL rc;
1364
1365#ifdef DEBUG
1366 WriteLog("USER32: WinHelpW\n");
1367#endif
1368 rc = WinHelpA(arg1, astring, arg3, arg4);
1369 FreeAsciiString(astring);
1370 return rc;
1371}
1372//******************************************************************************
1373//******************************************************************************
1374int WIN32API wvsprintfA( LPSTR arg1, LPCSTR arg2, va_list arg3)
1375{
1376#ifdef DEBUG
1377 WriteLog("USER32: wvsprintfA\n");
1378#endif
1379 return O32_wvsprintf(arg1, arg2, (LPCVOID *)arg3);
1380}
1381//******************************************************************************
1382//******************************************************************************
1383int WIN32API wvsprintfW(LPWSTR lpOut, LPCWSTR lpFmt, va_list argptr)
1384{
1385 int rc;
1386 char szOut[256];
1387 char *lpFmtA;
1388
1389 lpFmtA = UnicodeToAsciiString((LPWSTR)lpFmt);
1390#ifdef DEBUG
1391 WriteLog("USER32: wvsprintfW, DOES NOT HANDLE UNICODE STRINGS!\n");
1392 WriteLog("USER32: %s\n", lpFmt);
1393#endif
1394 rc = O32_wvsprintf(szOut, lpFmtA, (LPCVOID)argptr);
1395
1396 AsciiToUnicode(szOut, lpOut);
1397#ifdef DEBUG
1398 WriteLog("USER32: %s\n", lpOut);
1399#endif
1400 FreeAsciiString(lpFmtA);
1401 return(rc);
1402}
1403//******************************************************************************
1404//TODO: Not complete
1405//******************************************************************************
1406BOOL WIN32API GrayStringA(HDC hdc, HBRUSH hBrush, GRAYSTRINGPROC lpOutputFunc,
1407 LPARAM lpData, int nCount, int X, int Y, int nWidth,
1408 int nHeight)
1409{
1410 BOOL rc;
1411 COLORREF curclr;
1412
1413#ifdef DEBUG
1414 WriteLog("USER32: GrayStringA, not completely implemented\n");
1415#endif
1416 if(lpOutputFunc == NULL && lpData == NULL) {
1417#ifdef DEBUG
1418 WriteLog("USER32: lpOutputFunc == NULL && lpData == NULL\n");
1419#endif
1420 return(FALSE);
1421 }
1422 if(lpOutputFunc) {
1423 return(lpOutputFunc(hdc, lpData, nCount));
1424 }
1425 curclr = SetTextColor(hdc, GetSysColor(COLOR_GRAYTEXT));
1426 rc = TextOutA(hdc, X, Y, (char *)lpData, nCount);
1427 SetTextColor(hdc, curclr);
1428
1429 return(rc);
1430}
1431//******************************************************************************
1432//******************************************************************************
1433BOOL WIN32API GrayStringW(HDC hdc, HBRUSH hBrush, GRAYSTRINGPROC lpOutputFunc,
1434 LPARAM lpData, int nCount, int X, int Y, int nWidth,
1435 int nHeight)
1436{
1437 BOOL rc;
1438 char *astring;
1439 COLORREF curclr;
1440
1441#ifdef DEBUG
1442 WriteLog("USER32: GrayStringW, not completely implemented\n");
1443#endif
1444
1445 if(lpOutputFunc == NULL && lpData == NULL) {
1446#ifdef DEBUG
1447 WriteLog("USER32: lpOutputFunc == NULL && lpData == NULL\n");
1448#endif
1449 return(FALSE);
1450 }
1451 if(nCount == 0)
1452 nCount = UniStrlen((UniChar*)lpData);
1453
1454 if(lpOutputFunc) {
1455 return(lpOutputFunc(hdc, lpData, nCount));
1456 }
1457 astring = UnicodeToAsciiString((LPWSTR)lpData);
1458
1459 curclr = SetTextColor(hdc, GetSysColor(COLOR_GRAYTEXT));
1460 rc = TextOutA(hdc, X, Y, astring, nCount);
1461 SetTextColor(hdc, curclr);
1462
1463 FreeAsciiString(astring);
1464 return(rc);
1465}
1466//******************************************************************************
1467//TODO:
1468//******************************************************************************
1469HANDLE WIN32API CopyImage(HANDLE hImage, UINT uType, int cxDesired, int cyDesired, UINT fuFlags)
1470{
1471#ifdef DEBUG
1472 WriteLog("USER32: CopyImage, not implemented\n");
1473#endif
1474 switch(uType) {
1475 case IMAGE_BITMAP:
1476 case IMAGE_CURSOR:
1477 case IMAGE_ICON:
1478 default:
1479#ifdef DEBUG
1480 WriteLog("USER32: CopyImage, unknown type\n");
1481#endif
1482 return(NULL);
1483 }
1484 return(NULL);
1485}
1486//******************************************************************************
1487//******************************************************************************
1488BOOL WIN32API GetKeyboardState(PBYTE lpKeyState)
1489{
1490#ifdef DEBUG
1491 WriteLog("USER32: GetKeyboardState, not properly implemented\n");
1492#endif
1493 memset(lpKeyState, 0, 256);
1494 return(TRUE);
1495}
1496//******************************************************************************
1497//******************************************************************************
1498BOOL WIN32API SetKeyboardState(PBYTE lpKeyState)
1499{
1500#ifdef DEBUG
1501 WriteLog("USER32: SetKeyboardState, not implemented\n");
1502#endif
1503 return(TRUE);
1504}
1505//******************************************************************************
1506//2nd parameter not used according to SDK (yet?)
1507//******************************************************************************
1508VOID WIN32API SetLastErrorEx(DWORD dwErrCode, DWORD dwType)
1509{
1510#ifdef DEBUG
1511 WriteLog("USER32: SetLastErrorEx\n");
1512#endif
1513 SetLastError(dwErrCode);
1514}
1515//******************************************************************************
1516//******************************************************************************
1517BOOL WIN32API ActivateKeyboardLayout(HKL hkl, UINT fuFlags)
1518{
1519#ifdef DEBUG
1520 WriteLog("USER32: ActivateKeyboardLayout, not implemented\n");
1521#endif
1522 return(TRUE);
1523}
1524//******************************************************************************
1525//******************************************************************************
1526int WIN32API GetKeyboardLayoutList(int nBuff, HKL *lpList)
1527{
1528#ifdef DEBUG
1529 WriteLog("USER32: GetKeyboardLayoutList, not implemented\n");
1530#endif
1531 return(0);
1532}
1533//******************************************************************************
1534//******************************************************************************
1535HKL WIN32API GetKeyboardLayout(DWORD dwLayout)
1536{
1537#ifdef DEBUG
1538 WriteLog("USER32: GetKeyboardLayout, not implemented\n");
1539#endif
1540 return(0);
1541}
1542//******************************************************************************
1543//******************************************************************************
1544int WIN32API LookupIconIdFromDirectory(PBYTE presbits, BOOL fIcon)
1545{
1546#ifdef DEBUG
1547 WriteLog("USER32: LookupIconIdFromDirectory, not implemented\n");
1548#endif
1549 return(0);
1550}
1551//******************************************************************************
1552//******************************************************************************
1553int WIN32API LookupIconIdFromDirectoryEx(PBYTE presbits, BOOL fIcon,
1554 int cxDesired, int cyDesired,
1555 UINT Flags)
1556{
1557#ifdef DEBUG
1558 WriteLog("USER32: LookupIconIdFromDirectoryEx, not implemented\n");
1559#endif
1560 return(0);
1561}
1562//******************************************************************************
1563//DWORD idAttach; /* thread to attach */
1564//DWORD idAttachTo; /* thread to attach to */
1565//BOOL fAttach; /* attach or detach */
1566//******************************************************************************
1567BOOL WIN32API AttachThreadInput(DWORD idAttach, DWORD idAttachTo, BOOL fAttach)
1568{
1569#ifdef DEBUG
1570 WriteLog("USER32: AttachThreadInput, not implemented\n");
1571#endif
1572 return(TRUE);
1573}
1574//******************************************************************************
1575//******************************************************************************
1576BOOL WIN32API RegisterHotKey(HWND hwnd, int idHotKey, UINT fuModifiers, UINT uVirtKey)
1577{
1578#ifdef DEBUG
1579 WriteLog("USER32: RegisterHotKey, not implemented\n");
1580#endif
1581 return(TRUE);
1582}
1583//******************************************************************************
1584//******************************************************************************
1585BOOL WIN32API UnregisterHotKey(HWND hwnd, int idHotKey)
1586{
1587#ifdef DEBUG
1588 WriteLog("USER32: UnregisterHotKey, not implemented\n");
1589#endif
1590 return(TRUE);
1591}
1592//******************************************************************************
1593//******************************************************************************
1594BOOL WIN32API SetWindowContextHelpId(HWND hwnd, DWORD dwContextHelpId)
1595{
1596#ifdef DEBUG
1597 WriteLog("USER32: SetWindowContextHelpId, not implemented\n");
1598#endif
1599 return(TRUE);
1600}
1601//******************************************************************************
1602//******************************************************************************
1603DWORD WIN32API GetWindowContextHelpId(HWND hwnd)
1604{
1605#ifdef DEBUG
1606 WriteLog("USER32: GetWindowContextHelpId, not implemented\n");
1607#endif
1608 return(0);
1609}
1610//******************************************************************************
1611//******************************************************************************
1612BOOL WIN32API GetMonitorInfoA(HMONITOR,LPMONITORINFO)
1613{
1614#ifdef DEBUG
1615 WriteLog("USER32: GetMonitorInfoA not supported!!\n");
1616#endif
1617 return(FALSE);
1618}
1619//******************************************************************************
1620//******************************************************************************
1621BOOL WIN32API GetMonitorInfoW(HMONITOR,LPMONITORINFO)
1622{
1623#ifdef DEBUG
1624 WriteLog("USER32: GetMonitorInfoW not supported!!\n");
1625#endif
1626 return(FALSE);
1627}
1628//******************************************************************************
1629//******************************************************************************
1630HMONITOR WIN32API MonitorFromWindow(HWND hwnd, DWORD dwFlags)
1631{
1632#ifdef DEBUG
1633 WriteLog("USER32: MonitorFromWindow not correctly supported??\n");
1634#endif
1635 return(0);
1636}
1637//******************************************************************************
1638//******************************************************************************
1639HMONITOR WIN32API MonitorFromRect(LPRECT rect, DWORD dwFlags)
1640{
1641#ifdef DEBUG
1642 WriteLog("USER32: MonitorFromRect not correctly supported??\n");
1643#endif
1644 return(0);
1645}
1646//******************************************************************************
1647//******************************************************************************
1648HMONITOR WIN32API MonitorFromPoint(POINT point, DWORD dwflags)
1649{
1650#ifdef DEBUG
1651 WriteLog("USER32: MonitorFromPoint not correctly supported??\n");
1652#endif
1653 return(0);
1654}
1655//******************************************************************************
1656//******************************************************************************
1657BOOL WIN32API EnumDisplayMonitors(HDC,LPRECT,MONITORENUMPROC,LPARAM)
1658{
1659#ifdef DEBUG
1660 WriteLog("USER32: EnumDisplayMonitors not supported??\n");
1661#endif
1662 return(FALSE);
1663}
1664//******************************************************************************
1665//******************************************************************************
1666BOOL WIN32API EnumDisplaySettingsA(LPCSTR lpszDeviceName, DWORD iModeNum,
1667 LPDEVMODEA lpDevMode)
1668{
1669#ifdef DEBUG
1670 WriteLog("USER32: EnumDisplaySettingsA FAKED\n");
1671#endif
1672 switch(iModeNum) {
1673 case 0:
1674 lpDevMode->dmBitsPerPel = 16;
1675 lpDevMode->dmPelsWidth = 768;
1676 lpDevMode->dmPelsHeight = 1024;
1677 lpDevMode->dmDisplayFlags = 0;
1678 lpDevMode->dmDisplayFrequency = 70;
1679 break;
1680 case 1:
1681 lpDevMode->dmBitsPerPel = 16;
1682 lpDevMode->dmPelsWidth = 640;
1683 lpDevMode->dmPelsHeight = 480;
1684 lpDevMode->dmDisplayFlags = 0;
1685 lpDevMode->dmDisplayFrequency = 70;
1686 break;
1687 default:
1688 return(FALSE);
1689 }
1690 return(TRUE);
1691}
1692//******************************************************************************
1693//******************************************************************************
1694LONG WIN32API ChangeDisplaySettingsA(LPDEVMODEA lpDevMode, DWORD dwFlags)
1695{
1696#ifdef DEBUG
1697 if(lpDevMode) {
1698 WriteLog("USER32: ChangeDisplaySettingsA FAKED %X\n", dwFlags);
1699 WriteLog("USER32: ChangeDisplaySettingsA lpDevMode->dmBitsPerPel %d\n", lpDevMode->dmBitsPerPel);
1700 WriteLog("USER32: ChangeDisplaySettingsA lpDevMode->dmPelsWidth %d\n", lpDevMode->dmPelsWidth);
1701 WriteLog("USER32: ChangeDisplaySettingsA lpDevMode->dmPelsHeight %d\n", lpDevMode->dmPelsHeight);
1702 }
1703#endif
1704 return(DISP_CHANGE_SUCCESSFUL);
1705}
1706//******************************************************************************
1707//******************************************************************************
1708
1709
1710/*****************************************************************************
1711 * Name : BOOL WIN32API AnyPopup
1712 * Purpose : The AnyPopup function indicates whether an owned, visible,
1713 * top-level pop-up, or overlapped window exists on the screen. The
1714 * function searches the entire Windows screen, not just the calling
1715 * application's client area.
1716 * Parameters: VOID
1717 * Variables :
1718 * Result : If a pop-up window exists, the return value is TRUE even if the
1719 * pop-up window is completely covered by other windows. Otherwise,
1720 * it is FALSE.
1721 * Remark : AnyPopup is a Windows version 1.x function and is retained for
1722 * compatibility purposes. It is generally not useful.
1723 * Status : UNTESTED STUB
1724 *
1725 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
1726 *****************************************************************************/
1727
1728BOOL WIN32API AnyPopup(VOID)
1729{
1730 dprintf(("USER32:AnyPopup() not implemented.\n"));
1731
1732 return (FALSE);
1733}
1734
1735
1736
1737/*****************************************************************************
1738 * Name : LONG WIN32API ChangeDisplaySettingsW
1739 * Purpose : The ChangeDisplaySettings function changes the display settings
1740 * to the specified graphics mode.
1741 * Parameters: LPDEVMODEW lpDevModeW
1742 * DWORD dwFlags
1743 * Variables :
1744 * Result : DISP_CHANGE_SUCCESSFUL The settings change was successful.
1745 * DISP_CHANGE_RESTART The computer must be restarted in order for the graphics mode to work.
1746 * DISP_CHANGE_BADFLAGS An invalid set of flags was passed in.
1747 * DISP_CHANGE_FAILED The display driver failed the specified graphics mode.
1748 * DISP_CHANGE_BADMODE The graphics mode is not supported.
1749 * DISP_CHANGE_NOTUPDATED Unable to write settings to the registry.
1750 * Remark :
1751 * Status : UNTESTED STUB
1752 *
1753 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
1754 *****************************************************************************/
1755
1756LONG WIN32API ChangeDisplaySettingsW(LPDEVMODEW lpDevMode,
1757 DWORD dwFlags)
1758{
1759 dprintf(("USER32:ChangeDisplaySettingsW(%08xh,%08x) not implemented.\n",
1760 lpDevMode,
1761 dwFlags));
1762
1763 return (ChangeDisplaySettingsA((LPDEVMODEA)lpDevMode,
1764 dwFlags));
1765}
1766
1767/*****************************************************************************
1768 * Name : BOOL WIN32API CloseDesktop
1769 * Purpose : The CloseDesktop function closes an open handle of a desktop
1770 * object. A desktop is a secure object contained within a window
1771 * station object. A desktop has a logical display surface and
1772 * contains windows, menus and hooks.
1773 * Parameters: HDESK hDesktop
1774 * Variables :
1775 * Result : If the function succeeds, the return value is TRUE.
1776 * If the functions fails, the return value is FALSE. To get
1777 * extended error information, call GetLastError.
1778 * Remark :
1779 * Status : UNTESTED STUB
1780 *
1781 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
1782 *****************************************************************************/
1783
1784BOOL WIN32API CloseDesktop(HDESK hDesktop)
1785{
1786 dprintf(("USER32:CloseDesktop(%08x) not implemented.\n",
1787 hDesktop));
1788
1789 return (FALSE);
1790}
1791
1792
1793/*****************************************************************************
1794 * Name : BOOL WIN32API CloseWindowStation
1795 * Purpose : The CloseWindowStation function closes an open window station handle.
1796 * Parameters: HWINSTA hWinSta
1797 * Variables :
1798 * Result :
1799 * Remark : If the function succeeds, the return value is TRUE.
1800 * If the functions fails, the return value is FALSE. To get
1801 * extended error information, call GetLastError.
1802 * Status : UNTESTED STUB
1803 *
1804 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
1805 *****************************************************************************/
1806
1807BOOL WIN32API CloseWindowStation(HWINSTA hWinSta)
1808{
1809 dprintf(("USER32:CloseWindowStation(%08x) not implemented.\n",
1810 hWinSta));
1811
1812 return (FALSE);
1813}
1814
1815
1816/*****************************************************************************
1817 * Name : HDESK WIN32API CreateDesktopA
1818 * Purpose : The CreateDesktop function creates a new desktop on the window
1819 * station associated with the calling process.
1820 * Parameters: LPCTSTR lpszDesktop name of the new desktop
1821 * LPCTSTR lpszDevice name of display device to assign to the desktop
1822 * LPDEVMODE pDevMode reserved; must be NULL
1823 * DWORD dwFlags flags to control interaction with other applications
1824 * DWORD dwDesiredAccess specifies access of returned handle
1825 * LPSECURITY_ATTRIBUTES lpsa specifies security attributes of the desktop
1826 * Variables :
1827 * Result : If the function succeeds, the return value is a handle of the
1828 * newly created desktop.
1829 * If the function fails, the return value is NULL. To get extended
1830 * error information, call GetLastError.
1831 * Remark :
1832 * Status : UNTESTED STUB
1833 *
1834 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
1835 *****************************************************************************/
1836
1837HDESK WIN32API CreateDesktopA(LPCTSTR lpszDesktop,
1838 LPCTSTR lpszDevice,
1839 LPDEVMODEA pDevMode,
1840 DWORD dwFlags,
1841 DWORD dwDesiredAccess,
1842 LPSECURITY_ATTRIBUTES lpsa)
1843{
1844 dprintf(("USER32:CreateDesktopA(%s,%s,%08xh,%08xh,%08xh,%08x) not implemented.\n",
1845 lpszDesktop,
1846 lpszDevice,
1847 pDevMode,
1848 dwFlags,
1849 dwDesiredAccess,
1850 lpsa));
1851
1852 return (NULL);
1853}
1854
1855
1856/*****************************************************************************
1857 * Name : HDESK WIN32API CreateDesktopW
1858 * Purpose : The CreateDesktop function creates a new desktop on the window
1859 * station associated with the calling process.
1860 * Parameters: LPCTSTR lpszDesktop name of the new desktop
1861 * LPCTSTR lpszDevice name of display device to assign to the desktop
1862 * LPDEVMODE pDevMode reserved; must be NULL
1863 * DWORD dwFlags flags to control interaction with other applications
1864 * DWORD dwDesiredAccess specifies access of returned handle
1865 * LPSECURITY_ATTRIBUTES lpsa specifies security attributes of the desktop
1866 * Variables :
1867 * Result : If the function succeeds, the return value is a handle of the
1868 * newly created desktop.
1869 * If the function fails, the return value is NULL. To get extended
1870 * error information, call GetLastError.
1871 * Remark :
1872 * Status : UNTESTED STUB
1873 *
1874 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
1875 *****************************************************************************/
1876
1877HDESK WIN32API CreateDesktopW(LPCTSTR lpszDesktop,
1878 LPCTSTR lpszDevice,
1879 LPDEVMODEW pDevMode,
1880 DWORD dwFlags,
1881 DWORD dwDesiredAccess,
1882 LPSECURITY_ATTRIBUTES lpsa)
1883{
1884 dprintf(("USER32:CreateDesktopW(%s,%s,%08xh,%08xh,%08xh,%08x) not implemented.\n",
1885 lpszDesktop,
1886 lpszDevice,
1887 pDevMode,
1888 dwFlags,
1889 dwDesiredAccess,
1890 lpsa));
1891
1892 return (NULL);
1893}
1894
1895
1896/*****************************************************************************
1897 * Name : HWINSTA WIN32API CreateWindowStationA
1898 * Purpose : The CreateWindowStation function creates a window station object.
1899 * It returns a handle that can be used to access the window station.
1900 * A window station is a secure object that contains a set of global
1901 * atoms, a clipboard, and a set of desktop objects.
1902 * Parameters: LPTSTR lpwinsta name of the new window station
1903 * DWORD dwReserved reserved; must be NULL
1904 * DWORD dwDesiredAccess specifies access of returned handle
1905 * LPSECURITY_ATTRIBUTES lpsa specifies security attributes of the window station
1906 * Variables :
1907 * Result : If the function succeeds, the return value is the handle to the
1908 * newly created window station.
1909 * If the function fails, the return value is NULL. To get extended
1910 * error information, call GetLastError.
1911 * Remark :
1912 * Status : UNTESTED STUB
1913 *
1914 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
1915 *****************************************************************************/
1916
1917HWINSTA WIN32API CreateWindowStationA(LPTSTR lpWinSta,
1918 DWORD dwReserved,
1919 DWORD dwDesiredAccess,
1920 LPSECURITY_ATTRIBUTES lpsa)
1921{
1922 dprintf(("USER32:CreateWindowStationA(%s,%08xh,%08xh,%08x) not implemented.\n",
1923 lpWinSta,
1924 dwReserved,
1925 dwDesiredAccess,
1926 lpsa));
1927
1928 return (NULL);
1929}
1930
1931
1932/*****************************************************************************
1933 * Name : HWINSTA WIN32API CreateWindowStationW
1934 * Purpose : The CreateWindowStation function creates a window station object.
1935 * It returns a handle that can be used to access the window station.
1936 * A window station is a secure object that contains a set of global
1937 * atoms, a clipboard, and a set of desktop objects.
1938 * Parameters: LPTSTR lpwinsta name of the new window station
1939 * DWORD dwReserved reserved; must be NULL
1940 * DWORD dwDesiredAccess specifies access of returned handle
1941 * LPSECURITY_ATTRIBUTES lpsa specifies security attributes of the window station
1942 * Variables :
1943 * Result : If the function succeeds, the return value is the handle to the
1944 * newly created window station.
1945 * If the function fails, the return value is NULL. To get extended
1946 * error information, call GetLastError.
1947 * Remark :
1948 * Status : UNTESTED STUB
1949 *
1950 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
1951 *****************************************************************************/
1952
1953HWINSTA WIN32API CreateWindowStationW(LPWSTR lpWinSta,
1954 DWORD dwReserved,
1955 DWORD dwDesiredAccess,
1956 LPSECURITY_ATTRIBUTES lpsa)
1957{
1958 dprintf(("USER32:CreateWindowStationW(%s,%08xh,%08xh,%08x) not implemented.\n",
1959 lpWinSta,
1960 dwReserved,
1961 dwDesiredAccess,
1962 lpsa));
1963
1964 return (NULL);
1965}
1966
1967/*****************************************************************************
1968 * Name : BOOL WIN32API DragDetect
1969 * Purpose : The DragDetect function captures the mouse and tracks its movement
1970 * Parameters: HWND hwnd
1971 * POINT pt
1972 * Variables :
1973 * Result : If the user moved the mouse outside of the drag rectangle while
1974 * holding the left button down, the return value is TRUE.
1975 * If the user did not move the mouse outside of the drag rectangle
1976 * while holding the left button down, the return value is FALSE.
1977 * Remark :
1978 * Status : UNTESTED STUB
1979 *
1980 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
1981 *****************************************************************************/
1982
1983BOOL WIN32API DragDetect(HWND hwnd,
1984 POINT pt)
1985{
1986 dprintf(("USER32:DragDetect(%08xh,...) not implemented.\n",
1987 hwnd));
1988
1989 return (FALSE);
1990}
1991
1992
1993
1994/*****************************************************************************
1995 * Name : BOOL WIN32API EnumDesktopWindows
1996 * Purpose : The EnumDesktopWindows function enumerates all windows in a
1997 * desktop by passing the handle of each window, in turn, to an
1998 * application-defined callback function.
1999 * Parameters: HDESK hDesktop handle of desktop to enumerate
2000 * WNDENUMPROC lpfn points to application's callback function
2001 * LPARAM lParam 32-bit value to pass to the callback function
2002 * Variables :
2003 * Result : If the function succeeds, the return value is TRUE.
2004 * If the function fails, the return value is FALSE. To get
2005 * extended error information, call GetLastError.
2006 * Remark :
2007 * Status : UNTESTED STUB
2008 *
2009 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
2010 *****************************************************************************/
2011
2012BOOL WIN32API EnumDesktopWindows(HDESK hDesktop,
2013 WNDENUMPROC lpfn,
2014 LPARAM lParam)
2015{
2016 dprintf(("USER32:EnumDesktopWindows (%08xh,%08xh,%08x) not implemented.\n",
2017 hDesktop,
2018 lpfn,
2019 lParam));
2020
2021 return (FALSE);
2022}
2023
2024
2025/*****************************************************************************
2026 * Name : BOOL WIN32API EnumDesktopsA
2027 * Purpose : The EnumDesktops function enumerates all desktops in the window
2028 * station assigned to the calling process. The function does so by
2029 * passing the name of each desktop, in turn, to an application-
2030 * defined callback function.
2031 * Parameters: HWINSTA hwinsta handle of window station to enumerate
2032 * DESKTOPENUMPROC lpEnumFunc points to application's callback function
2033 * LPARAM lParam 32-bit value to pass to the callback function
2034 * Variables :
2035 * Result : If the function succeeds, the return value is TRUE.
2036 * If the function fails, the return value is FALSE. To get extended
2037 * error information, call GetLastError.
2038 * Remark :
2039 * Status : UNTESTED STUB
2040 *
2041 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
2042 *****************************************************************************/
2043
2044BOOL WIN32API EnumDesktopsA(HWINSTA hWinSta,
2045 DESKTOPENUMPROCA lpEnumFunc,
2046 LPARAM lParam)
2047{
2048 dprintf(("USER32:EnumDesktopsA (%08xh,%08xh,%08x) not implemented.\n",
2049 hWinSta,
2050 lpEnumFunc,
2051 lParam));
2052
2053 return (FALSE);
2054}
2055
2056
2057/*****************************************************************************
2058 * Name : BOOL WIN32API EnumDesktopsW
2059 * Purpose : The EnumDesktops function enumerates all desktops in the window
2060 * station assigned to the calling process. The function does so by
2061 * passing the name of each desktop, in turn, to an application-
2062 * defined callback function.
2063 * Parameters: HWINSTA hwinsta handle of window station to enumerate
2064 * DESKTOPENUMPROC lpEnumFunc points to application's callback function
2065 * LPARAM lParam 32-bit value to pass to the callback function
2066 * Variables :
2067 * Result : If the function succeeds, the return value is TRUE.
2068 * If the function fails, the return value is FALSE. To get extended
2069 * error information, call GetLastError.
2070 * Remark :
2071 * Status : UNTESTED STUB
2072 *
2073 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
2074 *****************************************************************************/
2075
2076BOOL WIN32API EnumDesktopsW(HWINSTA hWinSta,
2077 DESKTOPENUMPROCW lpEnumFunc,
2078 LPARAM lParam)
2079{
2080 dprintf(("USER32:EnumDesktopsW (%08xh,%08xh,%08x) not implemented.\n",
2081 hWinSta,
2082 lpEnumFunc,
2083 lParam));
2084
2085 return (FALSE);
2086}
2087
2088
2089
2090/*****************************************************************************
2091 * Name : BOOL WIN32API EnumDisplaySettingsW
2092 * Purpose : The EnumDisplaySettings function obtains information about one
2093 * of a display device's graphics modes. You can obtain information
2094 * for all of a display device's graphics modes by making a series
2095 * of calls to this function.
2096 * Parameters: LPCTSTR lpszDeviceName specifies the display device
2097 * DWORD iModeNum specifies the graphics mode
2098 * LPDEVMODE lpDevMode points to structure to receive settings
2099 * Variables :
2100 * Result : If the function succeeds, the return value is TRUE.
2101 * If the function fails, the return value is FALSE.
2102 * Remark :
2103 * Status : UNTESTED STUB
2104 *
2105 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
2106 *****************************************************************************/
2107
2108BOOL WIN32API EnumDisplaySettingsW(LPCSTR lpszDeviceName,
2109 DWORD iModeNum,
2110 LPDEVMODEW lpDevMode)
2111{
2112 dprintf(("USER32:EnumDisplaySettingsW (%s,%08xh,%08x) not implemented.\n",
2113 lpszDeviceName,
2114 iModeNum,
2115 lpDevMode));
2116
2117 return (EnumDisplaySettingsA(lpszDeviceName,
2118 iModeNum,
2119 (LPDEVMODEA)lpDevMode));
2120}
2121
2122
2123/*****************************************************************************
2124 * Name : BOOL WIN32API EnumWindowStationsA
2125 * Purpose : The EnumWindowStations function enumerates all windowstations
2126 * in the system by passing the name of each window station, in
2127 * turn, to an application-defined callback function.
2128 * Parameters:
2129 * Variables : WINSTAENUMPROC lpEnumFunc points to application's callback function
2130 * LPARAM lParam 32-bit value to pass to the callback function
2131 * Result : If the function succeeds, the return value is TRUE.
2132 * If the function fails the return value is FALSE. To get extended
2133 * error information, call GetLastError.
2134 * Remark :
2135 * Status : UNTESTED STUB
2136 *
2137 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
2138 *****************************************************************************/
2139
2140BOOL WIN32API EnumWindowStationsA(WINSTAENUMPROCA lpEnumFunc,
2141 LPARAM lParam)
2142{
2143 dprintf(("USER32:EnumWindowStationsA (%08xh,%08x) not implemented.\n",
2144 lpEnumFunc,
2145 lParam));
2146
2147 return (FALSE);
2148}
2149
2150
2151/*****************************************************************************
2152 * Name : BOOL WIN32API EnumWindowStationsW
2153 * Purpose : The EnumWindowStations function enumerates all windowstations
2154 * in the system by passing the name of each window station, in
2155 * turn, to an application-defined callback function.
2156 * Parameters:
2157 * Variables : WINSTAENUMPROC lpEnumFunc points to application's callback function
2158 * LPARAM lParam 32-bit value to pass to the callback function
2159 * Result : If the function succeeds, the return value is TRUE.
2160 * If the function fails the return value is FALSE. To get extended
2161 * error information, call GetLastError.
2162 * Remark :
2163 * Status : UNTESTED STUB
2164 *
2165 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
2166 *****************************************************************************/
2167
2168BOOL WIN32API EnumWindowStationsW(WINSTAENUMPROCW lpEnumFunc,
2169 LPARAM lParam)
2170{
2171 dprintf(("USER32:EnumWindowStationsW (%08xh,%08x) not implemented.\n",
2172 lpEnumFunc,
2173 lParam));
2174
2175 return (FALSE);
2176}
2177
2178
2179
2180/*****************************************************************************
2181 * Name : BOOL WIN32API GetInputState
2182 * Purpose : The GetInputState function determines whether there are
2183 * mouse-button or keyboard messages in the calling thread's message queue.
2184 * Parameters:
2185 * Variables :
2186 * Result : If the queue contains one or more new mouse-button or keyboard
2187 * messages, the return value is TRUE.
2188 * If the function fails, the return value is FALSE.
2189 * Remark :
2190 * Status : UNTESTED STUB
2191 *
2192 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
2193 *****************************************************************************/
2194
2195BOOL WIN32API GetInputState(VOID)
2196{
2197 dprintf(("USER32:GetInputState () not implemented.\n"));
2198
2199 return (FALSE);
2200}
2201
2202
2203/*****************************************************************************
2204 * Name : UINT WIN32API GetKBCodePage
2205 * Purpose : The GetKBCodePage function is provided for compatibility with
2206 * earlier versions of Windows. In the Win32 application programming
2207 * interface (API) it just calls the GetOEMCP function.
2208 * Parameters:
2209 * Variables :
2210 * Result : If the function succeeds, the return value is an OEM code-page
2211 * identifier, or it is the default identifier if the registry
2212 * value is not readable. For a list of OEM code-page identifiers,
2213 * see GetOEMCP.
2214 * Remark :
2215 * Status : UNTESTED
2216 *
2217 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
2218 *****************************************************************************/
2219
2220UINT WIN32API GetKBCodePage(VOID)
2221{
2222 return (GetOEMCP());
2223}
2224
2225
2226/*****************************************************************************
2227 * Name : BOOL WIN32API GetKeyboardLayoutNameA
2228 * Purpose : The GetKeyboardLayoutName function retrieves the name of the
2229 * active keyboard layout.
2230 * Parameters: LPTSTR pwszKLID address of buffer for layout name
2231 * Variables :
2232 * Result : If the function succeeds, the return value is TRUE.
2233 * If the function fails, the return value is FALSE. To get extended
2234 * error information, call GetLastError.
2235 * Remark :
2236 * Status : UNTESTED STUB
2237 *
2238 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
2239 *****************************************************************************/
2240
2241// @@@PH Win32 BOOL's are casted to INTs
2242INT WIN32API GetKeyboardLayoutNameA(LPTSTR pwszKLID)
2243{
2244 dprintf(("USER32:GetKeyboardLayoutNameA (%08x) not implemented.",
2245 pwszKLID));
2246
2247 return(FALSE);
2248}
2249
2250
2251/*****************************************************************************
2252 * Name : BOOL WIN32API GetKeyboardLayoutNameW
2253 * Purpose : The GetKeyboardLayoutName function retrieves the name of the
2254 * active keyboard layout.
2255 * Parameters: LPTSTR pwszKLID address of buffer for layout name
2256 * Variables :
2257 * Result : If the function succeeds, the return value is TRUE.
2258 * If the function fails, the return value is FALSE. To get extended
2259 * error information, call GetLastError.
2260 * Remark :
2261 * Status : UNTESTED STUB
2262 *
2263 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
2264 *****************************************************************************/
2265
2266// @@@PH Win32 BOOL's are casted to INTs
2267INT WIN32API GetKeyboardLayoutNameW(LPWSTR pwszKLID)
2268{
2269 dprintf(("USER32:GetKeyboardLayoutNameW (%08x) not implemented.",
2270 pwszKLID));
2271
2272 return(FALSE);
2273}
2274
2275
2276
2277
2278/*****************************************************************************
2279 * Name : HWINSTA WIN32API GetProcessWindowStation
2280 * Purpose : The GetProcessWindowStation function returns a handle of the
2281 * window station associated with the calling process.
2282 * Parameters:
2283 * Variables :
2284 * Result : If the function succeeds, the return value is a handle of the
2285 * window station associated with the calling process.
2286 * If the function fails, the return value is NULL. This can occur
2287 * if the calling process is not an application written for Windows
2288 * NT. To get extended error information, call GetLastError.
2289 * Remark :
2290 * Status : UNTESTED STUB
2291 *
2292 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
2293 *****************************************************************************/
2294
2295HWINSTA WIN32API GetProcessWindowStation(VOID)
2296{
2297 dprintf(("USER32:GetProcessWindowStation () not implemented.\n"));
2298
2299 return (NULL);
2300}
2301
2302
2303
2304/*****************************************************************************
2305 * Name : HDESK WIN32API GetThreadDesktop
2306 * Purpose : The GetThreadDesktop function returns a handle to the desktop
2307 * associated with a specified thread.
2308 * Parameters: DWORD dwThreadId thread identifier
2309 * Variables :
2310 * Result : If the function succeeds, the return value is the handle of the
2311 * desktop associated with the specified thread.
2312 * Remark :
2313 * Status : UNTESTED STUB
2314 *
2315 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
2316 *****************************************************************************/
2317
2318HDESK WIN32API GetThreadDesktop(DWORD dwThreadId)
2319{
2320 dprintf(("USER32:GetThreadDesktop (%u) not implemented.\n",
2321 dwThreadId));
2322
2323 return (NULL);
2324}
2325
2326
2327/*****************************************************************************
2328 * Name : BOOL WIN32API GetUserObjectInformationA
2329 * Purpose : The GetUserObjectInformation function returns information about
2330 * a window station or desktop object.
2331 * Parameters: HANDLE hObj handle of object to get information for
2332 * int nIndex type of information to get
2333 * PVOID pvInfo points to buffer that receives the information
2334 * DWORD nLength size, in bytes, of pvInfo buffer
2335 * LPDWORD lpnLengthNeeded receives required size, in bytes, of pvInfo buffer
2336 * Variables :
2337 * Result : If the function succeeds, the return value is TRUE.
2338 * If the function fails, the return value is FALSE. To get extended
2339 * error information, call GetLastError.
2340 * Remark :
2341 * Status : UNTESTED STUB
2342 *
2343 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
2344 *****************************************************************************/
2345
2346BOOL WIN32API GetUserObjectInformationA(HANDLE hObj,
2347 int nIndex,
2348 PVOID pvInfo,
2349 DWORD nLength,
2350 LPDWORD lpnLengthNeeded)
2351{
2352 dprintf(("USER32:GetUserObjectInformationA (%08xh,%08xh,%08xh,%u,%08x) not implemented.\n",
2353 hObj,
2354 nIndex,
2355 pvInfo,
2356 nLength,
2357 lpnLengthNeeded));
2358
2359 return (FALSE);
2360}
2361
2362
2363/*****************************************************************************
2364 * Name : BOOL WIN32API GetUserObjectInformationW
2365 * Purpose : The GetUserObjectInformation function returns information about
2366 * a window station or desktop object.
2367 * Parameters: HANDLE hObj handle of object to get information for
2368 * int nIndex type of information to get
2369 * PVOID pvInfo points to buffer that receives the information
2370 * DWORD nLength size, in bytes, of pvInfo buffer
2371 * LPDWORD lpnLengthNeeded receives required size, in bytes, of pvInfo buffer
2372 * Variables :
2373 * Result : If the function succeeds, the return value is TRUE.
2374 * If the function fails, the return value is FALSE. To get extended
2375 * error information, call GetLastError.
2376 * Remark :
2377 * Status : UNTESTED STUB
2378 *
2379 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
2380 *****************************************************************************/
2381
2382BOOL WIN32API GetUserObjectInformationW(HANDLE hObj,
2383 int nIndex,
2384 PVOID pvInfo,
2385 DWORD nLength,
2386 LPDWORD lpnLengthNeeded)
2387{
2388 dprintf(("USER32:GetUserObjectInformationW (%08xh,%08xh,%08xh,%u,%08x) not implemented.\n",
2389 hObj,
2390 nIndex,
2391 pvInfo,
2392 nLength,
2393 lpnLengthNeeded));
2394
2395 return (FALSE);
2396}
2397
2398
2399/*****************************************************************************
2400 * Name : BOOL WIN32API GetUserObjectSecurity
2401 * Purpose : The GetUserObjectSecurity function retrieves security information
2402 * for the specified user object.
2403 * Parameters: HANDLE hObj handle of user object
2404 * SECURITY_INFORMATION * pSIRequested address of requested security information
2405 * LPSECURITY_DESCRIPTOR pSID address of security descriptor
2406 * DWORD nLength size of buffer for security descriptor
2407 * LPDWORD lpnLengthNeeded address of required size of buffer
2408 * Variables :
2409 * Result : If the function succeeds, the return value is TRUE.
2410 * If the function fails, the return value is FALSE. To get extended
2411 * error information, call GetLastError.
2412 * Remark :
2413 * Status : UNTESTED STUB
2414 *
2415 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
2416 *****************************************************************************/
2417
2418BOOL WIN32API GetUserObjectSecurity(HANDLE hObj,
2419 SECURITY_INFORMATION * pSIRequested,
2420 LPSECURITY_DESCRIPTOR pSID,
2421 DWORD nLength,
2422 LPDWORD lpnLengthNeeded)
2423{
2424 dprintf(("USER32:GetUserObjectSecurity (%08xh,%08xh,%08xh,%u,%08x) not implemented.\n",
2425 hObj,
2426 pSIRequested,
2427 pSID,
2428 nLength,
2429 lpnLengthNeeded));
2430
2431 return (FALSE);
2432}
2433
2434
2435
2436/*****************************************************************************
2437 * Name : int WIN32API GetWindowRgn
2438 * Purpose : The GetWindowRgn function obtains a copy of the window region of a window.
2439 * Parameters: HWND hWnd handle to window whose window region is to be obtained
2440 * HRGN hRgn handle to region that receives a copy of the window region
2441 * Variables :
2442 * Result : NULLREGION, SIMPLEREGION, COMPLEXREGION, ERROR
2443 * Remark :
2444 * Status : UNTESTED STUB
2445 *
2446 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
2447 *****************************************************************************/
2448
2449int WIN32API GetWindowRgn (HWND hWnd,
2450 HRGN hRgn)
2451{
2452 dprintf(("USER32:GetWindowRgn (%08xh,%08x) not implemented.\n",
2453 hWnd,
2454 hRgn));
2455
2456 return (NULLREGION);
2457}
2458
2459
2460
2461/*****************************************************************************
2462 * Name : HCURSOR WIN32API LoadCursorFromFileA
2463 * Purpose : The LoadCursorFromFile function creates a cursor based on data
2464 * contained in a file. The file is specified by its name or by a
2465 * system cursor identifier. The function returns a handle to the
2466 * newly created cursor. Files containing cursor data may be in
2467 * either cursor (.CUR) or animated cursor (.ANI) format.
2468 * Parameters: LPCTSTR lpFileName pointer to cursor file, or system cursor id
2469 * Variables :
2470 * Result : If the function is successful, the return value is a handle to
2471 * the new cursor.
2472 * If the function fails, the return value is NULL. To get extended
2473 * error information, call GetLastError. GetLastError may return
2474 * the following
2475 * Remark :
2476 * Status : UNTESTED STUB
2477 *
2478 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
2479 *****************************************************************************/
2480
2481HCURSOR WIN32API LoadCursorFromFileA(LPCTSTR lpFileName)
2482{
2483 dprintf(("USER32:LoadCursorFromFileA (%s) not implemented.\n",
2484 lpFileName));
2485
2486 return (NULL);
2487}
2488
2489
2490/*****************************************************************************
2491 * Name : HCURSOR WIN32API LoadCursorFromFileW
2492 * Purpose : The LoadCursorFromFile function creates a cursor based on data
2493 * contained in a file. The file is specified by its name or by a
2494 * system cursor identifier. The function returns a handle to the
2495 * newly created cursor. Files containing cursor data may be in
2496 * either cursor (.CUR) or animated cursor (.ANI) format.
2497 * Parameters: LPCTSTR lpFileName pointer to cursor file, or system cursor id
2498 * Variables :
2499 * Result : If the function is successful, the return value is a handle to
2500 * the new cursor.
2501 * If the function fails, the return value is NULL. To get extended
2502 * error information, call GetLastError. GetLastError may return
2503 * the following
2504 * Remark :
2505 * Status : UNTESTED STUB
2506 *
2507 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
2508 *****************************************************************************/
2509
2510HCURSOR WIN32API LoadCursorFromFileW(LPCWSTR lpFileName)
2511{
2512 dprintf(("USER32:LoadCursorFromFileW (%s) not implemented.\n",
2513 lpFileName));
2514
2515 return (NULL);
2516}
2517
2518
2519/*****************************************************************************
2520 * Name : HLK WIN32API LoadKeyboardLayoutA
2521 * Purpose : The LoadKeyboardLayout function loads a new keyboard layout into
2522 * the system. Several keyboard layouts can be loaded at a time, but
2523 * only one per process is active at a time. Loading multiple keyboard
2524 * layouts makes it possible to rapidly switch between layouts.
2525 * Parameters:
2526 * Variables :
2527 * Result : If the function succeeds, the return value is the handle of the
2528 * keyboard layout.
2529 * If the function fails, the return value is NULL. To get extended
2530 * error information, call GetLastError.
2531 * Remark :
2532 * Status : UNTESTED STUB
2533 *
2534 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
2535 *****************************************************************************/
2536
2537HKL WIN32API LoadKeyboardLayoutA(LPCTSTR pwszKLID,
2538 UINT Flags)
2539{
2540 dprintf(("USER32:LeadKeyboardLayoutA (%s,%u) not implemented.\n",
2541 pwszKLID,
2542 Flags));
2543
2544 return (NULL);
2545}
2546
2547
2548/*****************************************************************************
2549 * Name : HLK WIN32API LoadKeyboardLayoutW
2550 * Purpose : The LoadKeyboardLayout function loads a new keyboard layout into
2551 * the system. Several keyboard layouts can be loaded at a time, but
2552 * only one per process is active at a time. Loading multiple keyboard
2553 * layouts makes it possible to rapidly switch between layouts.
2554 * Parameters:
2555 * Variables :
2556 * Result : If the function succeeds, the return value is the handle of the
2557 * keyboard layout.
2558 * If the function fails, the return value is NULL. To get extended
2559 * error information, call GetLastError.
2560 * Remark :
2561 * Status : UNTESTED STUB
2562 *
2563 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
2564 *****************************************************************************/
2565
2566HKL WIN32API LoadKeyboardLayoutW(LPCWSTR pwszKLID,
2567 UINT Flags)
2568{
2569 dprintf(("USER32:LeadKeyboardLayoutW (%s,%u) not implemented.\n",
2570 pwszKLID,
2571 Flags));
2572
2573 return (NULL);
2574}
2575
2576
2577/*****************************************************************************
2578 * Name : UINT WIN32API MapVirtualKeyExA
2579 * Purpose : The MapVirtualKeyEx function translates (maps) a virtual-key
2580 * code into a scan code or character value, or translates a scan
2581 * code into a virtual-key code. The function translates the codes
2582 * using the input language and physical keyboard layout identified
2583 * by the given keyboard layout handle.
2584 * Parameters:
2585 * Variables :
2586 * Result : The return value is either a scan code, a virtual-key code, or
2587 * a character value, depending on the value of uCode and uMapType.
2588 * If there is no translation, the return value is zero.
2589 * Remark :
2590 * Status : UNTESTED STUB
2591 *
2592 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
2593 *****************************************************************************/
2594
2595UINT WIN32API MapVirtualKeyExA(UINT uCode,
2596 UINT uMapType,
2597 HKL dwhkl)
2598{
2599 dprintf(("USER32:MapVirtualKeyExA (%u,%u,%08x) not implemented.\n",
2600 uCode,
2601 uMapType,
2602 dwhkl));
2603
2604 return (0);
2605}
2606
2607
2608/*****************************************************************************
2609 * Name : UINT WIN32API MapVirtualKeyExW
2610 * Purpose : The MapVirtualKeyEx function translates (maps) a virtual-key
2611 * code into a scan code or character value, or translates a scan
2612 * code into a virtual-key code. The function translates the codes
2613 * using the input language and physical keyboard layout identified
2614 * by the given keyboard layout handle.
2615 * Parameters:
2616 * Variables :
2617 * Result : The return value is either a scan code, a virtual-key code, or
2618 * a character value, depending on the value of uCode and uMapType.
2619 * If there is no translation, the return value is zero.
2620 * Remark :
2621 * Status : UNTESTED STUB
2622
2623 *
2624 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
2625 *****************************************************************************/
2626
2627UINT WIN32API MapVirtualKeyExW(UINT uCode,
2628 UINT uMapType,
2629 HKL dwhkl)
2630{
2631 dprintf(("USER32:MapVirtualKeyExW (%u,%u,%08x) not implemented.\n",
2632 uCode,
2633 uMapType,
2634 dwhkl));
2635
2636 return (0);
2637}
2638
2639/*****************************************************************************
2640 * Name : DWORD WIN32API OemKeyScan
2641 * Purpose : The OemKeyScan function maps OEM ASCII codes 0 through 0x0FF
2642 * into the OEM scan codes and shift states. The function provides
2643 * information that allows a program to send OEM text to another
2644 * program by simulating keyboard input.
2645 * Parameters:
2646 * Variables :
2647 * Result :
2648 * Remark :
2649 * Status : UNTESTED STUB
2650 *
2651 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
2652 *****************************************************************************/
2653
2654DWORD WIN32API OemKeyScan(WORD wOemChar)
2655{
2656 dprintf(("USER32:OemKeyScan (%u) not implemented.\n",
2657 wOemChar));
2658
2659 return (wOemChar);
2660}
2661
2662
2663/*****************************************************************************
2664 * Name : HDESK WIN32API OpenDesktopA
2665 * Purpose : The OpenDesktop function returns a handle to an existing desktop.
2666 * A desktop is a secure object contained within a window station
2667 * object. A desktop has a logical display surface and contains
2668 * windows, menus and hooks.
2669 * Parameters: LPCTSTR lpszDesktopName name of the desktop to open
2670 * DWORD dwFlags flags to control interaction with other applications
2671 * BOOL fInherit specifies whether returned handle is inheritable
2672 * DWORD dwDesiredAccess specifies access of returned handle
2673 * Variables :
2674 * Result : If the function succeeds, the return value is the handle to the
2675 * opened desktop.
2676 * If the function fails, the return value is NULL. To get extended
2677 * error information, call GetLastError.
2678 * Remark :
2679 * Status : UNTESTED STUB
2680 *
2681 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
2682 *****************************************************************************/
2683
2684HDESK WIN32API OpenDesktopA(LPCTSTR lpszDesktopName,
2685 DWORD dwFlags,
2686 BOOL fInherit,
2687 DWORD dwDesiredAccess)
2688{
2689 dprintf(("USER32:OpenDesktopA (%s,%08xh,%08xh,%08x) not implemented.\n",
2690 lpszDesktopName,
2691 dwFlags,
2692 fInherit,
2693 dwDesiredAccess));
2694
2695 return (NULL);
2696}
2697
2698
2699/*****************************************************************************
2700 * Name : HDESK WIN32API OpenDesktopW
2701 * Purpose : The OpenDesktop function returns a handle to an existing desktop.
2702 * A desktop is a secure object contained within a window station
2703 * object. A desktop has a logical display surface and contains
2704 * windows, menus and hooks.
2705 * Parameters: LPCTSTR lpszDesktopName name of the desktop to open
2706 * DWORD dwFlags flags to control interaction with other applications
2707 * BOOL fInherit specifies whether returned handle is inheritable
2708 * DWORD dwDesiredAccess specifies access of returned handle
2709 * Variables :
2710 * Result : If the function succeeds, the return value is the handle to the
2711 * opened desktop.
2712 * If the function fails, the return value is NULL. To get extended
2713 * error information, call GetLastError.
2714 * Remark :
2715 * Status : UNTESTED STUB
2716 *
2717 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
2718 *****************************************************************************/
2719
2720HDESK WIN32API OpenDesktopW(LPCTSTR lpszDesktopName,
2721 DWORD dwFlags,
2722 BOOL fInherit,
2723 DWORD dwDesiredAccess)
2724{
2725 dprintf(("USER32:OpenDesktopW (%s,%08xh,%08xh,%08x) not implemented.\n",
2726 lpszDesktopName,
2727 dwFlags,
2728 fInherit,
2729 dwDesiredAccess));
2730
2731 return (NULL);
2732}
2733
2734
2735/*****************************************************************************
2736 * Name : HDESK WIN32API OpenInputDesktop
2737 * Purpose : The OpenInputDesktop function returns a handle to the desktop
2738 * that receives user input. The input desktop is a desktop on the
2739 * window station associated with the logged-on user.
2740 * Parameters: DWORD dwFlags flags to control interaction with other applications
2741 * BOOL fInherit specifies whether returned handle is inheritable
2742 * DWORD dwDesiredAccess specifies access of returned handle
2743 * Variables :
2744 * Result : If the function succeeds, the return value is a handle of the
2745 * desktop that receives user input.
2746 * If the function fails, the return value is NULL. To get extended
2747 * error information, call GetLastError.
2748 * Remark :
2749 * Status : UNTESTED STUB
2750 *
2751 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
2752 *****************************************************************************/
2753
2754HDESK WIN32API OpenInputDesktop(DWORD dwFlags,
2755 BOOL fInherit,
2756 DWORD dwDesiredAccess)
2757{
2758 dprintf(("USER32:OpenInputDesktop (%08xh,%08xh,%08x) not implemented.\n",
2759 dwFlags,
2760 fInherit,
2761 dwDesiredAccess));
2762
2763 return (NULL);
2764}
2765
2766
2767/*****************************************************************************
2768 * Name : HWINSTA WIN32API OpenWindowStationA
2769 * Purpose : The OpenWindowStation function returns a handle to an existing
2770 * window station.
2771 * Parameters: LPCTSTR lpszWinStaName name of the window station to open
2772 * BOOL fInherit specifies whether returned handle is inheritable
2773 * DWORD dwDesiredAccess specifies access of returned handle
2774 * Variables :
2775 * Result : If the function succeeds, the return value is the handle to the
2776 * specified window station.
2777 * If the function fails, the return value is NULL. To get extended
2778 * error information, call GetLastError.
2779 * Remark :
2780 * Status : UNTESTED STUB
2781 *
2782 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
2783 *****************************************************************************/
2784
2785HWINSTA WIN32API OpenWindowStationA(LPCTSTR lpszWinStaName,
2786 BOOL fInherit,
2787 DWORD dwDesiredAccess)
2788{
2789 dprintf(("USER32:OpenWindowStatieonA (%s,%08xh,%08x) not implemented.\n",
2790 lpszWinStaName,
2791 fInherit,
2792 dwDesiredAccess));
2793
2794 return (NULL);
2795}
2796
2797
2798/*****************************************************************************
2799 * Name : HWINSTA WIN32API OpenWindowStationW
2800 * Purpose : The OpenWindowStation function returns a handle to an existing
2801 * window station.
2802 * Parameters: LPCTSTR lpszWinStaName name of the window station to open
2803 * BOOL fInherit specifies whether returned handle is inheritable
2804 * DWORD dwDesiredAccess specifies access of returned handle
2805 * Variables :
2806 * Result : If the function succeeds, the return value is the handle to the
2807 * specified window station.
2808 * If the function fails, the return value is NULL. To get extended
2809 * error information, call GetLastError.
2810
2811
2812 * Remark :
2813 * Status : UNTESTED STUB
2814 *
2815 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
2816 *****************************************************************************/
2817
2818HWINSTA WIN32API OpenWindowStationW(LPCTSTR lpszWinStaName,
2819 BOOL fInherit,
2820 DWORD dwDesiredAccess)
2821{
2822 dprintf(("USER32:OpenWindowStatieonW (%s,%08xh,%08x) not implemented.\n",
2823 lpszWinStaName,
2824 fInherit,
2825 dwDesiredAccess));
2826
2827 return (NULL);
2828}
2829
2830
2831/*****************************************************************************
2832 * Name : BOOL WIN32API PaintDesktop
2833 * Purpose : The PaintDesktop function fills the clipping region in the
2834 * specified device context with the desktop pattern or wallpaper.
2835 * The function is provided primarily for shell desktops.
2836 * Parameters:
2837 * Variables :
2838 * Result : If the function succeeds, the return value is TRUE.
2839 * If the function fails, the return value is FALSE.
2840 * Remark :
2841 * Status : UNTESTED STUB
2842 *
2843 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
2844 *****************************************************************************/
2845
2846BOOL WIN32API PaintDesktop(HDC hdc)
2847{
2848 dprintf(("USER32:PaintDesktop (%08x) not implemented.\n",
2849 hdc));
2850
2851 return (FALSE);
2852}
2853
2854
2855
2856/*****************************************************************************
2857 * Name : VOID WIN32API SetDebugErrorLevel
2858 * Purpose : The SetDebugErrorLevel function sets the minimum error level at
2859 * which Windows will generate debugging events and pass them to a debugger.
2860 * Parameters: DWORD dwLevel debugging error level
2861 * Variables :
2862 * Result :
2863 * Remark :
2864 * Status : UNTESTED STUB
2865 *
2866 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
2867 *****************************************************************************/
2868
2869VOID WIN32API SetDebugErrorLevel(DWORD dwLevel)
2870{
2871 dprintf(("USER32:SetDebugErrorLevel (%08x) not implemented.\n",
2872 dwLevel));
2873}
2874
2875
2876/*****************************************************************************
2877 * Name : BOOL WIN32API SetProcessWindowStation
2878 * Purpose : The SetProcessWindowStation function assigns a window station
2879 * to the calling process. This enables the process to access
2880 * objects in the window station such as desktops, the clipboard,
2881 * and global atoms. All subsequent operations on the window station
2882 * use the access rights granted to hWinSta.
2883 * Parameters:
2884 * Variables :
2885 * Result : If the function succeeds, the return value is TRUE.
2886 * If the function fails, the return value is FALSE. To get extended
2887 * error information, call GetLastError.
2888 * Remark :
2889 * Status : UNTESTED STUB
2890 *
2891 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
2892 *****************************************************************************/
2893
2894BOOL WIN32API SetProcessWindowStation(HWINSTA hWinSta)
2895{
2896 dprintf(("USER32:SetProcessWindowStation (%08x) not implemented.\n",
2897 hWinSta));
2898
2899 return (FALSE);
2900}
2901
2902
2903/*****************************************************************************
2904 * Name : BOOL WIN32API SetSystemCursor
2905 * Purpose : The SetSystemCursor function replaces the contents of the system
2906 * cursor specified by dwCursorId with the contents of the cursor
2907 * specified by hCursor, and then destroys hCursor. This function
2908 * lets an application customize the system cursors.
2909 * Parameters: HCURSOR hCursor set specified system cursor to this cursor's
2910 * contents, then destroy this
2911 * DWORD dwCursorID system cursor specified by its identifier
2912 * Variables :
2913 * Result : If the function succeeds, the return value is TRUE.
2914 * If the function fails, the return value is FALSE. To get extended
2915 * error information, call GetLastError.
2916 * Remark :
2917 * Status : UNTESTED STUB
2918 *
2919 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
2920 *****************************************************************************/
2921
2922BOOL WIN32API SetSystemCursor(HCURSOR hCursor,
2923 DWORD dwCursorId)
2924{
2925 dprintf(("USER32:SetSystemCursor (%08xh,%08x) not implemented.\n",
2926 hCursor,
2927 dwCursorId));
2928
2929 return (FALSE);
2930}
2931
2932
2933/*****************************************************************************
2934 * Name : BOOL WIN32API SetThreadDesktop
2935 * Purpose : The SetThreadDesktop function assigns a desktop to the calling
2936 * thread. All subsequent operations on the desktop use the access
2937 * rights granted to hDesk.
2938 * Parameters: HDESK hDesk handle of the desktop to assign to this thread
2939 * Variables :
2940 * Result : If the function succeeds, the return value is TRUE.
2941 * If the function fails, the return value is FALSE. To get extended
2942 * error information, call GetLastError.
2943 * Remark :
2944 * Status : UNTESTED STUB
2945 *
2946 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
2947 *****************************************************************************/
2948
2949BOOL WIN32API SetThreadDesktop(HDESK hDesktop)
2950{
2951 dprintf(("USER32:SetThreadDesktop (%08x) not implemented.\n",
2952 hDesktop));
2953
2954 return (FALSE);
2955}
2956
2957
2958/*****************************************************************************
2959 * Name : BOOL WIN32API SetUserObjectInformationA
2960 * Purpose : The SetUserObjectInformation function sets information about a
2961 * window station or desktop object.
2962 * Parameters: HANDLE hObject handle of the object for which to set information
2963 * int nIndex type of information to set
2964 * PVOID lpvInfo points to a buffer that contains the information
2965 * DWORD cbInfo size, in bytes, of lpvInfo buffer
2966 * Variables :
2967 * Result : If the function succeeds, the return value is TRUE.
2968 * If the function fails the return value is FALSE. To get extended
2969 * error information, call GetLastError.
2970 * Remark :
2971 * Status : UNTESTED STUB
2972 *
2973 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
2974 *****************************************************************************/
2975
2976BOOL WIN32API SetUserObjectInformationA(HANDLE hObject,
2977 int nIndex,
2978 PVOID lpvInfo,
2979 DWORD cbInfo)
2980{
2981 dprintf(("USER32:SetUserObjectInformationA (%08xh,%u,%08xh,%08x) not implemented.\n",
2982 hObject,
2983 nIndex,
2984 lpvInfo,
2985 cbInfo));
2986
2987 return (FALSE);
2988}
2989
2990
2991/*****************************************************************************
2992 * Name : BOOL WIN32API SetUserObjectInformationW
2993 * Purpose : The SetUserObjectInformation function sets information about a
2994 * window station or desktop object.
2995 * Parameters: HANDLE hObject handle of the object for which to set information
2996 * int nIndex type of information to set
2997 * PVOID lpvInfo points to a buffer that contains the information
2998 * DWORD cbInfo size, in bytes, of lpvInfo buffer
2999 * Variables :
3000 * Result : If the function succeeds, the return value is TRUE.
3001 * If the function fails the return value is FALSE. To get extended
3002 * error information, call GetLastError.
3003 * Remark :
3004 * Status : UNTESTED STUB
3005 *
3006 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
3007 *****************************************************************************/
3008
3009BOOL WIN32API SetUserObjectInformationW(HANDLE hObject,
3010 int nIndex,
3011 PVOID lpvInfo,
3012 DWORD cbInfo)
3013{
3014 dprintf(("USER32:SetUserObjectInformationW (%08xh,%u,%08xh,%08x) not implemented.\n",
3015 hObject,
3016 nIndex,
3017 lpvInfo,
3018 cbInfo));
3019
3020 return (FALSE);
3021}
3022
3023
3024/*****************************************************************************
3025 * Name : BOOL WIN32API SetUserObjectSecurity
3026 * Purpose : The SetUserObjectSecurity function sets the security of a user
3027 * object. This can be, for example, a window or a DDE conversation
3028 * Parameters: HANDLE hObject handle of user object
3029 * SECURITY_INFORMATION * psi address of security information
3030 * LPSECURITY_DESCRIPTOR psd address of security descriptor
3031 * Variables :
3032 * Result : If the function succeeds, the return value is TRUE.
3033 * If the function fails, the return value is FALSE. To get extended
3034 * error information, call GetLastError.
3035 * Remark :
3036 * Status : UNTESTED STUB
3037 *
3038 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
3039 *****************************************************************************/
3040
3041BOOL WIN32API SetUserObjectSecurity(HANDLE hObject,
3042 SECURITY_INFORMATION * psi,
3043 LPSECURITY_DESCRIPTOR psd)
3044{
3045 dprintf(("USER32:SetUserObjectSecuroty (%08xh,%08xh,%08x) not implemented.\n",
3046 hObject,
3047 psi,
3048 psd));
3049
3050 return (FALSE);
3051}
3052
3053
3054/*****************************************************************************
3055 * Name : int WIN32API SetWindowRgn
3056 * Purpose : The SetWindowRgn function sets the window region of a window. The
3057 * window region determines the area within the window where the
3058 * operating system permits drawing. The operating system does not
3059 * display any portion of a window that lies outside of the window region
3060 * Parameters: HWND hWnd handle to window whose window region is to be set
3061 * HRGN hRgn handle to region
3062 * BOOL bRedraw window redraw flag
3063 * Variables :
3064 * Result : If the function succeeds, the return value is non-zero.
3065 * If the function fails, the return value is zero.
3066 * Remark :
3067 * Status : UNTESTED STUB
3068 *
3069 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
3070 *****************************************************************************/
3071
3072int WIN32API SetWindowRgn(HWND hWnd,
3073 HRGN hRgn,
3074 BOOL bRedraw)
3075{
3076 dprintf(("USER32:SetWindowRgn (%08xh,%08xh,%u) not implemented.\n",
3077 hWnd,
3078 hRgn,
3079 bRedraw));
3080
3081 return (0);
3082}
3083
3084
3085/*****************************************************************************
3086 * Name : BOOL WIN32API SetWindowsHookW
3087 * Purpose : The SetWindowsHook function is not implemented in the Win32 API.
3088 * Win32-based applications should use the SetWindowsHookEx function.
3089 * Parameters:
3090 * Variables :
3091 * Result :
3092 * Remark : ARGH ! MICROSOFT !
3093 * Status : UNTESTED STUB
3094 *
3095 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
3096 *****************************************************************************/
3097
3098HHOOK WIN32API SetWindowsHookW(int nFilterType, HOOKPROC pfnFilterProc)
3099
3100{
3101 return (FALSE);
3102}
3103
3104
3105/*****************************************************************************
3106 * Name : BOOL WIN32API ShowWindowAsync
3107 * Purpose : The ShowWindowAsync function sets the show state of a window
3108 * created by a different thread.
3109 * Parameters: HWND hwnd handle of window
3110 * int nCmdShow show state of window
3111 * Variables :
3112 * Result : If the window was previously visible, the return value is TRUE.
3113 * If the window was previously hidden, the return value is FALSE.
3114 * Remark :
3115 * Status : UNTESTED STUB
3116 *
3117 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
3118 *****************************************************************************/
3119
3120BOOL WIN32API ShowWindowAsync (HWND hWnd,
3121 int nCmdShow)
3122{
3123 dprintf(("USER32:ShowWindowAsync (%08xh,%08x) not implemented.\n",
3124 hWnd,
3125 nCmdShow));
3126
3127 return (FALSE);
3128}
3129
3130
3131/*****************************************************************************
3132 * Name : BOOL WIN32API SwitchDesktop
3133 * Purpose : The SwitchDesktop function makes a desktop visible and activates
3134 * it. This enables the desktop to receive input from the user. The
3135 * calling process must have DESKTOP_SWITCHDESKTOP access to the
3136 * desktop for the SwitchDesktop function to succeed.
3137 * Parameters:
3138 * Variables :
3139 * Result : If the function succeeds, the return value is TRUE.
3140 * If the function fails, the return value is FALSE. To get extended
3141 * error information, call GetLastError.
3142 * Remark :
3143 * Status : UNTESTED STUB
3144 *
3145 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
3146 *****************************************************************************/
3147
3148BOOL WIN32API SwitchDesktop(HDESK hDesktop)
3149{
3150 dprintf(("USER32:SwitchDesktop (%08x) not implemented.\n",
3151 hDesktop));
3152
3153 return (FALSE);
3154}
3155
3156
3157/*****************************************************************************
3158 * Name : WORD WIN32API TileWindows
3159 * Purpose : The TileWindows function tiles the specified windows, or the child
3160 * windows of the specified parent window.
3161 * Parameters: HWND hwndParent handle of parent window
3162 * WORD wFlags types of windows not to arrange
3163 * LPCRECT lpRect rectangle to arrange windows in
3164 * WORD cChildrenb number of windows to arrange
3165 * const HWND *ahwndChildren array of window handles
3166 * Variables :
3167 * Result : If the function succeeds, the return value is the number of
3168 * windows arranged.
3169 * If the function fails, the return value is zero.
3170 * Remark :
3171 * Status : UNTESTED STUB
3172 *
3173 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
3174 *****************************************************************************/
3175
3176WORD WIN32API TileWindows(HWND hwndParent,
3177 UINT wFlags,
3178 const LPRECT lpRect,
3179 UINT cChildrenb,
3180 const HWND *ahwndChildren)
3181{
3182 dprintf(("USER32:TileWindows (%08xh,%08xh,%08xh,%08xh,%08x) not implemented.\n",
3183 hwndParent,
3184 wFlags,
3185 lpRect,
3186 cChildrenb,
3187 ahwndChildren));
3188
3189 return (0);
3190}
3191
3192
3193/*****************************************************************************
3194 * Name : int WIN32API ToAscii
3195 * Purpose : The ToAscii function translates the specified virtual-key code
3196 * and keyboard state to the corresponding Windows character or characters.
3197 * Parameters: UINT uVirtKey virtual-key code
3198 * UINT uScanCode scan code
3199 * PBYTE lpbKeyState address of key-state array
3200 * LPWORD lpwTransKey buffer for translated key
3201 * UINT fuState active-menu flag
3202 * Variables :
3203 * Result : 0 The specified virtual key has no translation for the current
3204 * state of the keyboard.
3205 * 1 One Windows character was copied to the buffer.
3206 * 2 Two characters were copied to the buffer. This usually happens
3207 * when a dead-key character (accent or diacritic) stored in the
3208 * keyboard layout cannot be composed with the specified virtual
3209 * key to form a single character.
3210 * Remark :
3211 * Status : UNTESTED STUB
3212 *
3213 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
3214 *****************************************************************************/
3215
3216int WIN32API ToAscii(UINT uVirtKey,
3217 UINT uScanCode,
3218 PBYTE lpbKeyState,
3219 LPWORD lpwTransKey,
3220 UINT fuState)
3221{
3222 dprintf(("USER32:ToAscii (%u,%u,%08xh,%08xh,%u) not implemented.\n",
3223 uVirtKey,
3224 uScanCode,
3225 lpbKeyState,
3226 lpwTransKey,
3227 fuState));
3228
3229 return (0);
3230}
3231
3232
3233/*****************************************************************************
3234 * Name : int WIN32API ToAsciiEx
3235 * Purpose : The ToAscii function translates the specified virtual-key code
3236 * and keyboard state to the corresponding Windows character or characters.
3237 * Parameters: UINT uVirtKey virtual-key code
3238 * UINT uScanCode scan code
3239 * PBYTE lpbKeyState address of key-state array
3240 * LPWORD lpwTransKey buffer for translated key
3241 * UINT fuState active-menu flag
3242 * HLK hlk keyboard layout handle
3243 * Variables :
3244 * Result : 0 The specified virtual key has no translation for the current
3245 * state of the keyboard.
3246 * 1 One Windows character was copied to the buffer.
3247 * 2 Two characters were copied to the buffer. This usually happens
3248 * when a dead-key character (accent or diacritic) stored in the
3249 * keyboard layout cannot be composed with the specified virtual
3250 * key to form a single character.
3251 * Remark :
3252 * Status : UNTESTED STUB
3253 *
3254 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
3255 *****************************************************************************/
3256
3257int WIN32API ToAsciiEx(UINT uVirtKey,
3258 UINT uScanCode,
3259 PBYTE lpbKeyState,
3260 LPWORD lpwTransKey,
3261 UINT fuState,
3262 HKL hkl)
3263{
3264 dprintf(("USER32:ToAsciiEx (%u,%u,%08xh,%08xh,%u,%08x) not implemented.\n",
3265 uVirtKey,
3266 uScanCode,
3267 lpbKeyState,
3268 lpwTransKey,
3269 fuState,
3270 hkl));
3271
3272 return (0);
3273}
3274
3275
3276/*****************************************************************************
3277 * Name : int WIN32API ToUnicode
3278 * Purpose : The ToUnicode function translates the specified virtual-key code
3279 * and keyboard state to the corresponding Unicode character or characters.
3280 * Parameters: UINT wVirtKey virtual-key code
3281 * UINT wScanCode scan code
3282 * PBYTE lpKeyState address of key-state array
3283 * LPWSTR pwszBuff buffer for translated key
3284 * int cchBuff size of translated key buffer
3285 * UINT wFlags set of function-conditioning flags
3286 * Variables :
3287 * Result : - 1 The specified virtual key is a dead-key character (accent or
3288 * diacritic). This value is returned regardless of the keyboard
3289 * layout, even if several characters have been typed and are
3290 * stored in the keyboard state. If possible, even with Unicode
3291 * keyboard layouts, the function has written a spacing version of
3292 * the dead-key character to the buffer specified by pwszBuffer.
3293 * For example, the function writes the character SPACING ACUTE
3294 * (0x00B4), rather than the character NON_SPACING ACUTE (0x0301).
3295 * 0 The specified virtual key has no translation for the current
3296 * state of the keyboard. Nothing was written to the buffer
3297 * specified by pwszBuffer.
3298 * 1 One character was written to the buffer specified by pwszBuffer.
3299 * 2 or more Two or more characters were written to the buffer specified by
3300 * pwszBuff. The most common cause for this is that a dead-key
3301 * character (accent or diacritic) stored in the keyboard layout
3302 * could not be combined with the specified virtual key to form a
3303 * single character.
3304 * Remark :
3305 * Status : UNTESTED STUB
3306 *
3307 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
3308 *****************************************************************************/
3309
3310int WIN32API ToUnicode(UINT uVirtKey,
3311 UINT uScanCode,
3312 PBYTE lpKeyState,
3313 LPWSTR pwszBuff,
3314 int cchBuff,
3315 UINT wFlags)
3316{
3317 dprintf(("USER32:ToUnicode (%u,%u,%08xh,%08xh,%u,%08x) not implemented.\n",
3318 uVirtKey,
3319 uScanCode,
3320 lpKeyState,
3321 pwszBuff,
3322 cchBuff,
3323 wFlags));
3324
3325 return (0);
3326}
3327
3328
3329/*****************************************************************************
3330 * Name : BOOL WIN32API UnloadKeyboardLayout
3331 * Purpose : The UnloadKeyboardLayout function removes a keyboard layout.
3332 * Parameters: HKL hkl handle of keyboard layout
3333 * Variables :
3334 * Result : If the function succeeds, the return value is the handle of the
3335 * keyboard layout; otherwise, it is NULL. To get extended error
3336 * information, use the GetLastError function.
3337 * Remark :
3338 * Status : UNTESTED STUB
3339 *
3340 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
3341 *****************************************************************************/
3342
3343BOOL WIN32API UnloadKeyboardLayout (HKL hkl)
3344{
3345 dprintf(("USER32:UnloadKeyboardLayout (%08x) not implemented.\n",
3346 hkl));
3347
3348 return (0);
3349}
3350
3351
3352/*****************************************************************************
3353 * Name : SHORT WIN32API VkKeyScanExW
3354 * Purpose : The VkKeyScanEx function translates a character to the
3355 * corresponding virtual-key code and shift state. The function
3356 * translates the character using the input language and physical
3357 * keyboard layout identified by the given keyboard layout handle.
3358 * Parameters: UINT uChar character to translate
3359 * HKL hkl keyboard layout handle
3360 * Variables :
3361 * Result : see docs
3362 * Remark :
3363 * Status : UNTESTED STUB
3364 *
3365 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
3366 *****************************************************************************/
3367
3368WORD WIN32API VkKeyScanExW(WCHAR uChar,
3369 HKL hkl)
3370{
3371 dprintf(("USER32:VkKeyScanExW (%u,%08x) not implemented.\n",
3372 uChar,
3373 hkl));
3374
3375 return (uChar);
3376}
3377
3378
3379/*****************************************************************************
3380 * Name : SHORT WIN32API VkKeyScanExA
3381 * Purpose : The VkKeyScanEx function translates a character to the
3382 * corresponding virtual-key code and shift state. The function
3383 * translates the character using the input language and physical
3384 * keyboard layout identified by the given keyboard layout handle.
3385 * Parameters: UINT uChar character to translate
3386 * HKL hkl keyboard layout handle
3387 * Variables :
3388 * Result : see docs
3389 * Remark :
3390 * Status : UNTESTED STUB
3391 *
3392 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
3393 *****************************************************************************/
3394
3395WORD WIN32API VkKeyScanExA(CHAR uChar,
3396 HKL hkl)
3397{
3398 dprintf(("USER32:VkKeyScanExA (%u,%08x) not implemented.\n",
3399 uChar,
3400 hkl));
3401
3402 return (uChar);
3403}
3404
3405
3406/*****************************************************************************
3407 * Name : VOID WIN32API keybd_event
3408 * Purpose : The keybd_event function synthesizes a keystroke. The system
3409 * can use such a synthesized keystroke to generate a WM_KEYUP or
3410 * WM_KEYDOWN message. The keyboard driver's interrupt handler calls
3411 * the keybd_event function.
3412 * Parameters: BYTE bVk virtual-key code
3413
3414 * BYTE bScan hardware scan code
3415 * DWORD dwFlags flags specifying various function options
3416 * DWORD dwExtraInfo additional data associated with keystroke
3417 * Variables :
3418 * Result :
3419 * Remark :
3420 * Status : UNTESTED STUB
3421 *
3422 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
3423 *****************************************************************************/
3424
3425VOID WIN32API keybd_event (BYTE bVk,
3426 BYTE bScan,
3427 DWORD dwFlags,
3428 DWORD dwExtraInfo)
3429{
3430 dprintf(("USER32:keybd_event (%u,%u,%08xh,%08x) not implemented.\n",
3431 bVk,
3432 bScan,
3433 dwFlags,
3434 dwExtraInfo));
3435}
3436
3437
3438/*****************************************************************************
3439 * Name : VOID WIN32API mouse_event
3440 * Purpose : The mouse_event function synthesizes mouse motion and button clicks.
3441 * Parameters: DWORD dwFlags flags specifying various motion/click variants
3442 * DWORD dx horizontal mouse position or position change
3443 * DWORD dy vertical mouse position or position change
3444 * DWORD cButtons unused, reserved for future use, set to zero
3445 * DWORD dwExtraInfo 32 bits of application-defined information
3446 * Variables :
3447 * Result :
3448 * Remark :
3449 * Status : UNTESTED STUB
3450 *
3451 * Author : Patrick Haller [Thu, 1998/02/26 11:55]
3452 *****************************************************************************/
3453
3454VOID WIN32API mouse_event(DWORD dwFlags,
3455 DWORD dx,
3456 DWORD dy,
3457 DWORD cButtons,
3458 DWORD dwExtraInfo)
3459{
3460 dprintf(("USER32:mouse_event (%08xh,%u,%u,%u,%08x) not implemented.\n",
3461 dwFlags,
3462 dx,
3463 dy,
3464 cButtons,
3465 dwExtraInfo));
3466}
3467
3468
3469/*****************************************************************************
3470 * Name : BOOL WIN32API SetShellWindow
3471 * Purpose : Unknown
3472 * Parameters: Unknown
3473 * Variables :
3474 * Result :
3475 * Remark :
3476 * Status : UNTESTED UNKNOWN STUB
3477 *
3478 * Author : Patrick Haller [Wed, 1998/06/16 11:55]
3479 *****************************************************************************/
3480
3481BOOL WIN32API SetShellWindow(DWORD x1)
3482{
3483 dprintf(("USER32: SetShellWindow(%08x) not implemented.\n",
3484 x1));
3485
3486 return (FALSE); /* default */
3487}
3488
3489
3490/*****************************************************************************
3491 * Name : BOOL WIN32API PlaySoundEvent
3492 * Purpose : Unknown
3493 * Parameters: Unknown
3494 * Variables :
3495 * Result :
3496 * Remark :
3497 * Status : UNTESTED UNKNOWN STUB
3498 *
3499 * Author : Patrick Haller [Wed, 1998/06/16 11:55]
3500 *****************************************************************************/
3501
3502BOOL WIN32API PlaySoundEvent(DWORD x1)
3503{
3504 dprintf(("USER32: PlaySoundEvent(%08x) not implemented.\n",
3505 x1));
3506
3507 return (FALSE); /* default */
3508}
3509
3510
3511/*****************************************************************************
3512 * Name : BOOL WIN32API TileChildWindows
3513 * Purpose : Unknown
3514 * Parameters: Unknown
3515 * Variables :
3516 * Result :
3517 * Remark :
3518 * Status : UNTESTED UNKNOWN STUB
3519 *
3520 * Author : Patrick Haller [Wed, 1998/06/16 11:55]
3521 *****************************************************************************/
3522
3523BOOL WIN32API TileChildWindows(DWORD x1,
3524 DWORD x2)
3525{
3526 dprintf(("USER32: TileChildWindows(%08xh,%08xh) not implemented.\n",
3527 x1,
3528 x2));
3529
3530 return (FALSE); /* default */
3531}
3532
3533
3534/*****************************************************************************
3535 * Name : BOOL WIN32API SetSysColorsTemp
3536 * Purpose : Unknown
3537 * Parameters: Unknown
3538 * Variables :
3539 * Result :
3540 * Remark :
3541 * Status : UNTESTED UNKNOWN STUB
3542 *
3543 * Author : Patrick Haller [Wed, 1998/06/16 11:55]
3544 *****************************************************************************/
3545
3546BOOL WIN32API SetSysColorsTemp(void)
3547{
3548 dprintf(("USER32: SetSysColorsTemp() not implemented.\n"));
3549
3550 return (FALSE); /* default */
3551}
3552
3553
3554/*****************************************************************************
3555 * Name : BOOL WIN32API RegisterNetworkCapabilities
3556 * Purpose : Unknown
3557 * Parameters: Unknown
3558 * Variables :
3559 * Result :
3560 * Remark :
3561 * Status : UNTESTED UNKNOWN STUB
3562 *
3563 * Author : Patrick Haller [Wed, 1998/06/16 11:55]
3564 *****************************************************************************/
3565
3566BOOL WIN32API RegisterNetworkCapabilities(DWORD x1,
3567 DWORD x2)
3568{
3569 dprintf(("USER32: RegisterNetworkCapabilities(%08xh,%08xh) not implemented.\n",
3570 x1,
3571 x2));
3572
3573 return (FALSE); /* default */
3574}
3575
3576
3577/*****************************************************************************
3578 * Name : BOOL WIN32API EndTask
3579 * Purpose : Unknown
3580 * Parameters: Unknown
3581 * Variables :
3582 * Result :
3583 * Remark :
3584 * Status : UNTESTED UNKNOWN STUB
3585 *
3586 * Author : Patrick Haller [Wed, 1998/06/16 11:55]
3587 *****************************************************************************/
3588
3589BOOL WIN32API EndTask(DWORD x1,
3590 DWORD x2,
3591 DWORD x3)
3592{
3593 dprintf(("USER32: EndTask(%08xh,%08xh,%08xh) not implemented.\n",
3594 x1,
3595 x2,
3596 x3));
3597
3598 return (FALSE); /* default */
3599}
3600
3601
3602
3603/*****************************************************************************
3604 * Name : BOOL WIN32API GetNextQueueWindow
3605 * Purpose : Unknown
3606 * Parameters: Unknown
3607 * Variables :
3608 * Result :
3609 * Remark :
3610 * Status : UNTESTED UNKNOWN STUB
3611 *
3612 * Author : Patrick Haller [Wed, 1998/06/16 11:55]
3613 *****************************************************************************/
3614
3615BOOL WIN32API GetNextQueueWindow(DWORD x1,
3616 DWORD x2)
3617{
3618 dprintf(("USER32: GetNextQueueWindow(%08xh,%08xh) not implemented.\n",
3619 x1,
3620 x2));
3621
3622 return (FALSE); /* default */
3623}
3624
3625
3626/*****************************************************************************
3627 * Name : BOOL WIN32API YieldTask
3628 * Purpose : Unknown
3629 * Parameters: Unknown
3630 * Variables :
3631 * Result :
3632 * Remark :
3633 * Status : UNTESTED UNKNOWN STUB
3634 *
3635 * Author : Patrick Haller [Wed, 1998/06/16 11:55]
3636 *****************************************************************************/
3637
3638BOOL WIN32API YieldTask(void)
3639{
3640 dprintf(("USER32: YieldTask() not implemented.\n"));
3641
3642 return (FALSE); /* default */
3643}
3644
3645
3646/*****************************************************************************
3647 * Name : BOOL WIN32API WinOldAppHackoMatic
3648 * Purpose : Unknown
3649 * Parameters: Unknown
3650 * Variables :
3651 * Result :
3652 * Remark :
3653 * Status : UNTESTED UNKNOWN STUB
3654 *
3655 * Author : Patrick Haller [Wed, 1998/06/16 11:55]
3656 *****************************************************************************/
3657
3658BOOL WIN32API WinOldAppHackoMatic(DWORD x1)
3659{
3660 dprintf(("USER32: WinOldAppHackoMatic(%08x) not implemented.\n",
3661 x1));
3662
3663 return (FALSE); /* default */
3664}
3665
3666
3667/*****************************************************************************
3668 * Name : BOOL WIN32API DragObject
3669 * Purpose : Unknown
3670 * Parameters: Unknown
3671 * Variables :
3672 * Result :
3673 * Remark :
3674 * Status : UNTESTED UNKNOWN STUB
3675 *
3676 * Author : Patrick Haller [Wed, 1998/06/16 11:55]
3677 *****************************************************************************/
3678
3679DWORD WIN32API DragObject(HWND x1,HWND x2,UINT x3,DWORD x4,HCURSOR x5)
3680{
3681 dprintf(("USER32: DragObject(%08x,%08xh,%08xh,%08xh,%08xh) not implemented.\n",
3682 x1,
3683 x2,
3684 x3,
3685 x4,
3686 x5));
3687
3688 return (FALSE); /* default */
3689}
3690
3691
3692/*****************************************************************************
3693 * Name : BOOL WIN32API CascadeChildWindows
3694 * Purpose : Unknown
3695 * Parameters: Unknown
3696 * Variables :
3697 * Result :
3698 * Remark :
3699 * Status : UNTESTED UNKNOWN STUB
3700 *
3701 * Author : Patrick Haller [Wed, 1998/06/16 11:55]
3702 *****************************************************************************/
3703
3704BOOL WIN32API CascadeChildWindows(DWORD x1,
3705 DWORD x2)
3706{
3707 dprintf(("USER32: CascadeChildWindows(%08xh,%08xh) not implemented.\n",
3708 x1,
3709 x2));
3710
3711 return (FALSE); /* default */
3712}
3713
3714
3715/*****************************************************************************
3716 * Name : BOOL WIN32API RegisterSystemThread
3717 * Purpose : Unknown
3718 * Parameters: Unknown
3719 * Variables :
3720 * Result :
3721 * Remark :
3722 * Status : UNTESTED UNKNOWN STUB
3723 *
3724 * Author : Patrick Haller [Wed, 1998/06/16 11:55]
3725 *****************************************************************************/
3726
3727BOOL WIN32API RegisterSystemThread(DWORD x1,
3728 DWORD x2)
3729{
3730 dprintf(("USER32: RegisterSystemThread(%08xh,%08xh) not implemented.\n",
3731 x1,
3732 x2));
3733
3734 return (FALSE); /* default */
3735}
3736
3737
3738/*****************************************************************************
3739 * Name : BOOL WIN32API IsHungThread
3740 * Purpose : Unknown
3741 * Parameters: Unknown
3742 * Variables :
3743 * Result :
3744 * Remark :
3745 * Status : UNTESTED UNKNOWN STUB
3746 *
3747 * Author : Patrick Haller [Wed, 1998/06/16 11:55]
3748 *****************************************************************************/
3749
3750BOOL WIN32API IsHungThread(DWORD x1)
3751{
3752 dprintf(("USER32: IsHungThread(%08xh) not implemented.\n",
3753 x1));
3754
3755 return (FALSE); /* default */
3756}
3757
3758
3759
3760/*****************************************************************************
3761 * Name : BOOL WIN32API UserSignalProc
3762 * Purpose : Unknown
3763 * Parameters: Unknown
3764 * Variables :
3765 * Result :
3766 * Remark :
3767 * Status : UNTESTED UNKNOWN STUB
3768 *
3769 * Author : Patrick Haller [Wed, 1998/06/16 11:55]
3770 *****************************************************************************/
3771
3772BOOL WIN32API UserSignalProc(DWORD x1,
3773 DWORD x2,
3774 DWORD x3,
3775 DWORD x4)
3776{
3777 dprintf(("USER32: SysErrorBox(%08xh,%08xh,%08xh,%08xh) not implemented.\n",
3778 x1,
3779 x2,
3780 x3,
3781 x4));
3782
3783 return (FALSE); /* default */
3784}
3785
3786
3787/*****************************************************************************
3788 * Name : BOOL WIN32API GetShellWindow
3789 * Purpose : Unknown
3790 * Parameters: Unknown
3791 * Variables :
3792 * Result :
3793 * Remark :
3794 * Status : UNTESTED UNKNOWN STUB
3795 *
3796 * Author : Patrick Haller [Wed, 1998/06/16 11:55]
3797 *****************************************************************************/
3798
3799HWND WIN32API GetShellWindow(void)
3800{
3801 dprintf(("USER32: GetShellWindow() not implemented.\n"));
3802
3803 return (0); /* default */
3804}
3805
3806
3807
3808/***********************************************************************
3809 * RegisterTasklist32 [USER32.436]
3810 */
3811DWORD WIN32API RegisterTasklist (DWORD x)
3812{
3813 dprintf(("USER32: RegisterTasklist(%08xh) not implemented.\n",
3814 x));
3815
3816 return TRUE;
3817}
3818
3819
Note: See TracBrowser for help on using the repository browser.