api-ms-win-core-console-l3-2-0.dll missing from SDK redistributable files

Isaac 11 Reputation points
2021-03-04T01:29:00.067+00:00

When using app-local deployment, a C++ desktop application which uses GetConsoleWindow will have a dependency on the api-ms-win-core-console-l3-2-0.dll . This isn't present on older versions of Windows 10.

Following the instructions at https://devblogs.microsoft.com/cppblog/introducing-the-universal-crt/ - in particular step 6 still yields an executable which doesn't start and complains about the missing dll.

Looking at C:\Program Files (x86)\Windows Kits\10\Redist\10.0.19041.0\ucrt\DLLs\x64 and prior SDK versions this api-ms-win-core-console-l3-2-0.dll isn't included.

Can this please be added?

Windows API - Win32
Windows API - Win32
A core set of Windows application programming interfaces (APIs) for desktop and server applications. Previously known as Win32 API.
2,426 questions
{count} vote

3 answers

Sort by: Most helpful
  1. Strive Sun-MSFT 426 Reputation points
    2021-03-31T09:22:01.03+00:00

    Hello, @ Isaac-5278

    For #1 question, please refer to “umbrella libraries” below:

    To make it easier to restrict your code to Win32 APIs that are supported in the core OS, we provide a series of umbrella libraries. For example, an umbrella library named OneCore.lib provides the exports for the subset of Win32 APIs that are common to all Windows 10 devices.

    The APIs in an umbrella library may be implemented across a range of modules. The umbrella library abstracts those details away from you, making your code more portable across Windows 10 versions and devices. Instead of linking to libraries such as kernel32.lib and advapi32.lib, simply link your desktop app or driver with the umbrella library that contains the set of core OS APIs that you're interested in.

    For #2 question, please understand that "api-ms-win-core-console-l3-2-0.dll" is a contract but NOT a DLL file. There is no way to include a contract in the vcredist package, but Windows system will redirect your API call to the appropriate DLL entries in runtime.

    ----------

    Thank you!

    If the answer is helpful, please click "Accept Answer" and upvote it.

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    1 person found this answer helpful.
    0 comments No comments

  2. 111 111 6 Reputation points
    2022-08-20T22:41:57.797+00:00

    where would one find this dll ? i have to run an application that requires it.

    1 person found this answer helpful.

  3. Strive Sun-MSFT 426 Reputation points
    2021-03-09T06:43:24.087+00:00

    Also from the document you linked, I would expect this dll to be included in the redist folder?

    You can use an API set name in the context of a loader operation such as LoadLibrary or P/Invoke instead of a DLL module name to ensure a correct route to the implementation no matter where the API is actually implemented on the current device. However, when you do this you must append the string .dll at the end of the contract name. This is a requirement of the loader to function properly, and is not considered actually a part of the contract name. Although contract names appear similar to DLL names in this context, they are fundamentally different from DLL module names and do not directly refer to a file on disk.

    More details: Windows API sets

    ----------

    Thank you!

    If the answer is helpful, please click "Accept Answer" and upvote it.

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.