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