Niall’s virtual diary archives – Wednesday 23rd December 2015

by . Last updated . This page has been accessed 38 times since the 26th March 2019.

Wednesday 23rd December 2015: 8.49am. As part of writing the new storage profiles support for the Boost.AFIO v2 rewrite, I really need to get the NT kernel version for the profile so one knows what version of NTFS/ReFS/FAT the profile is valid for.

Unfortunately, the Windows API GetVersionEx() lies to you from Win8.1 onwards, and I cannot find any obvious way of retrieving the actual genuine NT kernel version without hard encoding values based on probing for features which is not future proof. I've spent most of my 90 mins morning of Boost library programming before work scratching my head on this ... :(

The only thing I can think of is yanking the version string out of the NTDLL.DLL resource section. Can anyone think of anything better?

Go back to the archive index Go back to the latest entries

Contact the webmaster: Niall Douglas @ webmaster2<at symbol>nedprod.com (Last updated: 2015-12-23 08:49:13 +0000 UTC)