OSVERSIONINFOEXA (winnt.h) - Win32 apps | Microsoft Learn
It hasnt got Windows 11 listed, just wondered if anyone knows what the Windows 11 numbers are going to be or know of a link showing what Win11 will be?
TIA
OSVERSIONINFOEXA (winnt.h) - Win32 apps | Microsoft Learn
It hasnt got Windows 11 listed, just wondered if anyone knows what the Windows 11 numbers are going to be or know of a link showing what Win11 will be?
TIA
I’d probably get the Win11 SDK and search that.
Slightly OT - FWIW, both win 10 and win 11 share the same version GUID in an app’s manifest:
And this one remarks that "the GetVersion and GetVersionEx functions have been deprecated. "
Well at least I dont have to update the manifest template I posted to the newsgroups a few years back.
It’s 10.0, it didn’t change for Win11. Look at the build #, <22000 is Win10 and higher is Win11
I downloaded the ISO and its filename is 22621.1.220506-1250.ni_release_WindowsSDK.
The manifest is interesting.
<FileList
DisplayName = "Universal Windows"
PlatformIdentity = "UAP, Version=10.0.22621.0"
TargetFramework = ".NETCore,version=v4.5.3;.NETFramework,version=v4.5.3"
MinVSVersion = "14.0"
MinOSVersion = "6.1"
MaxOSVersionTested = "10.0"
UnsupportedDowntarget = "Windows, version=8.1">
<File Reference = "Windows">
<ToolboxItems VSCategory = "Toolbox.Default"/>
</File>
</FileList>
I can see this MaxOSVersionTested = “10.0” causing a bit of confusion.
Min OS Version is Win7 or Server 2008R2, so is the backward compatibility only going back to Win7 now? That will make weeding out old api’s interesting.
Operating System Version - Win32 apps | Microsoft Learn
!Code to fiddle Windows OS Version
l_build short
l_version string
l_build = SYSTEM{PROP:WindowsVersion,5}
if l_build => 22000 THEN
l_version = (' Windows Version: ' & FindandReplaceSrc(SYSTEM{PROP:WindowsVersion,2},'10','11')) & ' Build: ' & SYSTEM{PROP:WindowsVersion,5}
ELSE
l_version = (' Windows Version: ' & SYSTEM{PROP:WindowsVersion,2}) & ' Build: ' & SYSTEM{PROP:WindowsVersion,5}
END
FindandReplaceSrc Procedure
Prototype:
(string p_text,string p_find, string p_replace), string
Parameters:
(string p_text,string p_find, string p_replace)
l_end short
if instring(p_find,p_text,1,1) THEN
l_end=instring(clip(p_find),p_text,1,1)
if l_end then
Return ( sub(p_text,1,l_end -1) & p_replace & clip(l_text) & sub(clip(p_text),l_end+len(clip(p_find)), len(clip(p_text))-l_end-1+len(clip(p_find))))
else
return(p_text)
END
END
Actual API functions to get Windows version information:
in KERNEL32.DLL : VerifyVersionInfo and GetProductInfo
in SHLWAPI.DLL: IsOS
These 3 functions must be used in conjunction to get all the info about OS. See description of them on the MS site for details.
I’ve been using:
IsWin11OrGreater PROCEDURE()!,BOOL
WindowsVersion:BuildNumber EQUATE(5)
CODE
RETURN CHOOSE( SYSTEM{PROP:WindowsVersion, WindowsVersion:BuildNumber} >= 21966 )