diff --git a/src/corelib/io/qstandardpaths_win.cpp b/src/corelib/io/qstandardpaths_win.cpp index 2ddf4a5fe1..d191ed33b4 100644 --- a/src/corelib/io/qstandardpaths_win.cpp +++ b/src/corelib/io/qstandardpaths_win.cpp @@ -92,8 +92,10 @@ static inline void appendTestMode(QString &path) path += QLatin1String("/qttest"); } -static bool isProcessLowIntegrity() { - const HANDLE process_token = GetCurrentProcessToken(); +static bool isProcessLowIntegrity() +{ + // same as GetCurrentProcessToken() + const auto process_token = HANDLE(quintptr(-4)); QVarLengthArray token_info_buf(256); auto* token_info = reinterpret_cast(token_info_buf.data());