In Windows 10 x64 i got this from ntdll.dll
10.0.19041.3996
If someone prefer C
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
#include <stdio.h>
#pragma comment(lib, "version.lib")
// __declspec(dllimport) int __cdecl printf(char *, ...); // for msvcrt.dll
int __cdecl main(int argc, char **argv)
{
VS_FIXEDFILEINFO *pffi;
BYTE bData[2048]; // just enough
DWORD dwSize = GetFileVersionInfoSize(argv[1], NULL);
if (dwSize) {
DWORD dwLen;
GetFileVersionInfo(argv[1], 0, dwSize, &bData);
VerQueryValue(&bData, "\\", (VOID*)&pffi,&dwLen);
// not using HIWORD, LOWORD
printf("%d.%d.%d.%d\n", pffi->dwFileVersionMS >> 16, pffi->dwFileVersionMS & 0xFFFF,
pffi->dwFileVersionLS >> 16, pffi->dwFileVersionLS & 0xFFFF);
}
return 0;
}