MCPcopy Create free account
hub / github.com/OGSR/OGSR-Engine / LogOsVersion

Function LogOsVersion

ogsr_engine/xr_3da/Device_Initialize.cpp:5–22  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3#include <winternl.h>
4
5static void LogOsVersion()
6{
7 static auto RtlGetVersion = reinterpret_cast<NTSTATUS(WINAPI*)(LPOSVERSIONINFOEXW)>(GetProcAddress(GetModuleHandle("ntdll"), "RtlGetVersion"));
8
9 if (RtlGetVersion)
10 {
11 OSVERSIONINFOEXW osInfo{};
12 osInfo.dwOSVersionInfoSize = sizeof(osInfo);
13
14 if (NT_SUCCESS(RtlGetVersion(&osInfo)))
15 {
16 Msg("--OS Version major: [%d] minor: [%d], build: [%d]. Server OS: [%s]", osInfo.dwMajorVersion, osInfo.dwMinorVersion, osInfo.dwBuildNumber,
17 osInfo.wProductType != VER_NT_WORKSTATION ? "yes" : "no");
18 return;
19 }
20 }
21 Msg("!![%s] Can't get RtlGetVersion", __FUNCTION__);
22}
23
24static void LogWorkingDriveInfo()
25{

Callers 1

InitializeMethod · 0.85

Calls 1

MsgFunction · 0.85

Tested by

no test coverage detected