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

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

Dialog changes

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