diff --git a/reactos/win32ss/user/ntuser/sysparams.c b/reactos/win32ss/user/ntuser/sysparams.c index 50edb527e5f..24f943c4fe2 100644 --- a/reactos/win32ss/user/ntuser/sysparams.c +++ b/reactos/win32ss/user/ntuser/sysparams.c @@ -25,9 +25,18 @@ BOOL g_PaintDesktopVersion = FALSE; #define METRIC2REG(met) (-((((met) * 1440)- 0) / dpi)) #define REQ_INTERACTIVE_WINSTA(err) \ - if ( GetW32ProcessInfo()->prpwinsta != InputWindowStation) \ + if (GetW32ProcessInfo()->prpwinsta) \ { \ - ERR("NtUserSystemParametersInfo requires interactive window station (current is %wZ)\n", &GetW32ProcessInfo()->prpwinsta->Name); \ + if (GetW32ProcessInfo()->prpwinsta != InputWindowStation) \ + { \ + ERR("NtUserSystemParametersInfo requires interactive window station (current is %wZ)\n", &GetW32ProcessInfo()->prpwinsta->Name); \ + EngSetLastError(err); \ + return 0; \ + } \ + } \ + else \ + { \ + ERR("NtUserSystemParametersInfo called without active window station, and it requires an interactive one.\n"); \ EngSetLastError(err); \ return 0; \ } @@ -1568,7 +1577,7 @@ UserSystemParametersInfo( /* Get a pointer to the current Windowstation */ if (!ppi->prpwinsta) { - ERR("UserSystemParametersInfo called without active windowstation.\n"); + ERR("UserSystemParametersInfo called without active window station.\n"); //ASSERT(FALSE); //return FALSE; }