[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.

svn path=/trunk/; revision=69159
This commit is contained in:
Stefan Ginsberg 2015-09-09 19:38:36 +00:00
parent db9febf4fa
commit 30ea4eb1ae
4 changed files with 8 additions and 5 deletions

View file

@ -1696,6 +1696,7 @@ NTAPI
NtUserChangeDisplaySettings(
PUNICODE_STRING lpszDeviceName,
LPDEVMODEW lpDevMode,
HWND hwnd,
DWORD dwflags);
BOOL

View file

@ -814,6 +814,7 @@ APIENTRY
NtUserChangeDisplaySettings(
PUNICODE_STRING pustrDevice,
LPDEVMODEW lpDevMode,
HWND hWnd,
DWORD dwflags)
{
WCHAR awcDevice[CCHDEVICENAME];
@ -822,7 +823,8 @@ NtUserChangeDisplaySettings(
LONG lRet;
/* Check arguments */
if (dwflags != CDS_VIDEOPARAMETERS)
if ((dwflags != CDS_VIDEOPARAMETERS) ||
(hWnd != NULL))
{
EngSetLastError(ERROR_INVALID_PARAMETER);
return DISP_CHANGE_BADPARAM;

View file

@ -457,14 +457,14 @@ ChangeDisplaySettingsExA(
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 @@ ChangeDisplaySettingsExW(
else
pDeviceName = NULL;
rc = NtUserChangeDisplaySettings(pDeviceName, lpDevMode, dwflags);
rc = NtUserChangeDisplaySettings(pDeviceName, lpDevMode, hwnd, dwflags);
return rc;
}

View file

@ -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)