Author: sginsberg
Date: Wed Sep 9 19:38:36 2015
New Revision: 69159
URL:
http://svn.reactos.org/svn/reactos?rev=69159&view=rev
Log:
[WIN32SS] Fix NtUserChangeDisplaySettings, I accidently removed one (unused) param too
much (parameter count should be 4 after all), and it seems code relied on this check.
Modified:
trunk/reactos/win32ss/include/ntuser.h
trunk/reactos/win32ss/user/ntuser/display.c
trunk/reactos/win32ss/user/user32/misc/display.c
trunk/reactos/win32ss/w32ksvc.h
Modified: trunk/reactos/win32ss/include/ntuser.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/include/ntuser.h?r…
==============================================================================
--- trunk/reactos/win32ss/include/ntuser.h [iso-8859-1] (original)
+++ trunk/reactos/win32ss/include/ntuser.h [iso-8859-1] Wed Sep 9 19:38:36 2015
@@ -1696,6 +1696,7 @@
NtUserChangeDisplaySettings(
PUNICODE_STRING lpszDeviceName,
LPDEVMODEW lpDevMode,
+ HWND hwnd,
DWORD dwflags);
BOOL
Modified: trunk/reactos/win32ss/user/ntuser/display.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/user/ntuser/displa…
==============================================================================
--- trunk/reactos/win32ss/user/ntuser/display.c [iso-8859-1] (original)
+++ trunk/reactos/win32ss/user/ntuser/display.c [iso-8859-1] Wed Sep 9 19:38:36 2015
@@ -814,6 +814,7 @@
NtUserChangeDisplaySettings(
PUNICODE_STRING pustrDevice,
LPDEVMODEW lpDevMode,
+ HWND hWnd,
DWORD dwflags)
{
WCHAR awcDevice[CCHDEVICENAME];
@@ -822,7 +823,8 @@
LONG lRet;
/* Check arguments */
- if (dwflags != CDS_VIDEOPARAMETERS)
+ if ((dwflags != CDS_VIDEOPARAMETERS) ||
+ (hWnd != NULL))
{
EngSetLastError(ERROR_INVALID_PARAMETER);
return DISP_CHANGE_BADPARAM;
Modified: trunk/reactos/win32ss/user/user32/misc/display.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/user/user32/misc/d…
==============================================================================
--- trunk/reactos/win32ss/user/user32/misc/display.c [iso-8859-1] (original)
+++ trunk/reactos/win32ss/user/user32/misc/display.c [iso-8859-1] Wed Sep 9 19:38:36
2015
@@ -457,14 +457,14 @@
pDevModeW = GdiConvertToDevmodeW(lpDevMode);
if(pDevModeW)
{
- rc = NtUserChangeDisplaySettings(pDeviceName, pDevModeW, dwflags);
+ rc = NtUserChangeDisplaySettings(pDeviceName, pDevModeW, hwnd, dwflags);
RtlFreeHeap(GetProcessHeap(), 0, pDevModeW);
}
else
rc = DISP_CHANGE_SUCCESSFUL;
}
else
- rc = NtUserChangeDisplaySettings(pDeviceName, NULL, dwflags);
+ rc = NtUserChangeDisplaySettings(pDeviceName, NULL, hwnd, dwflags);
if (lpszDeviceName != NULL)
RtlFreeUnicodeString(&DeviceName);
@@ -509,7 +509,7 @@
else
pDeviceName = NULL;
- rc = NtUserChangeDisplaySettings(pDeviceName, lpDevMode, dwflags);
+ rc = NtUserChangeDisplaySettings(pDeviceName, lpDevMode, hwnd, dwflags);
return rc;
}
Modified: trunk/reactos/win32ss/w32ksvc.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/w32ksvc.h?rev=6915…
==============================================================================
--- trunk/reactos/win32ss/w32ksvc.h [iso-8859-1] (original)
+++ trunk/reactos/win32ss/w32ksvc.h [iso-8859-1] Wed Sep 9 19:38:36 2015
@@ -328,7 +328,7 @@
SVC_(UserCallOneParam, 2)
SVC_(UserCallTwoParam, 3)
SVC_(UserChangeClipboardChain, 2)
- SVC_(UserChangeDisplaySettings, 3)
+ SVC_(UserChangeDisplaySettings, 4)
SVC_(UserCheckImeHotKey, 2)
SVC_(UserCheckMenuItem, 3)
SVC_(UserChildWindowFromPointEx, 4)