Retrieve UCRT version

Daniel Marquez 0 Reputation points
2025-02-27T21:18:37.3866667+00:00

I want to retrieve the version of UCRT that is used when building a C program or that was used on an already built C executable. The main motivation behind this is that we want to create some validations in our toolchain that ensures the version of UCRT we are using to build with at least the same or earlier than the version we are redistributing (for compatibility reasons).

What i've tried:

  1. Looking for macros in the C standard library that might give some insight
  2. Using other tools like depends.exe and dumpbin to extract information on built executable

Curious to know if anyone has similar motivation to accomplish something like this?

C++
C++
A high-level, general-purpose programming language, created as an extension of the C programming language, that has object-oriented, generic, and functional features in addition to facilities for low-level memory manipulation.
3,868 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Darran Rowe 1,426 Reputation points
    2025-02-27T22:09:30.0066667+00:00

    This is generally a meaningless and it is pretty much guaranteed that most people will be running against older versions of the UCRT.

    Since the UCRT is distributed as part of Windows, the version that is being built against is identical to the version of the Windows SDK that is being used. So if the Windows SDK 10.0.26100.3037 SDK is being used then that is the version of the UCRT that is being built against. The problem is, the executable built against this executable will have no issues running on Windows 10 10.0.19045.xxxx.

    The UCRT is not the same as the VC Redistributable.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.