| | |
| | | // Copyright (C) 2023-2024 Stdware Collections |
| | | // Copyright (C) 2023-2024 Stdware Collections (https://www.github.com/stdware) |
| | | // Copyright (C) 2021-2023 wangwenx190 (Yuhang Zhao) |
| | | // SPDX-License-Identifier: Apache-2.0 |
| | | |
| | | #include "qwindowkit_windows.h" |
| | |
| | | |
| | | static RTL_OSVERSIONINFOW GetRealOSVersionImpl() { |
| | | HMODULE hMod = ::GetModuleHandleW(L"ntdll.dll"); |
| | | Q_ASSERT(hMod); |
| | | using RtlGetVersionPtr = NTSTATUS(WINAPI *)(PRTL_OSVERSIONINFOW); |
| | | auto pRtlGetVersion = |
| | | reinterpret_cast<RtlGetVersionPtr>(::GetProcAddress(hMod, "RtlGetVersion")); |
| | | Q_ASSERT(pRtlGetVersion); |
| | | RTL_OSVERSIONINFOW rovi{}; |
| | | rovi.dwOSVersionInfoSize = sizeof(rovi); |
| | | pRtlGetVersion(&rovi); |
| | |
| | | return qMakePair(value, ok); |
| | | } |
| | | #endif |
| | | |
| | | } |