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

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

* empty log message *

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