Details
-
Bug
-
Resolution: Postponed
-
Major
-
None
-
None
-
None
Description
The function SystemParametersInfo with suboption SPI_GETNONCLIENTMETRICS will fail when the cbSize parameter and uiParam exceed 340. These parameters are usually set to sizeof(NONCLIENTMETRICS) which equals to 340 when WINVER < 0x0600 (Vista). On applications compiled with WINVER > 0x0600 (the default is 0x0A00 in newer MSVC versions) the NONCLIENTMETRICS structure gains an additional 4 bytes due to the newly added iPaddedBorderWidth member needed to support Aero themes. This causes ReactOS to reject these application's SPI_GETNONCLIENTMETRICS requests, returning FALSE (failure) regardless if the applications use the new field.
The proposed fix would be to whitelist the Vista+ sizeof(NONCLIENTMETRICS) which is 344 and set the iPaddedBorderWidth value to 0 by default and 4 for Vista+ compatibility profiles.
Related MSDN page: https://docs.microsoft.com/en-us/windows/win32/api/winuser/ns-winuser-nonclientmetricsa
Attachments
Issue Links
- relates to
-
CORE-18021 Invalid use of SystemParametersInfo
-
- Untriaged
-