Fix handling of text align modes for rotated text.
[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 "local.h"
35 #include "module.h"
36 #include "winternl.h"
37 #include "wine/debug.h"
38
39 WINE_DECLARE_DEBUG_CHANNEL(hook);
40 WINE_DECLARE_DEBUG_CHANNEL(local);
41 WINE_DECLARE_DEBUG_CHANNEL(system);
42 WINE_DECLARE_DEBUG_CHANNEL(win);
43 WINE_DECLARE_DEBUG_CHANNEL(win32);
44
45 SYSLEVEL USER_SysLevel = { CRITICAL_SECTION_INIT("USER_SysLevel"), 2 };
46
47
48 /* USER signal proc flags and codes */
49 /* See UserSignalProc for comments */
50 #define USIG_FLAGS_WIN32          0x0001
51 #define USIG_FLAGS_GUI            0x0002
52 #define USIG_FLAGS_FEEDBACK       0x0004
53 #define USIG_FLAGS_FAULT          0x0008
54
55 #define USIG_DLL_UNLOAD_WIN16     0x0001
56 #define USIG_DLL_UNLOAD_WIN32     0x0002
57 #define USIG_FAULT_DIALOG_PUSH    0x0003
58 #define USIG_FAULT_DIALOG_POP     0x0004
59 #define USIG_DLL_UNLOAD_ORPHANS   0x0005
60 #define USIG_THREAD_INIT          0x0010
61 #define USIG_THREAD_EXIT          0x0020
62 #define USIG_PROCESS_CREATE       0x0100
63 #define USIG_PROCESS_INIT         0x0200
64 #define USIG_PROCESS_EXIT         0x0300
65 #define USIG_PROCESS_DESTROY      0x0400
66 #define USIG_PROCESS_RUNNING      0x0500
67 #define USIG_PROCESS_LOADED       0x0600
68
69
70 /***********************************************************************
71  *              GetFreeSystemResources (USER.284)
72  */
73 WORD WINAPI GetFreeSystemResources16( WORD resType )
74 {
75     HINSTANCE16 gdi_inst;
76     WORD gdi_heap;
77     int userPercent, gdiPercent;
78
79     if ((gdi_inst = LoadLibrary16( "GDI" )) < 32) return 0;
80     gdi_heap = gdi_inst | 7;
81
82     switch(resType)
83     {
84     case GFSR_USERRESOURCES:
85         userPercent = (int)LOCAL_CountFree( USER_HeapSel ) * 100 /
86                                LOCAL_HeapSize( USER_HeapSel );
87         gdiPercent  = 100;
88         break;
89
90     case GFSR_GDIRESOURCES:
91         gdiPercent  = (int)LOCAL_CountFree( gdi_inst ) * 100 /
92                                LOCAL_HeapSize( gdi_inst );
93         userPercent = 100;
94         break;
95
96     case GFSR_SYSTEMRESOURCES:
97         userPercent = (int)LOCAL_CountFree( USER_HeapSel ) * 100 /
98                                LOCAL_HeapSize( USER_HeapSel );
99         gdiPercent  = (int)LOCAL_CountFree( gdi_inst ) * 100 /
100                                LOCAL_HeapSize( gdi_inst );
101         break;
102
103     default:
104         userPercent = gdiPercent = 0;
105         break;
106     }
107     FreeLibrary16( gdi_inst );
108     TRACE_(local)("<- userPercent %d, gdiPercent %d\n", userPercent, gdiPercent);
109     return (WORD)min( userPercent, gdiPercent );
110 }
111
112
113 /**********************************************************************
114  *              InitApp (USER.5)
115  */
116 INT16 WINAPI InitApp16( HINSTANCE16 hInstance )
117 {
118     /* Create task message queue */
119     if ( !InitThreadInput16( 0, 0 ) ) return 0;
120
121     return 1;
122 }
123
124
125 /***********************************************************************
126  *           USER_Lock
127  */
128 void USER_Lock(void)
129 {
130     _EnterSysLevel( &USER_SysLevel );
131 }
132
133
134 /***********************************************************************
135  *           USER_Unlock
136  */
137 void USER_Unlock(void)
138 {
139     _LeaveSysLevel( &USER_SysLevel );
140 }
141
142
143 /***********************************************************************
144  *           USER_CheckNotLock
145  *
146  * Make sure that we don't hold the user lock.
147  */
148 void USER_CheckNotLock(void)
149 {
150     _CheckNotSysLevel( &USER_SysLevel );
151 }
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  * The exact meaning of the USER signals is undocumented, but this
167  * should cover the basic idea:
168  *
169  * USIG_DLL_UNLOAD_WIN16
170  *     This is sent when a 16-bit module is unloaded.
171  *
172  * USIG_DLL_UNLOAD_WIN32
173  *     This is sent when a 32-bit module is unloaded.
174  *
175  * USIG_DLL_UNLOAD_ORPHANS
176  *     This is sent after the last Win3.1 module is unloaded,
177  *     to allow removal of orphaned menus.
178  *
179  * USIG_FAULT_DIALOG_PUSH
180  * USIG_FAULT_DIALOG_POP
181  *     These are called to allow USER to prepare for displaying a
182  *     fault dialog, even though the fault might have happened while
183  *     inside a USER critical section.
184  *
185  * USIG_THREAD_INIT
186  *     This is called from the context of a new thread, as soon as it
187  *     has started to run.
188  *
189  * USIG_THREAD_EXIT
190  *     This is called, still in its context, just before a thread is
191  *     about to terminate.
192  *
193  * USIG_PROCESS_CREATE
194  *     This is called, in the parent process context, after a new process
195  *     has been created.
196  *
197  * USIG_PROCESS_INIT
198  *     This is called in the new process context, just after the main thread
199  *     has started execution (after the main thread's USIG_THREAD_INIT has
200  *     been sent).
201  *
202  * USIG_PROCESS_LOADED
203  *     This is called after the executable file has been loaded into the
204  *     new process context.
205  *
206  * USIG_PROCESS_RUNNING
207  *     This is called immediately before the main entry point is called.
208  *
209  * USIG_PROCESS_EXIT
210  *     This is called in the context of a process that is about to
211  *     terminate (but before the last thread's USIG_THREAD_EXIT has
212  *     been sent).
213  *
214  * USIG_PROCESS_DESTROY
215  *     This is called after a process has terminated.
216  *
217  *
218  * The meaning of the dwFlags bits is as follows:
219  *
220  * USIG_FLAGS_WIN32
221  *     Current process is 32-bit.
222  *
223  * USIG_FLAGS_GUI
224  *     Current process is a (Win32) GUI process.
225  *
226  * USIG_FLAGS_FEEDBACK
227  *     Current process needs 'feedback' (determined from the STARTUPINFO
228  *     flags STARTF_FORCEONFEEDBACK / STARTF_FORCEOFFFEEDBACK).
229  *
230  * USIG_FLAGS_FAULT
231  *     The signal is being sent due to a fault.
232  */
233 WORD WINAPI UserSignalProc( UINT uCode, DWORD dwThreadOrProcessID,
234                             DWORD dwFlags, HMODULE16 hModule )
235 {
236     FIXME_(win)("(%04x, %08lx, %04lx, %04x)\n",
237                 uCode, dwThreadOrProcessID, dwFlags, hModule );
238     /* FIXME: Should chain to GdiSignalProc now. */
239     return 0;
240 }
241
242 /***********************************************************************
243  *              ExitWindows (USER.7)
244  */
245 BOOL16 WINAPI ExitWindows16( DWORD dwReturnCode, UINT16 wReserved )
246 {
247     return ExitWindowsEx( EWX_LOGOFF, 0xffffffff );
248 }
249
250
251 /***********************************************************************
252  *              ExitWindowsExec (USER.246)
253  */
254 BOOL16 WINAPI ExitWindowsExec16( LPCSTR lpszExe, LPCSTR lpszParams )
255 {
256     TRACE_(system)("Should run the following in DOS-mode: \"%s %s\"\n",
257         lpszExe, lpszParams);
258     return ExitWindowsEx( EWX_LOGOFF, 0xffffffff );
259 }
260
261
262 /***********************************************************************
263  *              ExitWindowsEx (USER32.@)
264  */
265 BOOL WINAPI ExitWindowsEx( UINT flags, DWORD reserved )
266 {
267     int i;
268     BOOL result;
269     HWND *list, *phwnd;
270
271     /* We have to build a list of all windows first, as in EnumWindows */
272
273     if (!(list = WIN_ListChildren( GetDesktopWindow() ))) return FALSE;
274
275     /* Send a WM_QUERYENDSESSION message to every window */
276
277     for (i = 0; list[i]; i++)
278     {
279         /* Make sure that the window still exists */
280         if (!IsWindow( list[i] )) continue;
281         if (!SendMessageW( list[i], WM_QUERYENDSESSION, 0, 0 )) break;
282     }
283     result = !list[i];
284
285     /* Now notify all windows that got a WM_QUERYENDSESSION of the result */
286
287     for (phwnd = list; i > 0; i--, phwnd++)
288     {
289         if (!IsWindow( *phwnd )) continue;
290         SendMessageW( *phwnd, WM_ENDSESSION, result, 0 );
291     }
292     HeapFree( GetProcessHeap(), 0, list );
293
294     if (result) ExitKernel16();
295     return FALSE;
296 }
297
298 /***********************************************************************
299  *              ChangeDisplaySettingsA (USER32.@)
300  */
301 LONG WINAPI ChangeDisplaySettingsA( LPDEVMODEA devmode, DWORD flags )
302 {
303   return ChangeDisplaySettingsExA(NULL,devmode,NULL,flags,NULL);
304 }
305
306 /***********************************************************************
307  *              ChangeDisplaySettingsW (USER32.@)
308  */
309 LONG WINAPI ChangeDisplaySettingsW( LPDEVMODEW devmode, DWORD flags )
310 {
311   return ChangeDisplaySettingsExW(NULL,devmode,NULL,flags,NULL);
312 }
313
314 /***********************************************************************
315  *              ChangeDisplaySettings (USER.620)
316  */
317 LONG WINAPI ChangeDisplaySettings16( LPDEVMODEA devmode, DWORD flags )
318 {
319         return ChangeDisplaySettingsA(devmode, flags);
320 }
321
322 /***********************************************************************
323  *              ChangeDisplaySettingsExA (USER32.@)
324  */
325 LONG WINAPI ChangeDisplaySettingsExA(
326         LPCSTR devname, LPDEVMODEA devmode, HWND hwnd, DWORD flags,
327         LPVOID lparam
328 ) {
329     DEVMODEW devmodeW;
330     LONG ret;
331     UNICODE_STRING nameW;
332
333     if (devname) RtlCreateUnicodeStringFromAsciiz(&nameW, devname);
334     else nameW.Buffer = NULL;
335
336     if (devmode)
337     {
338         devmodeW.dmBitsPerPel       = devmode->dmBitsPerPel;
339         devmodeW.dmPelsHeight       = devmode->dmPelsHeight;
340         devmodeW.dmPelsWidth        = devmode->dmPelsWidth;
341         devmodeW.dmDisplayFlags     = devmode->dmDisplayFlags;
342         devmodeW.dmDisplayFrequency = devmode->dmDisplayFrequency;
343         devmodeW.dmFields           = devmode->dmFields;
344         ret = ChangeDisplaySettingsExW(nameW.Buffer, &devmodeW, hwnd, flags, lparam);
345     }
346     else
347     {
348         ret = ChangeDisplaySettingsExW(nameW.Buffer, NULL, hwnd, flags, lparam);
349     }
350
351     if (devname) RtlFreeUnicodeString(&nameW);
352     return ret;
353 }
354
355 /***********************************************************************
356  *              ChangeDisplaySettingsExW (USER32.@)
357  */
358 LONG WINAPI ChangeDisplaySettingsExW( LPCWSTR devname, LPDEVMODEW devmode, HWND hwnd,
359                                       DWORD flags, LPVOID lparam )
360 {
361     /* Pass the request on to the driver */
362     if (!USER_Driver.pChangeDisplaySettingsExW) return DISP_CHANGE_FAILED;
363     return USER_Driver.pChangeDisplaySettingsExW( devname, devmode, hwnd, flags, lparam );
364 }
365
366 /***********************************************************************
367  *              EnumDisplaySettingsW (USER32.@)
368  *
369  * RETURNS
370  *      TRUE if nth setting exists found (described in the LPDEVMODEW struct)
371  *      FALSE if we do not have the nth setting
372  */
373 BOOL WINAPI EnumDisplaySettingsW(
374         LPCWSTR name,           /* [in] huh? */
375         DWORD n,                /* [in] nth entry in display settings list*/
376         LPDEVMODEW devmode      /* [out] devmode for that setting */
377 ) {
378     return EnumDisplaySettingsExW(name, n, devmode, 0);
379 }
380
381 /***********************************************************************
382  *              EnumDisplaySettingsA (USER32.@)
383  */
384 BOOL WINAPI EnumDisplaySettingsA(LPCSTR name,DWORD n,LPDEVMODEA devmode)
385 {
386     return EnumDisplaySettingsExA(name, n, devmode, 0);
387 }
388
389 /***********************************************************************
390  *              EnumDisplaySettings (USER.621)
391  */
392 BOOL16 WINAPI EnumDisplaySettings16(
393         LPCSTR name,            /* [in] huh? */
394         DWORD n,                /* [in] nth entry in display settings list*/
395         LPDEVMODEA devmode      /* [out] devmode for that setting */
396 ) {
397         return (BOOL16)EnumDisplaySettingsA(name, n, devmode);
398 }
399
400 /***********************************************************************
401  *              EnumDisplaySettingsExA (USER32.@)
402  */
403 BOOL WINAPI EnumDisplaySettingsExA(LPCSTR lpszDeviceName, DWORD iModeNum,
404                                    LPDEVMODEA lpDevMode, DWORD dwFlags)
405 {
406     DEVMODEW devmodeW;
407     BOOL ret;
408     UNICODE_STRING nameW;
409
410     if (lpszDeviceName) RtlCreateUnicodeStringFromAsciiz(&nameW, lpszDeviceName);
411     else nameW.Buffer = NULL;
412
413     ret = EnumDisplaySettingsExW(nameW.Buffer,iModeNum,&devmodeW,dwFlags);
414     if (ret)
415     {
416         lpDevMode->dmBitsPerPel       = devmodeW.dmBitsPerPel;
417         lpDevMode->dmPelsHeight       = devmodeW.dmPelsHeight;
418         lpDevMode->dmPelsWidth        = devmodeW.dmPelsWidth;
419         lpDevMode->dmDisplayFlags     = devmodeW.dmDisplayFlags;
420         lpDevMode->dmDisplayFrequency = devmodeW.dmDisplayFrequency;
421         lpDevMode->dmFields           = devmodeW.dmFields;
422     }
423     if (lpszDeviceName) RtlFreeUnicodeString(&nameW);
424     return ret;
425 }
426
427 /***********************************************************************
428  *              EnumDisplaySettingsExW (USER32.@)
429  */
430 BOOL WINAPI EnumDisplaySettingsExW(LPCWSTR lpszDeviceName, DWORD iModeNum,
431                                    LPDEVMODEW lpDevMode, DWORD dwFlags)
432 {
433     /* Pass the request on to the driver */
434     if (!USER_Driver.pEnumDisplaySettingsExW) return FALSE;
435     return USER_Driver.pEnumDisplaySettingsExW(lpszDeviceName, iModeNum, lpDevMode, dwFlags);
436 }
437
438 /***********************************************************************
439  *              EnumDisplayDevicesA (USER32.@)
440  */
441 BOOL WINAPI EnumDisplayDevicesA(
442         LPVOID unused,DWORD i,LPDISPLAY_DEVICEA lpDisplayDevice,DWORD dwFlags
443 ) {
444         if (i)
445                 return FALSE;
446         FIXME_(system)("(%p,%ld,%p,0x%08lx), stub!\n",unused,i,lpDisplayDevice,dwFlags);
447         strcpy(lpDisplayDevice->DeviceName,"X11");
448         strcpy(lpDisplayDevice->DeviceString,"X 11 Windowing System");
449         lpDisplayDevice->StateFlags =
450                         DISPLAY_DEVICE_ATTACHED_TO_DESKTOP      |
451                         DISPLAY_DEVICE_PRIMARY_DEVICE           |
452                         DISPLAY_DEVICE_VGA_COMPATIBLE;
453         return TRUE;
454 }
455
456 /***********************************************************************
457  *              EnumDisplayDevicesW (USER32.@)
458  */
459 BOOL WINAPI EnumDisplayDevicesW(
460         LPVOID unused,DWORD i,LPDISPLAY_DEVICEW lpDisplayDevice,DWORD dwFlags
461 ) {
462         if (i)
463                 return FALSE;
464         FIXME_(system)("(%p,%ld,%p,0x%08lx), stub!\n",unused,i,lpDisplayDevice,dwFlags);
465         MultiByteToWideChar( CP_ACP, 0, "X11", -1, lpDisplayDevice->DeviceName,
466                              sizeof(lpDisplayDevice->DeviceName)/sizeof(WCHAR) );
467         MultiByteToWideChar( CP_ACP, 0, "X11 Windowing System", -1, lpDisplayDevice->DeviceString,
468                              sizeof(lpDisplayDevice->DeviceString)/sizeof(WCHAR) );
469         lpDisplayDevice->StateFlags =
470                         DISPLAY_DEVICE_ATTACHED_TO_DESKTOP      |
471                         DISPLAY_DEVICE_PRIMARY_DEVICE           |
472                         DISPLAY_DEVICE_VGA_COMPATIBLE;
473         return TRUE;
474 }
475
476 /***********************************************************************
477  *              SetEventHook (USER.321)
478  *
479  *      Used by Turbo Debugger for Windows
480  */
481 FARPROC16 WINAPI SetEventHook16(FARPROC16 lpfnEventHook)
482 {
483         FIXME_(hook)("(lpfnEventHook=%08x): stub\n", (UINT)lpfnEventHook);
484         return NULL;
485 }
486
487 /***********************************************************************
488  *              UserSeeUserDo (USER.216)
489  */
490 DWORD WINAPI UserSeeUserDo16(WORD wReqType, WORD wParam1, WORD wParam2, WORD wParam3)
491 {
492     switch (wReqType)
493     {
494     case USUD_LOCALALLOC:
495         return LOCAL_Alloc(USER_HeapSel, wParam1, wParam3);
496     case USUD_LOCALFREE:
497         return LOCAL_Free(USER_HeapSel, wParam1);
498     case USUD_LOCALCOMPACT:
499         return LOCAL_Compact(USER_HeapSel, wParam3, 0);
500     case USUD_LOCALHEAP:
501         return USER_HeapSel;
502     case USUD_FIRSTCLASS:
503         FIXME_(local)("return a pointer to the first window class.\n");
504         return (DWORD)-1;
505     default:
506         WARN_(local)("wReqType %04x (unknown)", wReqType);
507         return (DWORD)-1;
508     }
509 }
510
511 /***********************************************************************
512  *              GetSystemDebugState (USER.231)
513  */
514 WORD WINAPI GetSystemDebugState16(void)
515 {
516     return 0;  /* FIXME */
517 }
518
519 /***********************************************************************
520  *              RegisterLogonProcess (USER32.@)
521  */
522 DWORD WINAPI RegisterLogonProcess(HANDLE hprocess,BOOL x) {
523         FIXME_(win32)("(%p,%d),stub!\n",hprocess,x);
524         return 1;
525 }
526
527 /***********************************************************************
528  *              CreateWindowStationW (USER32.@)
529  */
530 HWINSTA WINAPI CreateWindowStationW(
531         LPWSTR winstation,DWORD res1,DWORD desiredaccess,
532         LPSECURITY_ATTRIBUTES lpsa
533 ) {
534         FIXME_(win32)("(%s,0x%08lx,0x%08lx,%p),stub!\n",debugstr_w(winstation),
535                 res1,desiredaccess,lpsa
536         );
537         return (HWINSTA)0xdeadcafe;
538 }
539
540 /***********************************************************************
541  *              SetProcessWindowStation (USER32.@)
542  */
543 BOOL WINAPI SetProcessWindowStation(HWINSTA hWinSta) {
544         FIXME_(win32)("(%p),stub!\n",hWinSta);
545         return TRUE;
546 }
547
548 /***********************************************************************
549  *              SetUserObjectSecurity (USER32.@)
550  */
551 BOOL WINAPI SetUserObjectSecurity(
552         HANDLE hObj,
553         PSECURITY_INFORMATION pSIRequested,
554         PSECURITY_DESCRIPTOR pSID
555 ) {
556         FIXME_(win32)("(%p,%p,%p),stub!\n",hObj,pSIRequested,pSID);
557         return TRUE;
558 }
559
560 /***********************************************************************
561  *              CreateDesktopA (USER32.@)
562  */
563 HDESK WINAPI CreateDesktopA(
564         LPSTR lpszDesktop,LPSTR lpszDevice,LPDEVMODEA pDevmode,
565         DWORD dwFlags,DWORD dwDesiredAccess,LPSECURITY_ATTRIBUTES lpsa
566 ) {
567         FIXME_(win32)("(%s,%s,%p,0x%08lx,0x%08lx,%p),stub!\n",
568                 lpszDesktop,lpszDevice,pDevmode,
569                 dwFlags,dwDesiredAccess,lpsa
570         );
571         return (HDESK)0xcafedead;
572 }
573
574 /***********************************************************************
575  *              CreateDesktopW (USER32.@)
576  */
577 HDESK WINAPI CreateDesktopW(
578         LPWSTR lpszDesktop,LPWSTR lpszDevice,LPDEVMODEW pDevmode,
579         DWORD dwFlags,DWORD dwDesiredAccess,LPSECURITY_ATTRIBUTES lpsa
580 ) {
581         FIXME_(win32)("(%s,%s,%p,0x%08lx,0x%08lx,%p),stub!\n",
582                 debugstr_w(lpszDesktop),debugstr_w(lpszDevice),pDevmode,
583                 dwFlags,dwDesiredAccess,lpsa
584         );
585         return (HDESK)0xcafedead;
586 }
587
588 /***********************************************************************
589  *              EnumDesktopWindows (USER32.@)
590  */
591 BOOL WINAPI EnumDesktopWindows( HDESK hDesktop, WNDENUMPROC lpfn, LPARAM lParam ) {
592   FIXME_(win32)("(%p, %p, 0x%08lx), stub!\n", hDesktop, lpfn, lParam );
593   return TRUE;
594 }
595
596
597 /***********************************************************************
598  *              CloseWindowStation (USER32.@)
599  */
600 BOOL WINAPI CloseWindowStation(HWINSTA hWinSta)
601 {
602     FIXME_(win32)("(%p)\n", hWinSta);
603     return TRUE;
604 }
605
606 /***********************************************************************
607  *              CloseDesktop (USER32.@)
608  */
609 BOOL WINAPI CloseDesktop(HDESK hDesk)
610 {
611     FIXME_(win32)("(%p)\n", hDesk);
612     return TRUE;
613 }
614
615 /***********************************************************************
616  *              SetWindowStationUser (USER32.@)
617  */
618 DWORD WINAPI SetWindowStationUser(DWORD x1,DWORD x2) {
619         FIXME_(win32)("(0x%08lx,0x%08lx),stub!\n",x1,x2);
620         return 1;
621 }
622
623 /***********************************************************************
624  *              SetLogonNotifyWindow (USER32.@)
625  */
626 DWORD WINAPI SetLogonNotifyWindow(HWINSTA hwinsta,HWND hwnd) {
627         FIXME_(win32)("(%p,%p),stub!\n",hwinsta,hwnd);
628         return 1;
629 }
630
631 /***********************************************************************
632  *              LoadLocalFonts (USER32.@)
633  */
634 VOID WINAPI LoadLocalFonts(VOID) {
635         /* are loaded. */
636         return;
637 }
638 /***********************************************************************
639  *              GetUserObjectInformationA (USER32.@)
640  */
641 BOOL WINAPI GetUserObjectInformationA( HANDLE hObj, INT nIndex, LPVOID pvInfo, DWORD nLength, LPDWORD lpnLen )
642 {       FIXME_(win32)("(%p %i %p %ld %p),stub!\n", hObj, nIndex, pvInfo, nLength, lpnLen );
643         return TRUE;
644 }
645 /***********************************************************************
646  *              GetUserObjectInformationW (USER32.@)
647  */
648 BOOL WINAPI GetUserObjectInformationW( HANDLE hObj, INT nIndex, LPVOID pvInfo, DWORD nLength, LPDWORD lpnLen )
649 {       FIXME_(win32)("(%p %i %p %ld %p),stub!\n", hObj, nIndex, pvInfo, nLength, lpnLen );
650         return TRUE;
651 }
652 /***********************************************************************
653  *              GetUserObjectSecurity (USER32.@)
654  */
655 BOOL WINAPI GetUserObjectSecurity(HANDLE hObj, PSECURITY_INFORMATION pSIRequested,
656         PSECURITY_DESCRIPTOR pSID, DWORD nLength, LPDWORD lpnLengthNeeded)
657 {       FIXME_(win32)("(%p %p %p len=%ld %p),stub!\n",  hObj, pSIRequested, pSID, nLength, lpnLengthNeeded);
658         return TRUE;
659 }
660
661 /***********************************************************************
662  *              SetSystemCursor (USER32.@)
663  */
664 BOOL WINAPI SetSystemCursor(HCURSOR hcur, DWORD id)
665 {       FIXME_(win32)("(%p,%08lx),stub!\n",  hcur, id);
666         return TRUE;
667 }
668
669 /***********************************************************************
670  *              RegisterSystemThread (USER32.@)
671  */
672 void WINAPI RegisterSystemThread(DWORD flags, DWORD reserved)
673 {
674         FIXME_(win32)("(%08lx, %08lx)\n", flags, reserved);
675 }
676
677 /***********************************************************************
678  *              RegisterDeviceNotificationA (USER32.@)
679  */
680 HDEVNOTIFY WINAPI RegisterDeviceNotificationA(
681         HANDLE hnd, LPVOID notifyfilter, DWORD flags
682 ) {
683     FIXME_(win32)("(hwnd=%p, filter=%p,flags=0x%08lx), STUB!\n", hnd,notifyfilter,flags );
684     return 0;
685 }