/ucrt

Primary LanguageC++OtherNOASSERTION

Universal C Runtime

Smirnov Vladimir aka mapron patch notes

This is a form of UCRT public repo.
I provided basic support for building with cmake for AMD64 target with MSVC2019.
I used some code from Wine project, MinGW and musl (and a bit from WRK header file - https://github.com/HighSchoolSoftwareClub/Windows-Research-Kernel-WRK-/blob/master/LICENSE.txt) - so licensing in combination with sdk_license.rtf is a total mess.
I suggest to not distrubute anything (source or binary) without consulting lawyers. And don't even dare of commercial usage.

build instructions:

  1. run cmake with msvc amd64 toolchain
  2. build (make/ninja) all
  3. run sample_hello / sample_file_process

What the UCRT is

Visual C++ C Runtime (CRT) was shipped with and versioned by each releases of Visual Studio (2002, 2003, 2005, 2008, 2010, 2012, and 2013) before. Since Visual Studio 2015, the CRT has been split into two logical parts: The VCRuntime, which contained the compiler support functionality required for things like process startup and exception handling, and a "stable" part named Universal CRT, which can be considered as the Windows' equivalent of the GNU C Library (glibc) in the Linux world, that contained all of the purely library parts of the CRT including C99 and POSIX functionality and some extensions.

How the UCRT exsits

A C++ program built with Visual Studio 2015 or later will depend on the Universal CRT. The UCRT DLLs are named ucrtbase.dll (release) and ucrtbased.dll (debug); they do not include a version number and become components of Windows Operating System.

  • The UCRT is a part of Windows 10.
  • There are Windows Update MSU packages that distribute the UCRT for Windows Vista, 7 and 8.x.
  • On Windows XP, the VCRedist will deploy the UCRT itself.

Where the UCRT sources

  • Include: C:\Program Files (x86)\Windows Kits\10\Include\%Version%\ucrt.
  • Source: C:\Program Files (x86)\Windows Kits\10\Source\%Version%\ucrt.
  • Redist DLLs: C:\Program Files (x86)\Windows Kits\10\Redist\%Version%\ucrt\DLLs\%ARCH%.
  • Debug DLL: C:\Program Files (x86)\Windows Kits\10\bin\%Version%\%ARCH%\ucrt.

References

  1. Introducing the Universal CRT.
  2. Determining Which DLLs to Redistribute.
  3. Update for Universal C Runtime in Windows.