- Basic implementation of (NtUser)UpdatePerUserSystemParameters.

- Move code querying for "PaintDesktopVersion" to NtUserUpdatePerUserSystemParameters.

svn path=/trunk/; revision=11954
This commit is contained in:
Filip Navara 2004-12-06 02:23:05 +00:00
parent 3bfcecdd7d
commit fc08e5303b
8 changed files with 62 additions and 59 deletions

View file

@ -1677,11 +1677,11 @@ NtUserUpdateLayeredWindow(
DWORD Unknown7,
DWORD Unknown8);
DWORD
BOOL
STDCALL
NtUserUpdatePerUserSystemParameters(
DWORD Unknown0,
DWORD Unknown1);
DWORD dwReserved,
BOOL bEnable);
DWORD
STDCALL

View file

@ -16,7 +16,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
/* $Id: misc.c,v 1.9 2004/11/20 15:51:14 ekohl Exp $
/* $Id: misc.c,v 1.10 2004/12/06 02:23:05 navaraf Exp $
*
* PROJECT: ReactOS user32.dll
* FILE: lib/user32/misc/misc.c
@ -106,12 +106,12 @@ SetLogonNotifyWindow (HWND Wnd, HWINSTA WinSta)
}
/*
* @unimplemented
* @implemented
*/
BOOL WINAPI
UpdatePerUserSystemParameters(DWORD dwUnknown,
BOOL bEnable)
UpdatePerUserSystemParameters(
DWORD dwReserved,
BOOL bEnable)
{
return TRUE;
return NtUserUpdatePerUserSystemParameters(dwUnknown, dwReserved);
}

View file

@ -16,7 +16,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
/* $Id: winlogon.h,v 1.4 2004/07/12 20:09:35 gvg Exp $
/* $Id: winlogon.h,v 1.5 2004/12/06 02:23:05 navaraf Exp $
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS winlogon
* FILE: subsys/system/winlogon/winlogon.h
@ -163,6 +163,11 @@ DispatchSAS(PWLSESSION Session, DWORD dwSasType);
#define DisplaySASNotice(Session) \
Session->MsGina.Functions.WlxDisplaySASNotice(Session->MsGina.Context);
/* user32 */
BOOL WINAPI
UpdatePerUserSystemParameters(DWORD dwUnknown,
DWORD dwReserved);
#endif /* __WINLOGON_MAIN_H__ */
/* EOF */

View file

@ -12,6 +12,7 @@ extern PDESKTOP_OBJECT InputDesktop;
extern HDESK InputDesktopHandle;
extern PWNDCLASS_OBJECT DesktopWindowClass;
extern HDC ScreenDeviceContext;
extern BOOL g_PaintDesktopVersion;
NTSTATUS FASTCALL
InitDesktopImpl(VOID);

View file

