I asked ChatGPT the following:
I'm confused. One touted benefit of the UCRT is the elimination of the need to redistribute specific versions of the Microsoft Visual C runtime. Suppose an earlier version of "printf" in the UCRT supports a specific application that was developed at the same time. Years pass, and "printf" is updated and no longer compatible with the now years-old application that depends on the old version of "printf". The app won't run with the current UCRT because the current "printf" is incompatible.
I thought the strategy behind the UCRT was to maintain all versions of the UCRT on all computers that use Windows after 2015, and that the operating system would check for UCRT DLL version information, locate the correct UCRT DLL, and then launch old and new apps using the UCRT DLLs that are specific to those apps. If it doesn't work that way, then what problem does the UCRT even fix?
ChatGPT responded:
I understand your confusion, and I'll try to clarify how the Universal C Runtime (UCRT) works and its purpose.
The UCRT is designed to address the problem of redistributing specific versions of the Microsoft Visual C++ runtime libraries with applications. Its primary goal is to provide a standardized set of runtime libraries with the Windows operating system, reducing the need for developers to include and manage these libraries with their applications.
Here's how the UCRT typically works:
UCRT Versioning: The UCRT is versioned, and different versions of Windows include different UCRT versions. When an application is compiled, it links against a specific version of the UCRT.
Redistributable UCRT: To ensure compatibility, older versions of the UCRT are made available as redistributable packages. This means that if an application depends on a specific version of the UCRT, the developer can include that specific redistributable package with the application installer. This ensures that the required UCRT version is available on the target system.
System UCRT: While newer versions of the UCRT are included with Windows updates, the Windows operating system generally aims to maintain backward compatibility. This means that when an application built with an older UCRT version runs on a newer Windows system, it should continue to work because the system includes the necessary UCRT version. The Windows operating system can use manifest files to determine which version of the UCRT to load for each application.
However, there can be exceptions to this, especially if an application relies on specific behaviors or functions that have changed significantly between UCRT versions. In such cases, compatibility issues may arise.
In summary, the UCRT is intended to make it easier for developers to distribute their applications without worrying about bundling specific versions of runtime libraries. While the Windows operating system does provide backward compatibility to a certain extent, developers should still ensure that their applications are compatible with the UCRT version available on their target systems. This may involve including redistributable packages or implementing compatibility checks in the application itself.
MrBcx says:
So, in other other words, UCRT did not fix a damn thing.
[Added Later]
Opposing viewpoints might include that the UCRT library has improved in other ways.
And as long as what we do depends on the Windows operating system, it's probably
best to > assume < that viewpoint has merit.