Marco Freudenberger
Marco Freudenberger

Reputation: 689

Getting bound Microsoft Visual C++ Runtime version

Using Visual Studio 2022, and linking a C++ executable or DLL to the MSVCRT as dynamic library (DLL, using /MD switch), is there a function call to determine at runtime the exact MSVCRT version that is actually used by the current module (the version of the msvcrt DLLs actually used)?

Background is a nasty change ("fix") to the STL in MS Visual Studio 2022 V 17.10 in regards to std::mutex constexpr constructor, which requires that the runtime version is at least 19.40, otherwise causing a nullptr being dereferenced at runtime when calling std::mutex::lock(). So I want to check the rule that the runtime should be at least as new as what the binaries were build with.

Upvotes: 0

Views: 64

Answers (0)

Related Questions