From cc65c4da6ad762e8648b2ab6a801e07c50922d3d Mon Sep 17 00:00:00 2001 From: Zhao Yuhang <2546789017@qq.com> Date: 周二, 04 2月 2025 21:58:21 +0800 Subject: [PATCH] fix compilation error --- src/core/qwindowkit_windows.cpp | 7 ++++++- 1 files changed, 6 insertions(+), 1 deletions(-) diff --git a/src/core/qwindowkit_windows.cpp b/src/core/qwindowkit_windows.cpp index b28e4e0..58c3d0f 100644 --- a/src/core/qwindowkit_windows.cpp +++ b/src/core/qwindowkit_windows.cpp @@ -1,12 +1,18 @@ +// 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" namespace QWK { 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); @@ -82,5 +88,4 @@ return qMakePair(value, ok); } #endif - } \ No newline at end of file -- Gitblit v1.9.1