Made user compile with -DSTRICT.
[wine] / windows / user.c
1 /*
2  * Misc. USER functions
3  *
4  * Copyright 1993 Robert J. Amstadt
5  *           1996 Alex Korobka
6  *
7  * This library is free software; you can redistribute it and/or
8  * modify it under the terms of the GNU Lesser General Public
9  * License as published by the Free Software Foundation; either
10  * version 2.1 of the License, or (at your option) any later version.
11  *
12  * This library is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
15  * Lesser General Public License for more details.
16  *
17  * You should have received a copy of the GNU Lesser General Public
18  * License along with this library; if not, write to the Free Software
19  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
20  */
21
22 #include <stdlib.h>
23 #include <string.h>
24 #include "wine/winbase16.h"
25 #include "windef.h"
26 #include "wingdi.h"
27 #include "winuser.h"
28 #include "wine/winuser16.h"
29 #include "user.h"
30 #include "win.h"
31 #include "controls.h"
32 #include "cursoricon.h"
33 #include "message.h"
34 #include "miscemu.h"
35 #include "sysmetrics.h"
36 #include "local.h"
37 #include "module.h"
38 #include "winternl.h"
39 #include "wine/debug.h"
40
41 WINE_DECLARE_DEBUG_CHANNEL(hook);
42 WINE_DECLARE_DEBUG_CHANNEL(local);
43 WINE_DECLARE_DEBUG_CHANNEL(system);
44 WINE_DECLARE_DEBUG_CHANNEL(win);
45 WINE_DECLARE_DEBUG_CHANNEL(win32);
46
47 SYSLEVEL USER_SysLevel = { CRITICAL_SECTION_INIT("USER_SysLevel"), 2 };
48
49
50 /***********************************************************************
51  *              GetFreeSystemResources (USER.284)
52  */
53 WORD WINAPI GetFreeSystemResources16( WORD resType )
54 {
55     HINSTANCE16 gdi_inst;
56     WORD gdi_heap;
57     int userPercent, gdiPercent;
58
59     if ((gdi_inst = LoadLibrary16( "GDI" )) < 32) return 0;
60     gdi_heap = gdi_inst | 7;
61
62     switch(resType)
63     {
64     case GFSR_USERRESOURCES:
65         userPercent = (int)LOCAL_CountFree( USER_HeapSel ) * 100 /
66                                LOCAL_HeapSize( USER_HeapSel );
67         gdiPercent  = 100;
68         break;
69
70     case GFSR_GDIRESOURCES:
71         gdiPercent  = (int)LOCAL_CountFree( gdi_inst ) * 100 /
72                                LOCAL_HeapSize( gdi_inst );
73         userPercent = 100;
74         break;
75
76     case GFSR_SYSTEMRESOURCES:
77         userPercent = (int)LOCAL_CountFree( USER_HeapSel ) * 100 /
78                                LOCAL_HeapSize( USER_HeapSel );
79         gdiPercent  = (int)LOCAL_CountFree( gdi_inst ) * 100 /
80                                LOCAL_HeapSize( gdi_inst );
81         break;
82
83     default:
84         userPercent = gdiPercent = 0;
85         break;
86     }
87     FreeLibrary16( gdi_inst );
88     TRACE_(local)("<- userPercent %d, gdiPercent %d\n", userPercent, gdiPercent);
89     return (WORD)min( userPercent, gdiPercent );
90 }
91
92
93 /**********************************************************************
94  *              InitApp (USER.5)
95  */
96 INT16 WINAPI InitApp16( HINSTANCE16 hInstance )
97 {
98     /* Create task message queue */
99     if ( !InitThreadInput16( 0, 0 ) ) return 0;
100
101     return 1;
102 }
103
104
105 /***********************************************************************
106  *           USER_Lock
107  */
108 void USER_Lock(void)
109 {
110     _EnterSysLevel( &USER_SysLevel );
111 }
112
113
114 /***********************************************************************
115  *           USER_Unlock
116  */
117 void USER_Unlock(void)
118 {
119     _LeaveSysLevel( &USER_SysLevel );
120 }
121
122
123 /***********************************************************************
124  *           USER_CheckNotLock
125  *
126  * Make sure that we don't hold the user lock.
127  */
128 void USER_CheckNotLock(void)
129 {
130     _CheckNotSysLevel( &USER_SysLevel );
131 }
132
133
134 /**********************************************************************
135  *           USER_ModuleUnload
136  */
137 static void USER_ModuleUnload( HMODULE16 hModule )
138 {
139     /* HOOK_FreeModuleHooks( hModule ); */
140     CLASS_FreeModuleClasses( hModule );
141     CURSORICON_FreeModuleIcons( hModule );
142 }
143
144 /***********************************************************************
145  *              SignalProc (USER.314)
146  */
147 void WINAPI USER_SignalProc( HANDLE16 hTaskOrModule, UINT16 uCode,
148                              UINT16 uExitFn, HINSTANCE16 hInstance,
149                              HQUEUE16 hQueue )
150 {
151     FIXME_(win)("Win 3.1 USER signal %04x\n", uCode );
152 }
153
154 /***********************************************************************
155  *              FinalUserInit (USER.400)
156  */
157 void WINAPI FinalUserInit16( void )
158 {
159     /* FIXME: Should chain to FinalGdiInit now. */
160 }
161
162 /***********************************************************************
163  *              SignalProc32 (USER.391)
164  *              UserSignalProc (USER32.@)
165  *
166  * For comments about the meaning of uCode and dwFlags
167  * see PROCESS_CallUserSignalProc.
168  *
169  */
170 WORD WINAPI UserSignalProc( UINT uCode, DWORD dwThreadOrProcessID,
171                             DWORD dwFlags, HMODULE16 hModule )
172 {
173     /* FIXME: Proper reaction to most signals still missing. */
174
175     switch ( uCode )
176     {
177     case USIG_DLL_UNLOAD_WIN16:
178     case USIG_DLL_UNLOAD_WIN32:
179         USER_ModuleUnload( hModule );
180         break;
181
182     case USIG_DLL_UNLOAD_ORPHANS:
183     case USIG_FAULT_DIALOG_PUSH:
184     case USIG_FAULT_DIALOG_POP:
185     case USIG_THREAD_INIT:
186     case USIG_THREAD_EXIT:
187     case USIG_PROCESS_CREATE:
188     case USIG_PROCESS_INIT:
189     case USIG_PROCESS_LOADED:
190     case USIG_PROCESS_RUNNING:
191     case USIG_PROCESS_EXIT:
192     case USIG_PROCESS_DESTROY:
193       break;
194
195     default:
196         FIXME_(win)("(%04x, %08lx, %04lx, %04x)\n",
197                     uCode, dwThreadOrProcessID, dwFlags, hModule );
198         break;
199     }
200
201     /* FIXME: Should chain to GdiSignalProc now. */
202
203     return 0;
204 }
205
206 /***********************************************************************
207  *              ExitWindows (USER.7)
208  */
209 BOOL16 WINAPI ExitWindows16( DWORD dwReturnCode, UINT16 wReserved )
210 {
211     return ExitWindowsEx( EWX_LOGOFF, 0xffffffff );
212 }
213
214
215 /***********************************************************************
216  *              ExitWindowsExec (USER.246)
217  */
218 BOOL16 WINAPI ExitWindowsExec16( LPCSTR lpszExe, LPCSTR lpszParams )
219 {
220     TRACE_(system)("Should run the following in DOS-mode: \"%s %s\"\n",
221         lpszExe, lpszParams);
222     return ExitWindowsEx( EWX_LOGOFF, 0xffffffff );
223 }
224
225
226 /***********************************************************************
227  *              ExitWindowsEx (USER32.@)
228  */
229 BOOL WINAPI ExitWindowsEx( UINT flags, DWORD reserved )
230 {
231     int i;
232     BOOL result;
233     HWND *list, *phwnd;
234
235     /* We have to build a list of all windows first, as in EnumWindows */
236
237     if (!(list = WIN_ListChildren( GetDesktopWindow() ))) return FALSE;
238
239     /* Send a WM_QUERYENDSESSION message to every window */
240
241     for (i = 0; list[i]; i++)
242     {
243         /* Make sure that the window still exists */
244         if (!IsWindow( list[i] )) continue;
245         if (!SendMessageW( list[i], WM_QUERYENDSESSION, 0, 0 )) break;
246     }
247     result = !list[i];
248
249     /* Now notify all windows that got a WM_QUERYENDSESSION of the result */
250
251     for (phwnd = list; i > 0; i--, phwnd++)
252     {
253         if (!IsWindow( *phwnd )) continue;
254         SendMessageW( *phwnd, WM_ENDSESSION, result, 0 );
255     }
256     HeapFree( GetProcessHeap(), 0, list );
257
258     if (result) ExitKernel16();
259     return FALSE;
260 }
261
262 static void _dump_CDS_flags(DWORD flags) {
263 #define X(x) if (flags & CDS_##x) MESSAGE(""#x ",");
264         X(UPDATEREGISTRY);X(TEST);X(FULLSCREEN);X(GLOBAL);
265         X(SET_PRIMARY);X(RESET);X(SETRECT);X(NORESET);
266 #undef X
267 }
268
269 /***********************************************************************
270  *              ChangeDisplaySettingsA (USER32.@)
271  */
272 LONG WINAPI ChangeDisplaySettingsA( LPDEVMODEA devmode, DWORD flags )
273 {
274   FIXME_(system)("(%p,0x%08lx), stub\n",devmode,flags);
275   MESSAGE("\tflags=");_dump_CDS_flags(flags);MESSAGE("\n");
276   if (devmode==NULL)
277     FIXME_(system)("   devmode=NULL (return to default mode)\n");
278   else if ( (devmode->dmBitsPerPel != GetSystemMetrics(SM_WINE_BPP))
279             || (devmode->dmPelsHeight != GetSystemMetrics(SM_CYSCREEN))
280             || (devmode->dmPelsWidth != GetSystemMetrics(SM_CXSCREEN)) )
281
282   {
283
284     if (devmode->dmFields & DM_BITSPERPEL)
285       FIXME_(system)("   bpp=%ld\n",devmode->dmBitsPerPel);
286     if (devmode->dmFields & DM_PELSWIDTH)
287       FIXME_(system)("   width=%ld\n",devmode->dmPelsWidth);
288     if (devmode->dmFields & DM_PELSHEIGHT)
289       FIXME_(system)("   height=%ld\n",devmode->dmPelsHeight);
290     FIXME_(system)(" (Putting X in this mode beforehand might help)\n");
291     /* we don't, but the program ... does not need to know */
292     return DISP_CHANGE_SUCCESSFUL;
293   }
294   return DISP_CHANGE_SUCCESSFUL;
295 }
296
297 /***********************************************************************
298  *              ChangeDisplaySettings (USER.620)
299  */
300 LONG WINAPI ChangeDisplaySettings16( LPDEVMODEA devmode, DWORD flags )
301 {
302         TRACE_(system)("(%p,0x%08lx), stub\n",devmode,flags);
303         return ChangeDisplaySettingsA(devmode, flags);
304 }
305
306 /***********************************************************************
307  *              ChangeDisplaySettingsExA (USER32.@)
308  */
309 LONG WINAPI ChangeDisplaySettingsExA(
310         LPCSTR devname, LPDEVMODEA devmode, HWND hwnd, DWORD flags,
311         LPARAM lparam
312 ) {
313   FIXME_(system)("(%s,%p,%p,0x%08lx,0x%08lx), stub\n",devname,devmode,hwnd,flags,lparam);
314   MESSAGE("\tflags=");_dump_CDS_flags(flags);MESSAGE("\n");
315   if (devmode==NULL)
316     FIXME_(system)("   devmode=NULL (return to default mode)\n");
317   else if ( (devmode->dmBitsPerPel != GetSystemMetrics(SM_WINE_BPP))
318             || (devmode->dmPelsHeight != GetSystemMetrics(SM_CYSCREEN))
319             || (devmode->dmPelsWidth != GetSystemMetrics(SM_CXSCREEN)) )
320
321   {
322
323     if (devmode->dmFields & DM_BITSPERPEL)
324       FIXME_(system)("   bpp=%ld\n",devmode->dmBitsPerPel);
325     if (devmode->dmFields & DM_PELSWIDTH)
326       FIXME_(system)("   width=%ld\n",devmode->dmPelsWidth);
327     if (devmode->dmFields & DM_PELSHEIGHT)
328       FIXME_(system)("   height=%ld\n",devmode->dmPelsHeight);
329     FIXME_(system)(" (Putting X in this mode beforehand might help)\n");
330     /* we don't, but the program ... does not need to know */
331     return DISP_CHANGE_SUCCESSFUL;
332   }
333   return DISP_CHANGE_SUCCESSFUL;
334 }
335
336 /***********************************************************************
337  *              EnumDisplaySettingsW (USER32.@)
338  * FIXME: Currently uses static list of modes.
339  *
340  * RETURNS
341  *      TRUE if nth setting exists found (described in the LPDEVMODEW struct)
342  *      FALSE if we do not have the nth setting
343  */
344 BOOL WINAPI EnumDisplaySettingsW(
345         LPCWSTR name,           /* [in] huh? */
346         DWORD n,                /* [in] nth entry in display settings list*/
347         LPDEVMODEW devmode      /* [out] devmode for that setting */
348 ) {
349 #define NRMODES 5
350 #define NRDEPTHS 4
351         struct {
352                 int w,h;
353         } modes[NRMODES]={{512,384},{640,400},{640,480},{800,600},{1024,768}};
354         int depths[4] = {8,16,24,32};
355
356         TRACE_(system)("(%s,%ld,%p)\n",debugstr_w(name),n,devmode);
357         devmode->dmDisplayFlags = 0;
358         devmode->dmDisplayFrequency = 85;
359         if (n==0 || n == (DWORD)-1 || n == (DWORD)-2) {
360                 devmode->dmBitsPerPel = GetSystemMetrics(SM_WINE_BPP);
361                 devmode->dmPelsHeight = GetSystemMetrics(SM_CYSCREEN);
362                 devmode->dmPelsWidth  = GetSystemMetrics(SM_CXSCREEN);
363                 return TRUE;
364         }
365         if ((n-1)<NRMODES*NRDEPTHS) {
366                 devmode->dmBitsPerPel   = depths[(n-1)/NRMODES];
367                 devmode->dmPelsHeight   = modes[(n-1)%NRMODES].h;
368                 devmode->dmPelsWidth    = modes[(n-1)%NRMODES].w;
369                 return TRUE;
370         }
371         return FALSE;
372 }
373
374 /***********************************************************************
375  *              EnumDisplaySettingsA (USER32.@)
376  */
377 BOOL WINAPI EnumDisplaySettingsA(LPCSTR name,DWORD n,LPDEVMODEA devmode)
378 {
379     DEVMODEW devmodeW;
380     BOOL ret;
381     UNICODE_STRING nameW;
382
383     if (name) RtlCreateUnicodeStringFromAsciiz(&nameW, name);
384     else nameW.Buffer = NULL;
385
386     ret = EnumDisplaySettingsW(nameW.Buffer,n,&devmodeW);
387     if (ret)
388     {
389         devmode->dmBitsPerPel       = devmodeW.dmBitsPerPel;
390         devmode->dmPelsHeight       = devmodeW.dmPelsHeight;
391         devmode->dmPelsWidth        = devmodeW.dmPelsWidth;
392         devmode->dmDisplayFlags     = devmodeW.dmDisplayFlags;
393         devmode->dmDisplayFrequency = devmodeW.dmDisplayFrequency;
394         /* FIXME: convert rest too, if they are ever returned */
395     }
396     RtlFreeUnicodeString(&nameW);
397     return ret;
398 }
399
400 /***********************************************************************
401  *              EnumDisplaySettings (USER.621)
402  */
403 BOOL16 WINAPI EnumDisplaySettings16(
404         LPCSTR name,            /* [in] huh? */
405         DWORD n,                /* [in] nth entry in display settings list*/
406         LPDEVMODEA devmode      /* [out] devmode for that setting */
407 ) {
408         TRACE_(system)("(%s, %ld, %p)\n", name, n, devmode);
409         return (BOOL16)EnumDisplaySettingsA(name, n, devmode);
410 }
411
412 /***********************************************************************
413  *              EnumDisplaySettingsExA (USER32.@)
414  */
415 BOOL WINAPI EnumDisplaySettingsExA(LPCSTR lpszDeviceName, DWORD iModeNum,
416                                    LPDEVMODEA lpDevMode, DWORD dwFlags)
417 {
418         TRACE_(system)("(%s,%lu,%p,%08lx): stub\n",
419                        debugstr_a(lpszDeviceName), iModeNum, lpDevMode, dwFlags);
420
421         return EnumDisplaySettingsA(lpszDeviceName, iModeNum, lpDevMode);
422 }
423
424 /***********************************************************************
425  *              EnumDisplaySettingsExW (USER32.@)
426  */
427 BOOL WINAPI EnumDisplaySettingsExW(LPCWSTR lpszDeviceName, DWORD iModeNum,
428                                    LPDEVMODEW lpDevMode, DWORD dwFlags)
429 {
430         TRACE_(system)("(%s,%lu,%p,%08lx): stub\n",
431                         debugstr_w(lpszDeviceName), iModeNum, lpDevMode, dwFlags);
432
433         return EnumDisplaySettingsW(lpszDeviceName, iModeNum, lpDevMode);
434 }
435
436 /***********************************************************************
437  *              EnumDisplayDevicesA (USER32.@)
438  */
439 BOOL WINAPI EnumDisplayDevicesA(
440         LPVOID unused,DWORD i,LPDISPLAY_DEVICEA lpDisplayDevice,DWORD dwFlags
441 ) {
442         if (i)
443                 return FALSE;
444         FIXME_(system)("(%p,%ld,%p,0x%08lx), stub!\n",unused,i,lpDisplayDevice,dwFlags);
445         strcpy(lpDisplayDevice->DeviceName,"X11");
446         strcpy(lpDisplayDevice->DeviceString,"X 11 Windowing System");
447         lpDisplayDevice->StateFlags =
448                         DISPLAY_DEVICE_ATTACHED_TO_DESKTOP      |
449                         DISPLAY_DEVICE_PRIMARY_DEVICE           |
450                         DISPLAY_DEVICE_VGA_COMPATIBLE;
451         return TRUE;
452 }
453
454 /***********************************************************************
455  *              EnumDisplayDevicesW (USER32.@)
456  */
457 BOOL WINAPI EnumDisplayDevicesW(
458         LPVOID unused,DWORD i,LPDISPLAY_DEVICEW lpDisplayDevice,DWORD dwFlags
459 ) {
460         if (i)
461                 return FALSE;
462         FIXME_(system)("(%p,%ld,%p,0x%08lx), stub!\n",unused,i,lpDisplayDevice,dwFlags);
463         MultiByteToWideChar( CP_ACP, 0, "X11", -1, lpDisplayDevice->DeviceName,
464                              sizeof(lpDisplayDevice->DeviceName)/sizeof(WCHAR) );
465         MultiByteToWideChar( CP_ACP, 0, "X11 Windowing System", -1, lpDisplayDevice->DeviceString,
466                              sizeof(lpDisplayDevice->DeviceString)/sizeof(WCHAR) );
467         lpDisplayDevice->StateFlags =
468                         DISPLAY_DEVICE_ATTACHED_TO_DESKTOP      |
469                         DISPLAY_DEVICE_PRIMARY_DEVICE           |
470                         DISPLAY_DEVICE_VGA_COMPATIBLE;
471         return TRUE;
472 }
473
474 /***********************************************************************
475  *              SetEventHook (USER.321)
476  *
477  *      Used by Turbo Debugger for Windows
478  */
479 FARPROC16 WINAPI SetEventHook16(FARPROC16 lpfnEventHook)
480 {
481         FIXME_(hook)("(lpfnEventHook=%08x): stub\n", (UINT)lpfnEventHook);
482         return NULL;
483 }
484
485 /***********************************************************************
486  *              UserSeeUserDo (USER.216)
487  */
488 DWORD WINAPI UserSeeUserDo16(WORD wReqType, WORD wParam1, WORD wParam2, WORD wParam3)
489 {
490     switch (wReqType)
491     {
492     case USUD_LOCALALLOC:
493         return LOCAL_Alloc(USER_HeapSel, wParam1, wParam3);
494     case USUD_LOCALFREE:
495         return LOCAL_Free(USER_HeapSel, wParam1);
496     case USUD_LOCALCOMPACT:
497         return LOCAL_Compact(USER_HeapSel, wParam3, 0);
498     case USUD_LOCALHEAP:
499         return USER_HeapSel;
500     case USUD_FIRSTCLASS:
501         FIXME_(local)("return a pointer to the first window class.\n");
502         return (DWORD)-1;
503     default:
504         WARN_(local)("wReqType %04x (unknown)", wReqType);
505         return (DWORD)-1;
506     }
507 }
508
509 /***********************************************************************
510  *              GetSystemDebugState (USER.231)
511  */
512 WORD WINAPI GetSystemDebugState16(void)
513 {
514     return 0;  /* FIXME */
515 }
516
517 /***********************************************************************
518  *              RegisterLogonProcess (USER32.@)
519  */
520 DWORD WINAPI RegisterLogonProcess(HANDLE hprocess,BOOL x) {
521         FIXME_(win32)("(%p,%d),stub!\n",hprocess,x);
522         return 1;
523 }
524
525 /***********************************************************************
526  *              CreateWindowStationW (USER32.@)
527  */
528 HWINSTA WINAPI CreateWindowStationW(
529         LPWSTR winstation,DWORD res1,DWORD desiredaccess,
530         LPSECURITY_ATTRIBUTES lpsa
531 ) {
532         FIXME_(win32)("(%s,0x%08lx,0x%08lx,%p),stub!\n",debugstr_w(winstation),
533                 res1,desiredaccess,lpsa
534         );
535         return (HWINSTA)0xdeadcafe;
536 }
537
538 /***********************************************************************
539  *              SetProcessWindowStation (USER32.@)
540  */
541 BOOL WINAPI SetProcessWindowStation(HWINSTA hWinSta) {
542         FIXME_(win32)("(%p),stub!\n",hWinSta);
543         return TRUE;
544 }
545
546 /***********************************************************************
547  *              SetUserObjectSecurity (USER32.@)
548  */
549 BOOL WINAPI SetUserObjectSecurity(
550         HANDLE hObj,
551         PSECURITY_INFORMATION pSIRequested,
552         PSECURITY_DESCRIPTOR pSID
553 ) {
554         FIXME_(win32)("(%p,%p,%p),stub!\n",hObj,pSIRequested,pSID);
555         return TRUE;
556 }
557
558 /***********************************************************************
559  *              CreateDesktopA (USER32.@)
560  */
561 HDESK WINAPI CreateDesktopA(
562         LPSTR lpszDesktop,LPSTR lpszDevice,LPDEVMODEA pDevmode,
563         DWORD dwFlags,DWORD dwDesiredAccess,LPSECURITY_ATTRIBUTES lpsa
564 ) {
565         FIXME_(win32)("(%s,%s,%p,0x%08lx,0x%08lx,%p),stub!\n",
566                 lpszDesktop,lpszDevice,pDevmode,
567                 dwFlags,dwDesiredAccess,lpsa
568         );
569         return (HDESK)0xcafedead;
570 }
571
572 /***********************************************************************
573  *              CreateDesktopW (USER32.@)
574  */
575 HDESK WINAPI CreateDesktopW(
576         LPWSTR lpszDesktop,LPWSTR lpszDevice,LPDEVMODEW pDevmode,
577         DWORD dwFlags,DWORD dwDesiredAccess,LPSECURITY_ATTRIBUTES lpsa
578 ) {
579         FIXME_(win32)("(%s,%s,%p,0x%08lx,0x%08lx,%p),stub!\n",
580                 debugstr_w(lpszDesktop),debugstr_w(lpszDevice),pDevmode,
581                 dwFlags,dwDesiredAccess,lpsa
582         );
583         return (HDESK)0xcafedead;
584 }
585
586 /***********************************************************************
587  *              EnumDesktopWindows (USER32.@)
588  */
589 BOOL WINAPI EnumDesktopWindows( HDESK hDesktop, WNDENUMPROC lpfn, LPARAM lParam ) {
590   FIXME_(win32)("(%p, %p, 0x%08lx), stub!\n", hDesktop, lpfn, lParam );
591   return TRUE;
592 }
593
594
595 /***********************************************************************
596  *              CloseWindowStation (USER32.@)
597  */
598 BOOL WINAPI CloseWindowStation(HWINSTA hWinSta)
599 {
600     FIXME_(win32)("(%p)\n", hWinSta);
601     return TRUE;
602 }
603
604 /***********************************************************************
605  *              CloseDesktop (USER32.@)
606  */
607 BOOL WINAPI CloseDesktop(HDESK hDesk)
608 {
609     FIXME_(win32)("(%p)\n", hDesk);
610     return TRUE;
611 }
612
613 /***********************************************************************
614  *              SetWindowStationUser (USER32.@)
615  */
616 DWORD WINAPI SetWindowStationUser(DWORD x1,DWORD x2) {
617         FIXME_(win32)("(0x%08lx,0x%08lx),stub!\n",x1,x2);
618         return 1;
619 }
620
621 /***********************************************************************
622  *              SetLogonNotifyWindow (USER32.@)
623  */
624 DWORD WINAPI SetLogonNotifyWindow(HWINSTA hwinsta,HWND hwnd) {
625         FIXME_(win32)("(%p,%p),stub!\n",hwinsta,hwnd);
626         return 1;
627 }
628
629 /***********************************************************************
630  *              LoadLocalFonts (USER32.@)
631  */
632 VOID WINAPI LoadLocalFonts(VOID) {
633         /* are loaded. */
634         return;
635 }
636 /***********************************************************************
637  *              GetUserObjectInformationA (USER32.@)
638  */
639 BOOL WINAPI GetUserObjectInformationA( HANDLE hObj, INT nIndex, LPVOID pvInfo, DWORD nLength, LPDWORD lpnLen )
640 {       FIXME_(win32)("(%p %i %p %ld %p),stub!\n", hObj, nIndex, pvInfo, nLength, lpnLen );
641         return TRUE;
642 }
643 /***********************************************************************
644  *              GetUserObjectInformationW (USER32.@)
645  */
646 BOOL WINAPI GetUserObjectInformationW( HANDLE hObj, INT nIndex, LPVOID pvInfo, DWORD nLength, LPDWORD lpnLen )
647 {       FIXME_(win32)("(%p %i %p %ld %p),stub!\n", hObj, nIndex, pvInfo, nLength, lpnLen );
648         return TRUE;
649 }
650 /***********************************************************************
651  *              GetUserObjectSecurity (USER32.@)
652  */
653 BOOL WINAPI GetUserObjectSecurity(HANDLE hObj, PSECURITY_INFORMATION pSIRequested,
654         PSECURITY_DESCRIPTOR pSID, DWORD nLength, LPDWORD lpnLengthNeeded)
655 {       FIXME_(win32)("(%p %p %p len=%ld %p),stub!\n",  hObj, pSIRequested, pSID, nLength, lpnLengthNeeded);
656         return TRUE;
657 }
658
659 /***********************************************************************
660  *              SetSystemCursor (USER32.@)
661  */
662 BOOL WINAPI SetSystemCursor(HCURSOR hcur, DWORD id)
663 {       FIXME_(win32)("(%p,%08lx),stub!\n",  hcur, id);
664         return TRUE;
665 }
666
667 /***********************************************************************
668  *              RegisterSystemThread (USER32.@)
669  */
670 void WINAPI RegisterSystemThread(DWORD flags, DWORD reserved)
671 {
672         FIXME_(win32)("(%08lx, %08lx)\n", flags, reserved);
673 }
674
675 /***********************************************************************
676  *              RegisterDeviceNotificationA (USER32.@)
677  */
678 HDEVNOTIFY WINAPI RegisterDeviceNotificationA(
679         HANDLE hnd, LPVOID notifyfilter, DWORD flags
680 ) {
681     FIXME_(win32)("(hwnd=%p, filter=%p,flags=0x%08lx), STUB!\n", hnd,notifyfilter,flags );
682     return 0;
683 }