4 * Copyright 1993 Robert J. Amstadt
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.
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.
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
25 #include "wine/winbase16.h"
30 #include "wine/winuser16.h"
34 #include "user_private.h"
37 #include "cursoricon.h"
40 #include "wine/debug.h"
42 WINE_DEFAULT_DEBUG_CHANNEL(user
);
44 static SYSLEVEL USER_SysLevel
;
45 static CRITICAL_SECTION_DEBUG critsect_debug
=
47 0, 0, &USER_SysLevel
.crst
,
48 { &critsect_debug
.ProcessLocksList
, &critsect_debug
.ProcessLocksList
},
49 0, 0, { 0, (DWORD
)(__FILE__
": USER_SysLevel") }
51 static SYSLEVEL USER_SysLevel
= { { &critsect_debug
, -1, 0, 0, 0, 0 }, 2 };
53 /* USER signal proc flags and codes */
54 /* See UserSignalProc for comments */
55 #define USIG_FLAGS_WIN32 0x0001
56 #define USIG_FLAGS_GUI 0x0002
57 #define USIG_FLAGS_FEEDBACK 0x0004
58 #define USIG_FLAGS_FAULT 0x0008
60 #define USIG_DLL_UNLOAD_WIN16 0x0001
61 #define USIG_DLL_UNLOAD_WIN32 0x0002
62 #define USIG_FAULT_DIALOG_PUSH 0x0003
63 #define USIG_FAULT_DIALOG_POP 0x0004
64 #define USIG_DLL_UNLOAD_ORPHANS 0x0005
65 #define USIG_THREAD_INIT 0x0010
66 #define USIG_THREAD_EXIT 0x0020
67 #define USIG_PROCESS_CREATE 0x0100
68 #define USIG_PROCESS_INIT 0x0200
69 #define USIG_PROCESS_EXIT 0x0300
70 #define USIG_PROCESS_DESTROY 0x0400
71 #define USIG_PROCESS_RUNNING 0x0500
72 #define USIG_PROCESS_LOADED 0x0600
74 /* UserSeeUserDo parameters */
75 #define USUD_LOCALALLOC 0x0001
76 #define USUD_LOCALFREE 0x0002
77 #define USUD_LOCALCOMPACT 0x0003
78 #define USUD_LOCALHEAP 0x0004
79 #define USUD_FIRSTCLASS 0x0005
81 /***********************************************************************
82 * GetFreeSystemResources (USER.284)
84 WORD WINAPI
GetFreeSystemResources16( WORD resType
)
88 int userPercent
, gdiPercent
;
90 if ((gdi_inst
= LoadLibrary16( "GDI" )) < 32) return 0;
91 gdi_heap
= gdi_inst
| 7;
95 case GFSR_USERRESOURCES
:
96 userPercent
= (int)LOCAL_CountFree( USER_HeapSel
) * 100 /
97 LOCAL_HeapSize( USER_HeapSel
);
101 case GFSR_GDIRESOURCES
:
102 gdiPercent
= (int)LOCAL_CountFree( gdi_inst
) * 100 /
103 LOCAL_HeapSize( gdi_inst
);
107 case GFSR_SYSTEMRESOURCES
:
108 userPercent
= (int)LOCAL_CountFree( USER_HeapSel
) * 100 /
109 LOCAL_HeapSize( USER_HeapSel
);
110 gdiPercent
= (int)LOCAL_CountFree( gdi_inst
) * 100 /
111 LOCAL_HeapSize( gdi_inst
);
115 userPercent
= gdiPercent
= 0;
118 FreeLibrary16( gdi_inst
);
119 TRACE("<- userPercent %d, gdiPercent %d\n", userPercent
, gdiPercent
);
120 return (WORD
)min( userPercent
, gdiPercent
);
124 /***********************************************************************
129 _EnterSysLevel( &USER_SysLevel
);
133 /***********************************************************************
136 void USER_Unlock(void)
138 _LeaveSysLevel( &USER_SysLevel
);
142 /***********************************************************************
145 * Make sure that we don't hold the user lock.
147 void USER_CheckNotLock(void)
149 _CheckNotSysLevel( &USER_SysLevel
);
153 /***********************************************************************
154 * SignalProc32 (USER.391)
155 * UserSignalProc (USER32.@)
157 * The exact meaning of the USER signals is undocumented, but this
158 * should cover the basic idea:
160 * USIG_DLL_UNLOAD_WIN16
161 * This is sent when a 16-bit module is unloaded.
163 * USIG_DLL_UNLOAD_WIN32
164 * This is sent when a 32-bit module is unloaded.
166 * USIG_DLL_UNLOAD_ORPHANS
167 * This is sent after the last Win3.1 module is unloaded,
168 * to allow removal of orphaned menus.
170 * USIG_FAULT_DIALOG_PUSH
171 * USIG_FAULT_DIALOG_POP
172 * These are called to allow USER to prepare for displaying a
173 * fault dialog, even though the fault might have happened while
174 * inside a USER critical section.
177 * This is called from the context of a new thread, as soon as it
178 * has started to run.
181 * This is called, still in its context, just before a thread is
182 * about to terminate.
184 * USIG_PROCESS_CREATE
185 * This is called, in the parent process context, after a new process
189 * This is called in the new process context, just after the main thread
190 * has started execution (after the main thread's USIG_THREAD_INIT has
193 * USIG_PROCESS_LOADED
194 * This is called after the executable file has been loaded into the
195 * new process context.
197 * USIG_PROCESS_RUNNING
198 * This is called immediately before the main entry point is called.
201 * This is called in the context of a process that is about to
202 * terminate (but before the last thread's USIG_THREAD_EXIT has
205 * USIG_PROCESS_DESTROY
206 * This is called after a process has terminated.
209 * The meaning of the dwFlags bits is as follows:
212 * Current process is 32-bit.
215 * Current process is a (Win32) GUI process.
217 * USIG_FLAGS_FEEDBACK
218 * Current process needs 'feedback' (determined from the STARTUPINFO
219 * flags STARTF_FORCEONFEEDBACK / STARTF_FORCEOFFFEEDBACK).
222 * The signal is being sent due to a fault.
224 WORD WINAPI
UserSignalProc( UINT uCode
, DWORD dwThreadOrProcessID
,
225 DWORD dwFlags
, HMODULE16 hModule
)
227 FIXME("(%04x, %08lx, %04lx, %04x)\n",
228 uCode
, dwThreadOrProcessID
, dwFlags
, hModule
);
229 /* FIXME: Should chain to GdiSignalProc now. */
233 /***********************************************************************
234 * USER_GetProcessHandleList(Internal)
236 static HANDLE
*USER_GetProcessHandleList(void)
244 hSnapshot
= CreateToolhelp32Snapshot( TH32CS_SNAPPROCESS
, 0 );
247 ERR("cannot create snapshot\n");
251 /* count the number of processes plus one */
252 for (count
=0; ;count
++)
254 pe
.dwSize
= sizeof pe
;
256 r
= Process32Next( hSnapshot
, &pe
);
258 r
= Process32First( hSnapshot
, &pe
);
263 /* allocate memory make a list of the process handles */
264 list
= HeapAlloc( GetProcessHeap(), 0, (count
+1)*sizeof(HANDLE
) );
266 for (i
=0; i
<count
; i
++)
268 pe
.dwSize
= sizeof pe
;
270 r
= Process32Next( hSnapshot
, &pe
);
272 r
= Process32First( hSnapshot
, &pe
);
276 /* don't kill ourselves */
277 if (GetCurrentProcessId() == pe
.th32ProcessID
)
280 /* open the process so we don't can track it */
281 list
[n
] = OpenProcess( PROCESS_QUERY_INFORMATION
|
283 FALSE
, pe
.th32ProcessID
);
285 /* check it didn't terminate already */
290 CloseHandle( hSnapshot
);
293 ERR("Error enumerating processes\n");
295 TRACE("return %lu processes\n", n
);
300 /***********************************************************************
301 * USER_KillProcesses (Internal)
303 static DWORD
USER_KillProcesses(void)
307 const DWORD dwShutdownTimeout
= 10000;
309 TRACE("terminating other processes\n");
311 /* kill it and add it to our list of object to wait on */
312 handles
= USER_GetProcessHandleList();
313 for (n
=0; handles
&& handles
[n
]; n
++)
314 TerminateProcess( handles
[n
], 0 );
316 /* wait for processes to exit */
317 for (i
=0; i
<n
; i
+=MAXIMUM_WAIT_OBJECTS
)
319 int n_objs
= ((n
-i
)>MAXIMUM_WAIT_OBJECTS
) ? MAXIMUM_WAIT_OBJECTS
: (n
-i
);
320 r
= WaitForMultipleObjects( n_objs
, &handles
[i
], TRUE
, dwShutdownTimeout
);
322 ERR("wait failed!\n");
325 /* close the handles */
327 CloseHandle( handles
[i
] );
329 HeapFree( GetProcessHeap(), 0, handles
);
334 /***********************************************************************
335 * USER_DoShutdown (Internal)
337 static void USER_DoShutdown(void)
340 const DWORD nRetries
= 10;
342 for (i
=0; i
<nRetries
; i
++)
344 n
= USER_KillProcesses();
345 TRACE("Killed %ld processes, attempt %ld\n", n
, i
);
351 /***********************************************************************
352 * USER_StartRebootProcess (Internal)
354 static BOOL
USER_StartRebootProcess(void)
356 WCHAR winebootW
[] = { 'w','i','n','e','b','o','o','t',0 };
357 PROCESS_INFORMATION pi
;
361 memset( &si
, 0, sizeof si
);
364 r
= CreateProcessW( NULL
, winebootW
, NULL
, NULL
, FALSE
, 0, NULL
, NULL
, &si
, &pi
);
367 CloseHandle( pi
.hProcess
);
368 CloseHandle( pi
.hThread
);
371 MESSAGE("wine: Failed to start wineboot\n");
376 /***********************************************************************
377 * ExitWindowsEx (USER32.@)
379 BOOL WINAPI
ExitWindowsEx( UINT flags
, DWORD reserved
)
385 /* We have to build a list of all windows first, as in EnumWindows */
386 TRACE("(%x,%lx)\n", flags
, reserved
);
388 list
= WIN_ListChildren( GetDesktopWindow() );
391 /* Send a WM_QUERYENDSESSION message to every window */
393 for (i
= 0; list
[i
]; i
++)
395 /* Make sure that the window still exists */
396 if (!IsWindow( list
[i
] )) continue;
397 if (!SendMessageW( list
[i
], WM_QUERYENDSESSION
, 0, 0 )) break;
401 /* Now notify all windows that got a WM_QUERYENDSESSION of the result */
403 for (phwnd
= list
; i
> 0; i
--, phwnd
++)
405 if (!IsWindow( *phwnd
)) continue;
406 SendMessageW( *phwnd
, WM_ENDSESSION
, result
, 0 );
408 HeapFree( GetProcessHeap(), 0, list
);
410 if ( !(result
|| (flags
& EWX_FORCE
) ))
414 /* USER_DoShutdown will kill all processes except the current process */
417 if (flags
& EWX_REBOOT
)
418 USER_StartRebootProcess();
420 if (result
) ExitProcess(0);
424 /***********************************************************************
425 * ChangeDisplaySettingsA (USER32.@)
427 LONG WINAPI
ChangeDisplaySettingsA( LPDEVMODEA devmode
, DWORD flags
)
429 return ChangeDisplaySettingsExA(NULL
,devmode
,NULL
,flags
,NULL
);
432 /***********************************************************************
433 * ChangeDisplaySettingsW (USER32.@)
435 LONG WINAPI
ChangeDisplaySettingsW( LPDEVMODEW devmode
, DWORD flags
)
437 return ChangeDisplaySettingsExW(NULL
,devmode
,NULL
,flags
,NULL
);
440 /***********************************************************************
441 * ChangeDisplaySettingsExA (USER32.@)
443 LONG WINAPI
ChangeDisplaySettingsExA(
444 LPCSTR devname
, LPDEVMODEA devmode
, HWND hwnd
, DWORD flags
,
449 UNICODE_STRING nameW
;
451 if (devname
) RtlCreateUnicodeStringFromAsciiz(&nameW
, devname
);
452 else nameW
.Buffer
= NULL
;
456 devmodeW
.dmBitsPerPel
= devmode
->dmBitsPerPel
;
457 devmodeW
.dmPelsHeight
= devmode
->dmPelsHeight
;
458 devmodeW
.dmPelsWidth
= devmode
->dmPelsWidth
;
459 devmodeW
.dmDisplayFlags
= devmode
->dmDisplayFlags
;
460 devmodeW
.dmDisplayFrequency
= devmode
->dmDisplayFrequency
;
461 devmodeW
.dmFields
= devmode
->dmFields
;
462 ret
= ChangeDisplaySettingsExW(nameW
.Buffer
, &devmodeW
, hwnd
, flags
, lparam
);
466 ret
= ChangeDisplaySettingsExW(nameW
.Buffer
, NULL
, hwnd
, flags
, lparam
);
469 if (devname
) RtlFreeUnicodeString(&nameW
);
473 /***********************************************************************
474 * ChangeDisplaySettingsExW (USER32.@)
476 LONG WINAPI
ChangeDisplaySettingsExW( LPCWSTR devname
, LPDEVMODEW devmode
, HWND hwnd
,
477 DWORD flags
, LPVOID lparam
)
479 /* Pass the request on to the driver */
480 if (!USER_Driver
.pChangeDisplaySettingsExW
) return DISP_CHANGE_FAILED
;
481 return USER_Driver
.pChangeDisplaySettingsExW( devname
, devmode
, hwnd
, flags
, lparam
);
484 /***********************************************************************
485 * EnumDisplaySettingsW (USER32.@)
488 * TRUE if nth setting exists found (described in the LPDEVMODEW struct)
489 * FALSE if we do not have the nth setting
491 BOOL WINAPI
EnumDisplaySettingsW(
492 LPCWSTR name
, /* [in] huh? */
493 DWORD n
, /* [in] nth entry in display settings list*/
494 LPDEVMODEW devmode
/* [out] devmode for that setting */
496 return EnumDisplaySettingsExW(name
, n
, devmode
, 0);
499 /***********************************************************************
500 * EnumDisplaySettingsA (USER32.@)
502 BOOL WINAPI
EnumDisplaySettingsA(LPCSTR name
,DWORD n
,LPDEVMODEA devmode
)
504 return EnumDisplaySettingsExA(name
, n
, devmode
, 0);
507 /***********************************************************************
508 * EnumDisplaySettingsExA (USER32.@)
510 BOOL WINAPI
EnumDisplaySettingsExA(LPCSTR lpszDeviceName
, DWORD iModeNum
,
511 LPDEVMODEA lpDevMode
, DWORD dwFlags
)
515 UNICODE_STRING nameW
;
517 if (lpszDeviceName
) RtlCreateUnicodeStringFromAsciiz(&nameW
, lpszDeviceName
);
518 else nameW
.Buffer
= NULL
;
520 ret
= EnumDisplaySettingsExW(nameW
.Buffer
,iModeNum
,&devmodeW
,dwFlags
);
523 lpDevMode
->dmBitsPerPel
= devmodeW
.dmBitsPerPel
;
524 lpDevMode
->dmPelsHeight
= devmodeW
.dmPelsHeight
;
525 lpDevMode
->dmPelsWidth
= devmodeW
.dmPelsWidth
;
526 lpDevMode
->dmDisplayFlags
= devmodeW
.dmDisplayFlags
;
527 lpDevMode
->dmDisplayFrequency
= devmodeW
.dmDisplayFrequency
;
528 lpDevMode
->dmFields
= devmodeW
.dmFields
;
530 if (lpszDeviceName
) RtlFreeUnicodeString(&nameW
);
534 /***********************************************************************
535 * EnumDisplaySettingsExW (USER32.@)
537 BOOL WINAPI
EnumDisplaySettingsExW(LPCWSTR lpszDeviceName
, DWORD iModeNum
,
538 LPDEVMODEW lpDevMode
, DWORD dwFlags
)
540 /* Pass the request on to the driver */
541 if (!USER_Driver
.pEnumDisplaySettingsExW
) return FALSE
;
542 return USER_Driver
.pEnumDisplaySettingsExW(lpszDeviceName
, iModeNum
, lpDevMode
, dwFlags
);
545 /***********************************************************************
546 * EnumDisplayDevicesA (USER32.@)
548 BOOL WINAPI
EnumDisplayDevicesA(
549 LPVOID unused
,DWORD i
,LPDISPLAY_DEVICEA lpDisplayDevice
,DWORD dwFlags
553 FIXME("(%p,%ld,%p,0x%08lx), stub!\n",unused
,i
,lpDisplayDevice
,dwFlags
);
554 strcpy(lpDisplayDevice
->DeviceName
,"X11");
555 strcpy(lpDisplayDevice
->DeviceString
,"X 11 Windowing System");
556 lpDisplayDevice
->StateFlags
=
557 DISPLAY_DEVICE_ATTACHED_TO_DESKTOP
|
558 DISPLAY_DEVICE_PRIMARY_DEVICE
|
559 DISPLAY_DEVICE_VGA_COMPATIBLE
;
563 /***********************************************************************
564 * EnumDisplayDevicesW (USER32.@)
566 BOOL WINAPI
EnumDisplayDevicesW(
567 LPVOID unused
,DWORD i
,LPDISPLAY_DEVICEW lpDisplayDevice
,DWORD dwFlags
571 FIXME("(%p,%ld,%p,0x%08lx), stub!\n",unused
,i
,lpDisplayDevice
,dwFlags
);
572 MultiByteToWideChar( CP_ACP
, 0, "X11", -1, lpDisplayDevice
->DeviceName
,
573 sizeof(lpDisplayDevice
->DeviceName
)/sizeof(WCHAR
) );
574 MultiByteToWideChar( CP_ACP
, 0, "X11 Windowing System", -1, lpDisplayDevice
->DeviceString
,
575 sizeof(lpDisplayDevice
->DeviceString
)/sizeof(WCHAR
) );
576 lpDisplayDevice
->StateFlags
=
577 DISPLAY_DEVICE_ATTACHED_TO_DESKTOP
|
578 DISPLAY_DEVICE_PRIMARY_DEVICE
|
579 DISPLAY_DEVICE_VGA_COMPATIBLE
;
583 /***********************************************************************
584 * UserSeeUserDo (USER.216)
586 DWORD WINAPI
UserSeeUserDo16(WORD wReqType
, WORD wParam1
, WORD wParam2
, WORD wParam3
)
590 case USUD_LOCALALLOC
:
591 return LOCAL_Alloc(USER_HeapSel
, wParam1
, wParam3
);
593 return LOCAL_Free(USER_HeapSel
, wParam1
);
594 case USUD_LOCALCOMPACT
:
595 return LOCAL_Compact(USER_HeapSel
, wParam3
, 0);
598 case USUD_FIRSTCLASS
:
599 FIXME("return a pointer to the first window class.\n");
602 WARN("wReqType %04x (unknown)\n", wReqType
);
607 /***********************************************************************
608 * RegisterLogonProcess (USER32.@)
610 DWORD WINAPI
RegisterLogonProcess(HANDLE hprocess
,BOOL x
) {
611 FIXME("(%p,%d),stub!\n",hprocess
,x
);
615 /***********************************************************************
616 * CreateWindowStationW (USER32.@)
618 HWINSTA WINAPI
CreateWindowStationW(
619 LPWSTR winstation
,DWORD res1
,DWORD desiredaccess
,
620 LPSECURITY_ATTRIBUTES lpsa
622 FIXME("(%s,0x%08lx,0x%08lx,%p),stub!\n",debugstr_w(winstation
),
623 res1
,desiredaccess
,lpsa
625 return (HWINSTA
)0xdeadcafe;
628 /***********************************************************************
629 * SetProcessWindowStation (USER32.@)
631 BOOL WINAPI
SetProcessWindowStation(HWINSTA hWinSta
) {
632 FIXME("(%p),stub!\n",hWinSta
);
636 /***********************************************************************
637 * SetUserObjectSecurity (USER32.@)
639 BOOL WINAPI
SetUserObjectSecurity(
641 PSECURITY_INFORMATION pSIRequested
,
642 PSECURITY_DESCRIPTOR pSID
644 FIXME("(%p,%p,%p),stub!\n",hObj
,pSIRequested
,pSID
);
648 /***********************************************************************
649 * CreateDesktopA (USER32.@)
651 HDESK WINAPI
CreateDesktopA(
652 LPSTR lpszDesktop
,LPSTR lpszDevice
,LPDEVMODEA pDevmode
,
653 DWORD dwFlags
,DWORD dwDesiredAccess
,LPSECURITY_ATTRIBUTES lpsa
655 FIXME("(%s,%s,%p,0x%08lx,0x%08lx,%p),stub!\n",
656 lpszDesktop
,lpszDevice
,pDevmode
,
657 dwFlags
,dwDesiredAccess
,lpsa
659 return (HDESK
)0xcafedead;
662 /***********************************************************************
663 * CreateDesktopW (USER32.@)
665 HDESK WINAPI
CreateDesktopW(
666 LPWSTR lpszDesktop
,LPWSTR lpszDevice
,LPDEVMODEW pDevmode
,
667 DWORD dwFlags
,DWORD dwDesiredAccess
,LPSECURITY_ATTRIBUTES lpsa
669 FIXME("(%s,%s,%p,0x%08lx,0x%08lx,%p),stub!\n",
670 debugstr_w(lpszDesktop
),debugstr_w(lpszDevice
),pDevmode
,
671 dwFlags
,dwDesiredAccess
,lpsa
673 return (HDESK
)0xcafedead;
676 /***********************************************************************
677 * EnumDesktopWindows (USER32.@)
679 BOOL WINAPI
EnumDesktopWindows( HDESK hDesktop
, WNDENUMPROC lpfn
, LPARAM lParam
) {
680 FIXME("(%p, %p, 0x%08lx), stub!\n", hDesktop
, lpfn
, lParam
);
685 /***********************************************************************
686 * CloseWindowStation (USER32.@)
688 BOOL WINAPI
CloseWindowStation(HWINSTA hWinSta
)
690 FIXME("(%p)\n", hWinSta
);
694 /***********************************************************************
695 * CloseDesktop (USER32.@)
697 BOOL WINAPI
CloseDesktop(HDESK hDesk
)
699 FIXME("(%p)\n", hDesk
);
703 /***********************************************************************
704 * SetWindowStationUser (USER32.@)
706 DWORD WINAPI
SetWindowStationUser(DWORD x1
,DWORD x2
) {
707 FIXME("(0x%08lx,0x%08lx),stub!\n",x1
,x2
);
711 /***********************************************************************
712 * SetLogonNotifyWindow (USER32.@)
714 DWORD WINAPI
SetLogonNotifyWindow(HWINSTA hwinsta
,HWND hwnd
) {
715 FIXME("(%p,%p),stub!\n",hwinsta
,hwnd
);
719 /***********************************************************************
720 * LoadLocalFonts (USER32.@)
722 VOID WINAPI
LoadLocalFonts(VOID
) {
726 /***********************************************************************
727 * GetUserObjectInformationA (USER32.@)
729 BOOL WINAPI
GetUserObjectInformationA( HANDLE hObj
, INT nIndex
, LPVOID pvInfo
, DWORD nLength
, LPDWORD lpnLen
)
730 { FIXME("(%p %i %p %ld %p),stub!\n", hObj
, nIndex
, pvInfo
, nLength
, lpnLen
);
733 /***********************************************************************
734 * GetUserObjectInformationW (USER32.@)
736 BOOL WINAPI
GetUserObjectInformationW( HANDLE hObj
, INT nIndex
, LPVOID pvInfo
, DWORD nLength
, LPDWORD lpnLen
)
737 { FIXME("(%p %i %p %ld %p),stub!\n", hObj
, nIndex
, pvInfo
, nLength
, lpnLen
);
740 /***********************************************************************
741 * GetUserObjectSecurity (USER32.@)
743 BOOL WINAPI
GetUserObjectSecurity(HANDLE hObj
, PSECURITY_INFORMATION pSIRequested
,
744 PSECURITY_DESCRIPTOR pSID
, DWORD nLength
, LPDWORD lpnLengthNeeded
)
745 { FIXME("(%p %p %p len=%ld %p),stub!\n", hObj
, pSIRequested
, pSID
, nLength
, lpnLengthNeeded
);
749 /***********************************************************************
750 * SetSystemCursor (USER32.@)
752 BOOL WINAPI
SetSystemCursor(HCURSOR hcur
, DWORD id
)
753 { FIXME("(%p,%08lx),stub!\n", hcur
, id
);
757 /***********************************************************************
758 * RegisterSystemThread (USER32.@)
760 void WINAPI
RegisterSystemThread(DWORD flags
, DWORD reserved
)
762 FIXME("(%08lx, %08lx)\n", flags
, reserved
);
765 /***********************************************************************
766 * RegisterDeviceNotificationA (USER32.@)
768 * See RegisterDeviceNotificationW.
770 HDEVNOTIFY WINAPI
RegisterDeviceNotificationA(HANDLE hnd
, LPVOID notifyfilter
, DWORD flags
)
772 FIXME("(hwnd=%p, filter=%p,flags=0x%08lx), STUB!\n", hnd
,notifyfilter
,flags
);
776 /***********************************************************************
777 * RegisterDeviceNotificationW (USER32.@)
779 * Registers a window with the system so that it will receive
780 * notifications about a device.
783 * hRecepient [I] Window or service status handle that
784 * will receive notifications.
785 * pNotificationFilter [I] DEV_BROADCAST_HDR followed by some
786 * type-specific data.
787 * dwFlags [I] See notes
791 * A handle to the device notification.
795 * The dwFlags parameter can be one of two values:
796 *| DEVICE_NOTIFY_WINDOW_HANDLE - hRecepient is a window handle
797 *| DEVICE_NOTIFY_SERVICE_HANDLE - hRecepient is a service status handle
799 HDEVNOTIFY WINAPI
RegisterDeviceNotificationW(HANDLE hRecepient
, LPVOID pNotificationFilter
, DWORD dwFlags
)
801 FIXME("(hwnd=%p, filter=%p,flags=0x%08lx), STUB!\n", hRecepient
,pNotificationFilter
,dwFlags
);