Commit ba4652bf authored by jan.koester's avatar jan.koester
Browse files

test

parent 565e2d09
Loading
Loading
Loading
Loading
+11 −4
Changes for plugins/nodeinfo/nodeinfo.cpp: 11 added lines, 4 removed lines.
Original line number Diff line number Diff line
@@ -174,17 +174,22 @@ namespace blogi {
            }

            auto GetTrueOSVersion = [](OSVERSIONINFOW* info) {
                typedef LONG NTSTATUS;
                typedef NTSTATUS (WINAPI *RTLGETVERSION)(POSVERSIONINFOW lpVersionInformation);
                
                // RtlGetVersion resides in ntdll.dll
                HMODULE hNtdll = GetModuleHandle(TEXT("ntdll.dll"));
                if (!hNtdll) return -1; 
                if (!hNtdll) 
                    return static_cast<NTSTATUS>(-1); 
                
                // Dynamically load RtlGetVersion
                RTLGETVERSION pRtlGetVersion = (RTLGETVERSION)GetProcAddress(hNtdll, "RtlGetVersion");
                if (!pRtlGetVersion) return -1;
                if (!pRtlGetVersion) 
                    return static_cast<NTSTATUS>(-1);

                info->dwOSVersionInfoSize = sizeof(OSVERSIONINFOW);
                return pRtlGetVersion(info);
            }
            };

            OSVERSIONINFOW info;
            memset(&info, 0, sizeof(OSVERSIONINFOW));
@@ -223,7 +228,9 @@ namespace blogi {
                {22000,              {"Win 11 21H2",       "N/A"}}, 
                {22621,              {"Win 11 22H2",       "N/A"}},
                {22631,              {"Win 11 23H2",       "N/A"}},
                {26100,              {"Win 11 24H2",       "2025"}} // Shared build (future)
                {26100,              {"Win 11 24H2",       "2025"}}, // Shared build (future)
                {27000,              {"Win 11 25H1",       "N/A"}}, 
                {27600,              {"Win 11 25H2",       "N/A"}}
            };
            
            // --------------------------------------------------------------------