@ -16,7 +16,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
* $Id: desktop.c,v 1.25 2004/12/05 00:20:41 navaraf Exp $
* $Id: desktop.c,v 1.26 2004/12/06 02:23:05 navaraf Exp $
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel
@ -50,6 +50,8 @@ PDESKTOP_OBJECT InputDesktop = NULL;
HDESK InputDesktopHandle = NULL;
HDC ScreenDeviceContext = NULL;
BOOL g_PaintDesktopVersion = FALSE;
/* INITALIZATION FUNCTIONS ****************************************************/
NTSTATUS FASTCALL
@ -880,20 +882,6 @@ static int GetSystemVersionString(LPWSTR buffer)
return len;
}
static NTSTATUS STDCALL PaintDesktopVersionCallback(
IN PWSTR ValueName, IN ULONG ValueType,
IN PVOID ValueData, IN ULONG ValueLength,
IN PVOID Context, IN PVOID EntryContext
)
{
DPRINT("PaintDesktopVersionCallback ValueType=%d ValueLength=%d\n", ValueType, ValueLength);
if (ValueType==REG_DWORD && ValueLength==sizeof(DWORD))
*((DWORD*)EntryContext) = *(DWORD*)ValueData;
return STATUS_SUCCESS;
}
/*
* NtUserPaintDesktop
*
@ -916,10 +904,6 @@ NtUserPaintDesktop(HDC hDC)
HBRUSH DesktopBrush, PreviousBrush;
HWND hWndDesktop;
BOOL doPatBlt = TRUE;
RTL_QUERY_REGISTRY_TABLE queryTable[2];
DWORD displayVersion;
NTSTATUS status;
int len;
PWINSTATION_OBJECT WinSta = PsGetWin32Thread()->Desktop->WindowStation;
@ -984,22 +968,7 @@ NtUserPaintDesktop(HDC hDC)
* Display system version on the desktop background
*/
RtlZeroMemory(queryTable, sizeof(queryTable));
queryTable[0].QueryRoutine = PaintDesktopVersionCallback;
queryTable[0].Name = L"PaintDesktopVersion";
queryTable[0].EntryContext = &displayVersion;
/* query the "PaintDesktopVersion" flag in the "Control Panel\Desktop" key */
status = RtlQueryRegistryValues(RTL_REGISTRY_USER, L"Control Panel\\Desktop", queryTable, NULL, NULL);
if (!NT_SUCCESS(status)) {
DPRINT1("RtlQueryRegistryValues failed for PaintDesktopVersion: status=%x\n", status);
displayVersion = 0;
}
DPRINT("PaintDesktopVersion=%d\n", displayVersion);
if (displayVersion) {
if (g_PaintDesktopVersion) {
static WCHAR s_wszVersion[256] = {0};
RECT rect;

View file

@ -1,4 +1,4 @@
/* $Id: misc.c,v 1.88 2004/11/20 16:46:06 weiden Exp $
/* $Id: misc.c,v 1.89 2004/12/06 02:23:05 navaraf Exp $
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel
@ -1330,4 +1330,44 @@ IntFreeNULLTerminatedFromUnicodeString(PWSTR NullTerminated, PUNICODE_STRING Uni
}
}
BOOL STDCALL
NtUserUpdatePerUserSystemParameters(
DWORD dwUnknown,
BOOL bEnable)
{
if (bEnable)
{
RTL_QUERY_REGISTRY_TABLE QueryTable[2];
NTSTATUS Status;
RtlZeroMemory(QueryTable, sizeof(QueryTable));
QueryTable[0].Flags = RTL_QUERY_REGISTRY_DIRECT;
QueryTable[0].Name = L"PaintDesktopVersion";
QueryTable[0].EntryContext = &g_PaintDesktopVersion;
/* Query the "PaintDesktopVersion" flag in the "Control Panel\Desktop" key */
Status = RtlQueryRegistryValues(RTL_REGISTRY_USER,
L"Control Panel\\Desktop",
QueryTable, NULL, NULL);
if (!NT_SUCCESS(Status))
{
DPRINT1("RtlQueryRegistryValues failed for PaintDesktopVersion (%x)\n",
Status);
g_PaintDesktopVersion = FALSE;
return FALSE;
}
DPRINT1("PaintDesktopVersion = %d\n", g_PaintDesktopVersion);
return TRUE;
}
else
{
g_PaintDesktopVersion = FALSE;
return TRUE;
}
}
/* EOF */

View file

@ -1,4 +1,4 @@
/* $Id: stubs.c,v 1.47 2004/11/16 16:27:49 blight Exp $
/* $Id: stubs.c,v 1.48 2004/12/06 02:23:05 navaraf Exp $
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel
@ -688,17 +688,6 @@ NtUserUpdateInstance(
return 0;
}
DWORD
STDCALL
NtUserUpdatePerUserSystemParameters(
DWORD Unknown0,
DWORD Unknown1)
{
UNIMPLEMENTED
return 0;
}
DWORD
STDCALL
NtUserUserHandleGrantAccess(

View file

@ -3841,7 +3841,6 @@ BOOL WINAPI UnloadKeyboardLayout(HKL);
BOOL WINAPI UnregisterClassA(LPCSTR,HINSTANCE);
BOOL WINAPI UnregisterClassW(LPCWSTR,HINSTANCE);
BOOL WINAPI UnregisterHotKey(HWND,int);
BOOL WINAPI UpdatePerUserSystemParameters(DWORD,BOOL);
BOOL WINAPI UpdateWindow(HWND);
#if (_WIN32_WINNT >= 0x0500)
BOOL WINAPI UserHandleGrantAccess(HANDLE,HANDLE,BOOL);