mirror of
https://github.com/reactos/reactos.git
synced 2024-07-21 11:48:04 +00:00
Revert half of revision 27465, as it breaks 2nd stage setup ("Failure rendering glyph")
svn path=/trunk/; revision=27521
This commit is contained in:
parent
a1c8d56925
commit
4a614a2899
|
@ -1434,94 +1434,6 @@ IntSystemParametersInfo(
|
|||
return TRUE;
|
||||
}
|
||||
|
||||
static BOOL
|
||||
UserSystemParametersInfo_StructSet(
|
||||
UINT uiAction,
|
||||
UINT uiParam,
|
||||
PVOID pvParam,
|
||||
UINT fWinIni,
|
||||
PVOID pBuffer, /* private kmode buffer */
|
||||
UINT cbSize /* size of buffer and expected size usermode data, pointed by pvParam */
|
||||
)
|
||||
{
|
||||
NTSTATUS Status = STATUS_SUCCESS;
|
||||
_SEH_TRY
|
||||
{
|
||||
ProbeForRead(pvParam, cbSize, 1);
|
||||
RtlCopyMemory(pBuffer,pvParam,cbSize);
|
||||
}
|
||||
_SEH_HANDLE
|
||||
{
|
||||
Status = _SEH_GetExceptionCode();
|
||||
}
|
||||
_SEH_END;
|
||||
if(!NT_SUCCESS(Status))
|
||||
{
|
||||
SetLastNtError(Status);
|
||||
return( FALSE);
|
||||
}
|
||||
if(*(PUINT)pBuffer != cbSize)
|
||||
{
|
||||
SetLastWin32Error(ERROR_INVALID_PARAMETER);
|
||||
return( FALSE);
|
||||
}
|
||||
return IntSystemParametersInfo(uiAction, uiParam, pBuffer, fWinIni);
|
||||
}
|
||||
|
||||
static BOOL
|
||||
UserSystemParametersInfo_StructGet(
|
||||
UINT uiAction,
|
||||
UINT uiParam,
|
||||
PVOID pvParam,
|
||||
UINT fWinIni,
|
||||
PVOID pBuffer, /* private kmode buffer */
|
||||
UINT cbSize /* size of buffer and expected size usermode data, pointed by pvParam */
|
||||
)
|
||||
{
|
||||
NTSTATUS Status = STATUS_SUCCESS;
|
||||
_SEH_TRY
|
||||
{
|
||||
ProbeForRead(pvParam, cbSize, 1);
|
||||
/* Copy only first UINT describing structure size*/
|
||||
*((PUINT)pBuffer) = *((PUINT)pvParam);
|
||||
}
|
||||
_SEH_HANDLE
|
||||
{
|
||||
Status = _SEH_GetExceptionCode();
|
||||
}
|
||||
_SEH_END;
|
||||
if(!NT_SUCCESS(Status))
|
||||
{
|
||||
SetLastNtError(Status);
|
||||
return( FALSE);
|
||||
}
|
||||
if(uiParam != cbSize || *((PUINT)pBuffer) != cbSize)
|
||||
{
|
||||
SetLastWin32Error(ERROR_INVALID_PARAMETER);
|
||||
return( FALSE);
|
||||
}
|
||||
if(!IntSystemParametersInfo(uiAction, uiParam, pBuffer, fWinIni))
|
||||
{
|
||||
return( FALSE);
|
||||
}
|
||||
_SEH_TRY
|
||||
{
|
||||
ProbeForWrite(pvParam, cbSize, 1);
|
||||
RtlCopyMemory(pvParam,pBuffer,cbSize);
|
||||
}
|
||||
_SEH_HANDLE
|
||||
{
|
||||
Status = _SEH_GetExceptionCode();
|
||||
}
|
||||
_SEH_END;
|
||||
if(!NT_SUCCESS(Status))
|
||||
{
|
||||
SetLastNtError(Status);
|
||||
return( FALSE);
|
||||
}
|
||||
return( TRUE);
|
||||
}
|
||||
|
||||
/*
|
||||
* @implemented
|
||||
*/
|
||||
|
@ -1713,125 +1625,64 @@ UserSystemParametersInfo(
|
|||
}
|
||||
return( TRUE);
|
||||
}
|
||||
case SPI_GETICONMETRICS:
|
||||
{
|
||||
ICONMETRICSW Buffer;
|
||||
return UserSystemParametersInfo_StructGet(uiAction, uiParam, pvParam, fWinIni,
|
||||
&Buffer,sizeof(Buffer));
|
||||
}
|
||||
case SPI_SETICONMETRICS:
|
||||
{
|
||||
ICONMETRICSW Buffer;
|
||||
return UserSystemParametersInfo_StructSet(uiAction, uiParam, pvParam, fWinIni,
|
||||
&Buffer,sizeof(Buffer));
|
||||
}
|
||||
case SPI_GETMINIMIZEDMETRICS:
|
||||
{
|
||||
MINIMIZEDMETRICS Buffer;
|
||||
return UserSystemParametersInfo_StructGet(uiAction, uiParam, pvParam, fWinIni,
|
||||
&Buffer,sizeof(Buffer));
|
||||
}
|
||||
case SPI_SETMINIMIZEDMETRICS:
|
||||
{
|
||||
MINIMIZEDMETRICS Buffer;
|
||||
return UserSystemParametersInfo_StructSet(uiAction, uiParam, pvParam, fWinIni,
|
||||
&Buffer,sizeof(Buffer));
|
||||
MINIMIZEDMETRICS minimetrics;
|
||||
|
||||
Status = MmCopyFromCaller(&minimetrics, pvParam, sizeof(MINIMIZEDMETRICS));
|
||||
if(!NT_SUCCESS(Status))
|
||||
{
|
||||
SetLastNtError(Status);
|
||||
return( FALSE);
|
||||
}
|
||||
if(minimetrics.cbSize != sizeof(MINIMIZEDMETRICS))
|
||||
{
|
||||
SetLastWin32Error(ERROR_INVALID_PARAMETER);
|
||||
return( FALSE);
|
||||
}
|
||||
if(!IntSystemParametersInfo(uiAction, uiParam, &minimetrics, fWinIni))
|
||||
{
|
||||
return( FALSE);
|
||||
}
|
||||
|
||||
Status = MmCopyToCaller(pvParam, &minimetrics, sizeof(MINIMIZEDMETRICS));
|
||||
if(!NT_SUCCESS(Status))
|
||||
{
|
||||
SetLastNtError(Status);
|
||||
return( FALSE);
|
||||
}
|
||||
return( TRUE);
|
||||
}
|
||||
case SPI_GETNONCLIENTMETRICS:
|
||||
{
|
||||
NONCLIENTMETRICS Buffer;
|
||||
return UserSystemParametersInfo_StructGet(uiAction, uiParam, pvParam, fWinIni,
|
||||
&Buffer,sizeof(Buffer));
|
||||
}
|
||||
case SPI_SETNONCLIENTMETRICS:
|
||||
{
|
||||
NONCLIENTMETRICS Buffer;
|
||||
return UserSystemParametersInfo_StructSet(uiAction, uiParam, pvParam, fWinIni,
|
||||
&Buffer,sizeof(Buffer));
|
||||
}
|
||||
case SPI_GETANIMATION:
|
||||
{
|
||||
ANIMATIONINFO Buffer;
|
||||
return UserSystemParametersInfo_StructGet(uiAction, uiParam, pvParam, fWinIni,
|
||||
&Buffer,sizeof(Buffer));
|
||||
}
|
||||
case SPI_SETANIMATION:
|
||||
{
|
||||
ANIMATIONINFO Buffer;
|
||||
return UserSystemParametersInfo_StructSet(uiAction, uiParam, pvParam, fWinIni,
|
||||
&Buffer,sizeof(Buffer));
|
||||
}
|
||||
case SPI_GETACCESSTIMEOUT:
|
||||
{
|
||||
ACCESSTIMEOUT Buffer;
|
||||
return UserSystemParametersInfo_StructGet(uiAction, uiParam, pvParam, fWinIni,
|
||||
&Buffer,sizeof(Buffer));
|
||||
}
|
||||
case SPI_SETACCESSTIMEOUT:
|
||||
{
|
||||
ACCESSTIMEOUT Buffer;
|
||||
return UserSystemParametersInfo_StructSet(uiAction, uiParam, pvParam, fWinIni,
|
||||
&Buffer,sizeof(Buffer));
|
||||
}
|
||||
case SPI_GETFILTERKEYS:
|
||||
{
|
||||
FILTERKEYS Buffer;
|
||||
return UserSystemParametersInfo_StructGet(uiAction, uiParam, pvParam, fWinIni,
|
||||
&Buffer,sizeof(Buffer));
|
||||
}
|
||||
case SPI_SETFILTERKEYS:
|
||||
{
|
||||
FILTERKEYS Buffer;
|
||||
return UserSystemParametersInfo_StructSet(uiAction, uiParam, pvParam, fWinIni,
|
||||
&Buffer,sizeof(Buffer));
|
||||
}
|
||||
case SPI_GETHIGHCONTRAST:
|
||||
{
|
||||
HIGHCONTRAST Buffer;
|
||||
return UserSystemParametersInfo_StructGet(uiAction, uiParam, pvParam, fWinIni,
|
||||
&Buffer,sizeof(Buffer));
|
||||
}
|
||||
case SPI_SETHIGHCONTRAST:
|
||||
{
|
||||
HIGHCONTRAST Buffer;
|
||||
return UserSystemParametersInfo_StructSet(uiAction, uiParam, pvParam, fWinIni,
|
||||
&Buffer,sizeof(Buffer));
|
||||
}
|
||||
case SPI_GETSOUNDSENTRY:
|
||||
{
|
||||
SOUNDSENTRY Buffer;
|
||||
return UserSystemParametersInfo_StructGet(uiAction, uiParam, pvParam, fWinIni,
|
||||
&Buffer,sizeof(Buffer));
|
||||
}
|
||||
case SPI_SETSOUNDSENTRY:
|
||||
{
|
||||
SOUNDSENTRY Buffer;
|
||||
return UserSystemParametersInfo_StructSet(uiAction, uiParam, pvParam, fWinIni,
|
||||
&Buffer,sizeof(Buffer));
|
||||
}
|
||||
case SPI_GETSTICKYKEYS:
|
||||
{
|
||||
STICKYKEYS Buffer;
|
||||
return UserSystemParametersInfo_StructGet(uiAction, uiParam, pvParam, fWinIni,
|
||||
&Buffer,sizeof(Buffer));
|
||||
}
|
||||
case SPI_SETSTICKYKEYS:
|
||||
{
|
||||
STICKYKEYS Buffer;
|
||||
return UserSystemParametersInfo_StructSet(uiAction, uiParam, pvParam, fWinIni,
|
||||
&Buffer,sizeof(Buffer));
|
||||
}
|
||||
case SPI_GETTOGGLEKEYS:
|
||||
{
|
||||
TOGGLEKEYS Buffer;
|
||||
return UserSystemParametersInfo_StructGet(uiAction, uiParam, pvParam, fWinIni,
|
||||
&Buffer,sizeof(Buffer));
|
||||
}
|
||||
case SPI_SETTOGGLEKEYS:
|
||||
{
|
||||
TOGGLEKEYS Buffer;
|
||||
return UserSystemParametersInfo_StructSet(uiAction, uiParam, pvParam, fWinIni,
|
||||
&Buffer,sizeof(Buffer));
|
||||
NONCLIENTMETRICSW metrics;
|
||||
|
||||
Status = MmCopyFromCaller(&metrics, pvParam, sizeof(NONCLIENTMETRICSW));
|
||||
if(!NT_SUCCESS(Status))
|
||||
{
|
||||
SetLastNtError(Status);
|
||||
return( FALSE);
|
||||
}
|
||||
if(metrics.cbSize != sizeof(NONCLIENTMETRICSW))
|
||||
{
|
||||
SetLastWin32Error(ERROR_INVALID_PARAMETER);
|
||||
return( FALSE);
|
||||
}
|
||||
|
||||
if(!IntSystemParametersInfo(uiAction, uiParam, &metrics, fWinIni))
|
||||
{
|
||||
return( FALSE);
|
||||
}
|
||||
|
||||
Status = MmCopyToCaller(pvParam, &metrics, sizeof(NONCLIENTMETRICSW));
|
||||
if(!NT_SUCCESS(Status))
|
||||
{
|
||||
SetLastNtError(Status);
|
||||
return( FALSE);
|
||||
}
|
||||
return( TRUE);
|
||||
}
|
||||
case SPI_SETWORKAREA:
|
||||
{
|
||||
|
@ -1921,26 +1772,7 @@ UserSystemParametersInfo(
|
|||
}
|
||||
return( TRUE);
|
||||
}
|
||||
case SPI_SETICONTITLELOGFONT:
|
||||
{
|
||||
LOGFONTW LogFont;
|
||||
_SEH_TRY
|
||||
{
|
||||
ProbeForRead(pvParam, sizeof( LOGFONTW ), 1);
|
||||
RtlCopyMemory(&LogFont,pvParam,sizeof(LOGFONTW));
|
||||
}
|
||||
_SEH_HANDLE
|
||||
{
|
||||
Status = _SEH_GetExceptionCode();
|
||||
}
|
||||
_SEH_END;
|
||||
if(!NT_SUCCESS(Status))
|
||||
{
|
||||
SetLastNtError(Status);
|
||||
return( FALSE);
|
||||
}
|
||||
return IntSystemParametersInfo(uiAction, uiParam, &LogFont, fWinIni);
|
||||
}
|
||||
|
||||
case SPI_GETICONTITLELOGFONT:
|
||||
{
|
||||
LOGFONTW LogFont;
|
||||
|
@ -1965,35 +1797,6 @@ UserSystemParametersInfo(
|
|||
}
|
||||
return( TRUE);
|
||||
}
|
||||
case SPI_ICONVERTICALSPACING:
|
||||
case SPI_ICONHORIZONTALSPACING:
|
||||
{
|
||||
UINT Ret;
|
||||
if(!IntSystemParametersInfo(uiAction, uiParam, &Ret, fWinIni))
|
||||
{
|
||||
return( FALSE);
|
||||
}
|
||||
if(NULL != pvParam)
|
||||
{
|
||||
_SEH_TRY
|
||||
{
|
||||
ProbeForWrite(pvParam, sizeof(UINT ), 1);
|
||||
*(PUINT)pvParam = Ret;
|
||||
}
|
||||
_SEH_HANDLE
|
||||
{
|
||||
Status = _SEH_GetExceptionCode();
|
||||
}
|
||||
_SEH_END;
|
||||
if(!NT_SUCCESS(Status))
|
||||
{
|
||||
SetLastNtError(Status);
|
||||
return( FALSE);
|
||||
}
|
||||
}
|
||||
return( TRUE);
|
||||
}
|
||||
case SPI_SETDEFAULTINPUTLANG:
|
||||
case SPI_SETDESKWALLPAPER: /* !!! As opposed to the user mode version this version accepts a handle
|
||||
to the bitmap! */
|
||||
{
|
||||
|
@ -2015,7 +1818,6 @@ UserSystemParametersInfo(
|
|||
}
|
||||
return IntSystemParametersInfo(uiAction, uiParam, &Handle, fWinIni);
|
||||
}
|
||||
case SPI_GETDEFAULTINPUTLANG:
|
||||
case SPI_GETDESKWALLPAPER:
|
||||
{
|
||||
HANDLE Handle;
|
||||
|
|
Loading…
Reference in a new issue