mirror of
https://github.com/reactos/reactos.git
synced 2025-08-03 14:25:52 +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
1 changed files with 52 additions and 250 deletions
|
@ -1434,94 +1434,6 @@ IntSystemParametersInfo(
|
||||||
return TRUE;
|
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
|
* @implemented
|
||||||
*/
|
*/
|
||||||
|
@ -1713,125 +1625,64 @@ UserSystemParametersInfo(
|
||||||
}
|
}
|
||||||
return( TRUE);
|
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:
|
case SPI_GETMINIMIZEDMETRICS:
|
||||||
{
|
|
||||||
MINIMIZEDMETRICS Buffer;
|
|
||||||
return UserSystemParametersInfo_StructGet(uiAction, uiParam, pvParam, fWinIni,
|
|
||||||
&Buffer,sizeof(Buffer));
|
|
||||||
}
|
|
||||||
case SPI_SETMINIMIZEDMETRICS:
|
case SPI_SETMINIMIZEDMETRICS:
|
||||||
{
|
{
|
||||||
MINIMIZEDMETRICS Buffer;
|
MINIMIZEDMETRICS minimetrics;
|
||||||
return UserSystemParametersInfo_StructSet(uiAction, uiParam, pvParam, fWinIni,
|
|
||||||
&Buffer,sizeof(Buffer));
|
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:
|
case SPI_GETNONCLIENTMETRICS:
|
||||||
{
|
|
||||||
NONCLIENTMETRICS Buffer;
|
|
||||||
return UserSystemParametersInfo_StructGet(uiAction, uiParam, pvParam, fWinIni,
|
|
||||||
&Buffer,sizeof(Buffer));
|
|
||||||
}
|
|
||||||
case SPI_SETNONCLIENTMETRICS:
|
case SPI_SETNONCLIENTMETRICS:
|
||||||
{
|
{
|
||||||
NONCLIENTMETRICS Buffer;
|
NONCLIENTMETRICSW metrics;
|
||||||
return UserSystemParametersInfo_StructSet(uiAction, uiParam, pvParam, fWinIni,
|
|
||||||
&Buffer,sizeof(Buffer));
|
Status = MmCopyFromCaller(&metrics, pvParam, sizeof(NONCLIENTMETRICSW));
|
||||||
}
|
if(!NT_SUCCESS(Status))
|
||||||
case SPI_GETANIMATION:
|
{
|
||||||
{
|
SetLastNtError(Status);
|
||||||
ANIMATIONINFO Buffer;
|
return( FALSE);
|
||||||
return UserSystemParametersInfo_StructGet(uiAction, uiParam, pvParam, fWinIni,
|
}
|
||||||
&Buffer,sizeof(Buffer));
|
if(metrics.cbSize != sizeof(NONCLIENTMETRICSW))
|
||||||
}
|
{
|
||||||
case SPI_SETANIMATION:
|
SetLastWin32Error(ERROR_INVALID_PARAMETER);
|
||||||
{
|
return( FALSE);
|
||||||
ANIMATIONINFO Buffer;
|
}
|
||||||
return UserSystemParametersInfo_StructSet(uiAction, uiParam, pvParam, fWinIni,
|
|
||||||
&Buffer,sizeof(Buffer));
|
if(!IntSystemParametersInfo(uiAction, uiParam, &metrics, fWinIni))
|
||||||
}
|
{
|
||||||
case SPI_GETACCESSTIMEOUT:
|
return( FALSE);
|
||||||
{
|
}
|
||||||
ACCESSTIMEOUT Buffer;
|
|
||||||
return UserSystemParametersInfo_StructGet(uiAction, uiParam, pvParam, fWinIni,
|
Status = MmCopyToCaller(pvParam, &metrics, sizeof(NONCLIENTMETRICSW));
|
||||||
&Buffer,sizeof(Buffer));
|
if(!NT_SUCCESS(Status))
|
||||||
}
|
{
|
||||||
case SPI_SETACCESSTIMEOUT:
|
SetLastNtError(Status);
|
||||||
{
|
return( FALSE);
|
||||||
ACCESSTIMEOUT Buffer;
|
}
|
||||||
return UserSystemParametersInfo_StructSet(uiAction, uiParam, pvParam, fWinIni,
|
return( TRUE);
|
||||||
&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));
|
|
||||||
}
|
}
|
||||||
case SPI_SETWORKAREA:
|
case SPI_SETWORKAREA:
|
||||||
{
|
{
|
||||||
|
@ -1921,26 +1772,7 @@ UserSystemParametersInfo(
|
||||||
}
|
}
|
||||||
return( TRUE);
|
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:
|
case SPI_GETICONTITLELOGFONT:
|
||||||
{
|
{
|
||||||
LOGFONTW LogFont;
|
LOGFONTW LogFont;
|
||||||
|
@ -1965,35 +1797,6 @@ UserSystemParametersInfo(
|
||||||
}
|
}
|
||||||
return( TRUE);
|
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
|
case SPI_SETDESKWALLPAPER: /* !!! As opposed to the user mode version this version accepts a handle
|
||||||
to the bitmap! */
|
to the bitmap! */
|
||||||
{
|
{
|
||||||
|
@ -2015,7 +1818,6 @@ UserSystemParametersInfo(
|
||||||
}
|
}
|
||||||
return IntSystemParametersInfo(uiAction, uiParam, &Handle, fWinIni);
|
return IntSystemParametersInfo(uiAction, uiParam, &Handle, fWinIni);
|
||||||
}
|
}
|
||||||
case SPI_GETDEFAULTINPUTLANG:
|
|
||||||
case SPI_GETDESKWALLPAPER:
|
case SPI_GETDESKWALLPAPER:
|
||||||
{
|
{
|
||||||
HANDLE Handle;
|
HANDLE Handle;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue