Techwiki:WindowStations
Window Stations and SystemParametersInfo
NtUserSystemParametersInfo will fail when not executed on an interactive WindowStation. SPI_SETXXX fails, setting LastError to ERROR_REQUIRES_INTERACTIVE_WINDOWSTATION, SPI_GETXXX fails, setting LastError to ERROR_ACCESS_DENIED.