diff --git a/dlls/user/misc.c b/dlls/user/misc.c index 9363c58622c..dbdfb83dd9a 100644 --- a/dlls/user/misc.c +++ b/dlls/user/misc.c @@ -23,6 +23,7 @@ #include "windef.h" #include "winbase.h" +#include "wingdi.h" #include "winuser.h" #include "winnls.h" @@ -201,6 +202,29 @@ BOOL WINAPI SetProcessDefaultLayout( DWORD dwDefaultLayout ) } +/*********************************************************************** + * CreateDesktopA (USER32.@) + */ +HDESK WINAPI CreateDesktopA( LPSTR lpszDesktop,LPSTR lpszDevice,LPDEVMODEA pDevmode, + DWORD dwFlags,DWORD dwDesiredAccess,LPSECURITY_ATTRIBUTES lpsa ) +{ + FIXME("(%s,%s,%p,0x%08lx,0x%08lx,%p),stub!\n", lpszDesktop,lpszDevice,pDevmode, + dwFlags,dwDesiredAccess,lpsa ); + return (HDESK)0xcafedead; +} + +/*********************************************************************** + * CreateDesktopW (USER32.@) + */ +HDESK WINAPI CreateDesktopW( LPWSTR lpszDesktop,LPWSTR lpszDevice,LPDEVMODEW pDevmode, + DWORD dwFlags,DWORD dwDesiredAccess,LPSECURITY_ATTRIBUTES lpsa) +{ + FIXME("(%s,%s,%p,0x%08lx,0x%08lx,%p),stub!\n", + debugstr_w(lpszDesktop),debugstr_w(lpszDevice),pDevmode, + dwFlags,dwDesiredAccess,lpsa ); + return (HDESK)0xcafedead; +} + /****************************************************************************** * OpenDesktopA [USER32.@] * @@ -228,6 +252,15 @@ HDESK WINAPI OpenInputDesktop( DWORD dwFlags, BOOL fInherit, ACCESS_MASK dwDesir return 0; } +/*********************************************************************** + * CloseDesktop (USER32.@) + */ +BOOL WINAPI CloseDesktop(HDESK hDesk) +{ + FIXME("(%p)\n", hDesk); + return TRUE; +} + /****************************************************************************** * EnumDesktopsA [USER32.@] */ @@ -253,6 +286,52 @@ BOOL WINAPI EnumDesktopsW( HWINSTA hwinsta, DESKTOPENUMPROCW lpEnumFunc, return FALSE; } +/*********************************************************************** + * EnumDesktopWindows (USER32.@) + */ +BOOL WINAPI EnumDesktopWindows( HDESK hDesktop, WNDENUMPROC lpfn, LPARAM lParam ) +{ + FIXME("(%p, %p, 0x%08lx), stub!\n", hDesktop, lpfn, lParam ); + return TRUE; +} + +/*********************************************************************** + * CreateWindowStationW (USER32.@) + */ +HWINSTA WINAPI CreateWindowStationW( LPWSTR winstation,DWORD res1,DWORD desiredaccess, + LPSECURITY_ATTRIBUTES lpsa ) +{ + FIXME("(%s,0x%08lx,0x%08lx,%p),stub!\n",debugstr_w(winstation), res1,desiredaccess,lpsa ); + return (HWINSTA)0xdeadcafe; +} + +/*********************************************************************** + * CloseWindowStation (USER32.@) + */ +BOOL WINAPI CloseWindowStation(HWINSTA hWinSta) +{ + FIXME("(%p)\n", hWinSta); + return TRUE; +} + +/*********************************************************************** + * SetWindowStationUser (USER32.@) + */ +DWORD WINAPI SetWindowStationUser(DWORD x1,DWORD x2) +{ + FIXME("(0x%08lx,0x%08lx),stub!\n",x1,x2); + return 1; +} + +/*********************************************************************** + * SetProcessWindowStation (USER32.@) + */ +BOOL WINAPI SetProcessWindowStation(HWINSTA hWinSta) +{ + FIXME("(%p),stub!\n",hWinSta); + return TRUE; +} + /****************************************************************************** * EnumWindowStationsA [USER32.@] */ @@ -273,6 +352,24 @@ BOOL WINAPI EnumWindowStationsW( WINSTAENUMPROCW lpEnumFunc, LPARAM lParam) return FALSE; } +/*********************************************************************** + * GetUserObjectInformationA (USER32.@) + */ +BOOL WINAPI GetUserObjectInformationA( HANDLE hObj, INT nIndex, LPVOID pvInfo, DWORD nLength, LPDWORD lpnLen ) +{ + FIXME("(%p %i %p %ld %p),stub!\n", hObj, nIndex, pvInfo, nLength, lpnLen ); + return TRUE; +} + +/*********************************************************************** + * GetUserObjectInformationW (USER32.@) + */ +BOOL WINAPI GetUserObjectInformationW( HANDLE hObj, INT nIndex, LPVOID pvInfo, DWORD nLength, LPDWORD lpnLen ) +{ + FIXME("(%p %i %p %ld %p),stub!\n", hObj, nIndex, pvInfo, nLength, lpnLen ); + return TRUE; +} + /****************************************************************************** * SetUserObjectInformationA (USER32.@) */ @@ -283,6 +380,26 @@ BOOL WINAPI SetUserObjectInformationA( HANDLE hObj, INT nIndex, return TRUE; } +/*********************************************************************** + * GetUserObjectSecurity (USER32.@) + */ +BOOL WINAPI GetUserObjectSecurity(HANDLE hObj, PSECURITY_INFORMATION pSIRequested, + PSECURITY_DESCRIPTOR pSID, DWORD nLength, LPDWORD lpnLengthNeeded) +{ + FIXME("(%p %p %p len=%ld %p),stub!\n", hObj, pSIRequested, pSID, nLength, lpnLengthNeeded); + return TRUE; +} + +/*********************************************************************** + * SetUserObjectSecurity (USER32.@) + */ +BOOL WINAPI SetUserObjectSecurity( HANDLE hObj, PSECURITY_INFORMATION pSIRequested, + PSECURITY_DESCRIPTOR pSID ) +{ + FIXME("(%p,%p,%p),stub!\n",hObj,pSIRequested,pSID); + return TRUE; +} + /****************************************************************************** * SetThreadDesktop (USER32.@) */ @@ -292,6 +409,31 @@ BOOL WINAPI SetThreadDesktop( HANDLE hDesktop ) return TRUE; } +/*********************************************************************** + * RegisterLogonProcess (USER32.@) + */ +DWORD WINAPI RegisterLogonProcess(HANDLE hprocess,BOOL x) +{ + FIXME("(%p,%d),stub!\n",hprocess,x); + return 1; +} + +/*********************************************************************** + * SetLogonNotifyWindow (USER32.@) + */ +DWORD WINAPI SetLogonNotifyWindow(HWINSTA hwinsta,HWND hwnd) +{ + FIXME("(%p,%p),stub!\n",hwinsta,hwnd); + return 1; +} + +/*********************************************************************** + * RegisterSystemThread (USER32.@) + */ +void WINAPI RegisterSystemThread(DWORD flags, DWORD reserved) +{ + FIXME("(%08lx, %08lx)\n", flags, reserved); +} /*********************************************************************** * RegisterShellHookWindow [USER32.@] @@ -324,6 +466,46 @@ DWORD WINAPI RegisterTasklist (DWORD x) } +/*********************************************************************** + * RegisterDeviceNotificationA (USER32.@) + * + * See RegisterDeviceNotificationW. + */ +HDEVNOTIFY WINAPI RegisterDeviceNotificationA(HANDLE hnd, LPVOID notifyfilter, DWORD flags) +{ + FIXME("(hwnd=%p, filter=%p,flags=0x%08lx), STUB!\n", hnd,notifyfilter,flags ); + return 0; +} + +/*********************************************************************** + * RegisterDeviceNotificationW (USER32.@) + * + * Registers a window with the system so that it will receive + * notifications about a device. + * + * PARAMS + * hRecepient [I] Window or service status handle that + * will receive notifications. + * pNotificationFilter [I] DEV_BROADCAST_HDR followed by some + * type-specific data. + * dwFlags [I] See notes + * + * RETURNS + * + * A handle to the device notification. + * + * NOTES + * + * The dwFlags parameter can be one of two values: + *| DEVICE_NOTIFY_WINDOW_HANDLE - hRecepient is a window handle + *| DEVICE_NOTIFY_SERVICE_HANDLE - hRecepient is a service status handle + */ +HDEVNOTIFY WINAPI RegisterDeviceNotificationW(HANDLE hRecepient, LPVOID pNotificationFilter, DWORD dwFlags) +{ + FIXME("(hwnd=%p, filter=%p,flags=0x%08lx), STUB!\n", hRecepient,pNotificationFilter,dwFlags ); + return 0; +} + /*********************************************************************** * GetAppCompatFlags (USER32.@) */ @@ -347,6 +529,16 @@ BOOL WINAPI AlignRects(LPRECT rect, DWORD b, DWORD c, DWORD d) } +/*********************************************************************** + * LoadLocalFonts (USER32.@) + */ +VOID WINAPI LoadLocalFonts(VOID) +{ + /* are loaded. */ + return; +} + + /*********************************************************************** * USER_489 (USER.489) */ diff --git a/dlls/user/user_main.c b/dlls/user/user_main.c index c6a7cea1571..25674b892f7 100644 --- a/dlls/user/user_main.c +++ b/dlls/user/user_main.c @@ -40,6 +40,15 @@ USER_DRIVER USER_Driver; WORD USER_HeapSel = 0; /* USER heap selector */ HMODULE user32_module = 0; +static SYSLEVEL USER_SysLevel; +static CRITICAL_SECTION_DEBUG critsect_debug = +{ + 0, 0, &USER_SysLevel.crst, + { &critsect_debug.ProcessLocksList, &critsect_debug.ProcessLocksList }, + 0, 0, { 0, (DWORD)(__FILE__ ": USER_SysLevel") } +}; +static SYSLEVEL USER_SysLevel = { { &critsect_debug, -1, 0, 0, 0, 0 }, 2 }; + static HPALETTE (WINAPI *pfnGDISelectPalette)( HDC hdc, HPALETTE hpal, WORD bkgnd ); static UINT (WINAPI *pfnGDIRealizePalette)( HDC hdc ); static HPALETTE hPrimaryPalette; @@ -135,6 +144,35 @@ static BOOL load_driver(void) } +/*********************************************************************** + * USER_Lock + */ +void USER_Lock(void) +{ + _EnterSysLevel( &USER_SysLevel ); +} + + +/*********************************************************************** + * USER_Unlock + */ +void USER_Unlock(void) +{ + _LeaveSysLevel( &USER_SysLevel ); +} + + +/*********************************************************************** + * USER_CheckNotLock + * + * Make sure that we don't hold the user lock. + */ +void USER_CheckNotLock(void) +{ + _CheckNotSysLevel( &USER_SysLevel ); +} + + /*********************************************************************** * UserSelectPalette (Not a Windows API) */ diff --git a/windows/user.c b/windows/user.c index 03001c2d673..cf0ef18e3bd 100644 --- a/windows/user.c +++ b/windows/user.c @@ -40,15 +40,6 @@ WINE_DEFAULT_DEBUG_CHANNEL(user); -static SYSLEVEL USER_SysLevel; -static CRITICAL_SECTION_DEBUG critsect_debug = -{ - 0, 0, &USER_SysLevel.crst, - { &critsect_debug.ProcessLocksList, &critsect_debug.ProcessLocksList }, - 0, 0, { 0, (DWORD)(__FILE__ ": USER_SysLevel") } -}; -static SYSLEVEL USER_SysLevel = { { &critsect_debug, -1, 0, 0, 0, 0 }, 2 }; - /* USER signal proc flags and codes */ /* See UserSignalProc for comments */ #define USIG_FLAGS_WIN32 0x0001 @@ -120,35 +111,6 @@ WORD WINAPI GetFreeSystemResources16( WORD resType ) } -/*********************************************************************** - * USER_Lock - */ -void USER_Lock(void) -{ - _EnterSysLevel( &USER_SysLevel ); -} - - -/*********************************************************************** - * USER_Unlock - */ -void USER_Unlock(void) -{ - _LeaveSysLevel( &USER_SysLevel ); -} - - -/*********************************************************************** - * USER_CheckNotLock - * - * Make sure that we don't hold the user lock. - */ -void USER_CheckNotLock(void) -{ - _CheckNotSysLevel( &USER_SysLevel ); -} - - /*********************************************************************** * SignalProc32 (USER.391) * UserSignalProc (USER32.@) @@ -603,148 +565,6 @@ DWORD WINAPI UserSeeUserDo16(WORD wReqType, WORD wParam1, WORD wParam2, WORD wPa } } -/*********************************************************************** - * RegisterLogonProcess (USER32.@) - */ -DWORD WINAPI RegisterLogonProcess(HANDLE hprocess,BOOL x) { - FIXME("(%p,%d),stub!\n",hprocess,x); - return 1; -} - -/*********************************************************************** - * CreateWindowStationW (USER32.@) - */ -HWINSTA WINAPI CreateWindowStationW( - LPWSTR winstation,DWORD res1,DWORD desiredaccess, - LPSECURITY_ATTRIBUTES lpsa -) { - FIXME("(%s,0x%08lx,0x%08lx,%p),stub!\n",debugstr_w(winstation), - res1,desiredaccess,lpsa - ); - return (HWINSTA)0xdeadcafe; -} - -/*********************************************************************** - * SetProcessWindowStation (USER32.@) - */ -BOOL WINAPI SetProcessWindowStation(HWINSTA hWinSta) { - FIXME("(%p),stub!\n",hWinSta); - return TRUE; -} - -/*********************************************************************** - * SetUserObjectSecurity (USER32.@) - */ -BOOL WINAPI SetUserObjectSecurity( - HANDLE hObj, - PSECURITY_INFORMATION pSIRequested, - PSECURITY_DESCRIPTOR pSID -) { - FIXME("(%p,%p,%p),stub!\n",hObj,pSIRequested,pSID); - return TRUE; -} - -/*********************************************************************** - * CreateDesktopA (USER32.@) - */ -HDESK WINAPI CreateDesktopA( - LPSTR lpszDesktop,LPSTR lpszDevice,LPDEVMODEA pDevmode, - DWORD dwFlags,DWORD dwDesiredAccess,LPSECURITY_ATTRIBUTES lpsa -) { - FIXME("(%s,%s,%p,0x%08lx,0x%08lx,%p),stub!\n", - lpszDesktop,lpszDevice,pDevmode, - dwFlags,dwDesiredAccess,lpsa - ); - return (HDESK)0xcafedead; -} - -/*********************************************************************** - * CreateDesktopW (USER32.@) - */ -HDESK WINAPI CreateDesktopW( - LPWSTR lpszDesktop,LPWSTR lpszDevice,LPDEVMODEW pDevmode, - DWORD dwFlags,DWORD dwDesiredAccess,LPSECURITY_ATTRIBUTES lpsa -) { - FIXME("(%s,%s,%p,0x%08lx,0x%08lx,%p),stub!\n", - debugstr_w(lpszDesktop),debugstr_w(lpszDevice),pDevmode, - dwFlags,dwDesiredAccess,lpsa - ); - return (HDESK)0xcafedead; -} - -/*********************************************************************** - * EnumDesktopWindows (USER32.@) - */ -BOOL WINAPI EnumDesktopWindows( HDESK hDesktop, WNDENUMPROC lpfn, LPARAM lParam ) { - FIXME("(%p, %p, 0x%08lx), stub!\n", hDesktop, lpfn, lParam ); - return TRUE; -} - - -/*********************************************************************** - * CloseWindowStation (USER32.@) - */ -BOOL WINAPI CloseWindowStation(HWINSTA hWinSta) -{ - FIXME("(%p)\n", hWinSta); - return TRUE; -} - -/*********************************************************************** - * CloseDesktop (USER32.@) - */ -BOOL WINAPI CloseDesktop(HDESK hDesk) -{ - FIXME("(%p)\n", hDesk); - return TRUE; -} - -/*********************************************************************** - * SetWindowStationUser (USER32.@) - */ -DWORD WINAPI SetWindowStationUser(DWORD x1,DWORD x2) { - FIXME("(0x%08lx,0x%08lx),stub!\n",x1,x2); - return 1; -} - -/*********************************************************************** - * SetLogonNotifyWindow (USER32.@) - */ -DWORD WINAPI SetLogonNotifyWindow(HWINSTA hwinsta,HWND hwnd) { - FIXME("(%p,%p),stub!\n",hwinsta,hwnd); - return 1; -} - -/*********************************************************************** - * LoadLocalFonts (USER32.@) - */ -VOID WINAPI LoadLocalFonts(VOID) { - /* are loaded. */ - return; -} -/*********************************************************************** - * GetUserObjectInformationA (USER32.@) - */ -BOOL WINAPI GetUserObjectInformationA( HANDLE hObj, INT nIndex, LPVOID pvInfo, DWORD nLength, LPDWORD lpnLen ) -{ FIXME("(%p %i %p %ld %p),stub!\n", hObj, nIndex, pvInfo, nLength, lpnLen ); - return TRUE; -} -/*********************************************************************** - * GetUserObjectInformationW (USER32.@) - */ -BOOL WINAPI GetUserObjectInformationW( HANDLE hObj, INT nIndex, LPVOID pvInfo, DWORD nLength, LPDWORD lpnLen ) -{ FIXME("(%p %i %p %ld %p),stub!\n", hObj, nIndex, pvInfo, nLength, lpnLen ); - return TRUE; -} -/*********************************************************************** - * GetUserObjectSecurity (USER32.@) - */ -BOOL WINAPI GetUserObjectSecurity(HANDLE hObj, PSECURITY_INFORMATION pSIRequested, - PSECURITY_DESCRIPTOR pSID, DWORD nLength, LPDWORD lpnLengthNeeded) -{ FIXME("(%p %p %p len=%ld %p),stub!\n", hObj, pSIRequested, pSID, nLength, lpnLengthNeeded); - return TRUE; -} - /*********************************************************************** * SetSystemCursor (USER32.@) */ @@ -752,51 +572,3 @@ BOOL WINAPI SetSystemCursor(HCURSOR hcur, DWORD id) { FIXME("(%p,%08lx),stub!\n", hcur, id); return TRUE; } - -/*********************************************************************** - * RegisterSystemThread (USER32.@) - */ -void WINAPI RegisterSystemThread(DWORD flags, DWORD reserved) -{ - FIXME("(%08lx, %08lx)\n", flags, reserved); -} - -/*********************************************************************** - * RegisterDeviceNotificationA (USER32.@) - * - * See RegisterDeviceNotificationW. - */ -HDEVNOTIFY WINAPI RegisterDeviceNotificationA(HANDLE hnd, LPVOID notifyfilter, DWORD flags) -{ - FIXME("(hwnd=%p, filter=%p,flags=0x%08lx), STUB!\n", hnd,notifyfilter,flags ); - return 0; -} - -/*********************************************************************** - * RegisterDeviceNotificationW (USER32.@) - * - * Registers a window with the system so that it will receive - * notifications about a device. - * - * PARAMS - * hRecepient [I] Window or service status handle that - * will receive notifications. - * pNotificationFilter [I] DEV_BROADCAST_HDR followed by some - * type-specific data. - * dwFlags [I] See notes - * - * RETURNS - * - * A handle to the device notification. - * - * NOTES - * - * The dwFlags parameter can be one of two values: - *| DEVICE_NOTIFY_WINDOW_HANDLE - hRecepient is a window handle - *| DEVICE_NOTIFY_SERVICE_HANDLE - hRecepient is a service status handle - */ -HDEVNOTIFY WINAPI RegisterDeviceNotificationW(HANDLE hRecepient, LPVOID pNotificationFilter, DWORD dwFlags) -{ - FIXME("(hwnd=%p, filter=%p,flags=0x%08lx), STUB!\n", hRecepient,pNotificationFilter,dwFlags ); - return 0; -}