Why does GetFileVersionInfo on kernel32.dll in Windows 10 return version 6.2?

后端 未结 2 1994
一向
一向 2021-01-06 06:09

I am trying to retrieve kernel32.dll version in order to perform a Windows version check. Yet, for some reason, even though kernel32.dll\'s version

2条回答
  •  南笙
    南笙 (楼主)
    2021-01-06 06:48

    You are reading the wrong fields from the version information for this task. Instead of dwFileVersionMS and dwFileVersionLS use dwProductVersionMS and dwProductVersionLS.

    The file version fields are subject to supportedOS compatibility issues. That is their values depend on the supportedOS levels declared in your application manifest. On the other hand the product version fields do not depend on the manifest.

提交回复
热议问题