On Monday 29 December 2025 14:36:59 LIU Hao wrote: > 在 2025-12-29 01:51, Pali Rohár 写道: > > In commit 6b37f1f37a9639899efd4aba6a7d506682895792 were removed duplicate > > symbols which are available in more api-ms-win-core-console*.dll libraries. > > > > Function PeekConsoleInputA is in both api-ms-win-core-console-l1-1-0.dll > > and api-ms-win-core-console-l1-2-0.dll libraries. > > > > But for Windows XP there is no api-ms-win-core-console-l1-2-0.dll library, > > only api-ms-win-core-console-l1-1-0.dll library. > > > > So for Windows XP compatibility, use PeekConsoleInputA symbol from > > api-ms-win-core-console-l1-1-0.dll library and not from later versions. > > --- > > mingw-w64-crt/lib-common/api-ms-win-core-console-l1-1-0.def | 1 + > > mingw-w64-crt/lib-common/api-ms-win-core-console-l1-2-0.def | 1 - > > mingw-w64-crt/lib32/api-ms-win-core-console-l1-1-0.def | 1 + > > mingw-w64-crt/lib32/api-ms-win-core-console-l1-2-0.def | 1 - > > 4 files changed, 2 insertions(+), 2 deletions(-) > > I have two questions about this change: > > First one is that I'm wondering whether these api-ms-win-* things exist on > Windows XP.
Yes, it really exists. That is why I spotted this inconsistency. That api-ms-win-core-console-l1-1-0.dll library is part of the Microsoft Visual C++ Redistributable for Visual Studio 2019 16.7 package which contains UCRT libraries, these api-ms-win-core-* things and VC runtime libs (msvcp140.dll, vcamp140.dll, vccorlib140.dll, vcomp140.dll, vcruntime140.dll). For Windows XP these api-ms-win-core-* libraries are available: api-ms-win-core-console-l1-1-0.dll api-ms-win-core-datetime-l1-1-0.dll api-ms-win-core-debug-l1-1-0.dll api-ms-win-core-errorhandling-l1-1-0.dll api-ms-win-core-file-l1-1-0.dll api-ms-win-core-file-l1-2-0.dll api-ms-win-core-file-l2-1-0.dll api-ms-win-core-handle-l1-1-0.dll api-ms-win-core-heap-l1-1-0.dll api-ms-win-core-interlocked-l1-1-0.dll api-ms-win-core-libraryloader-l1-1-0.dll api-ms-win-core-localization-l1-2-0.dll api-ms-win-core-memory-l1-1-0.dll api-ms-win-core-namedpipe-l1-1-0.dll api-ms-win-core-processenvironment-l1-1-0.dll api-ms-win-core-processthreads-l1-1-0.dll api-ms-win-core-processthreads-l1-1-1.dll api-ms-win-core-profile-l1-1-0.dll api-ms-win-core-rtlsupport-l1-1-0.dll api-ms-win-core-string-l1-1-0.dll api-ms-win-core-synch-l1-1-0.dll api-ms-win-core-synch-l1-2-0.dll api-ms-win-core-sysinfo-l1-1-0.dll api-ms-win-core-timezone-l1-1-0.dll api-ms-win-core-util-l1-1-0.dll > These seem a Windows 8 thing, so on XP the DLL loader is not > aware of API set schemas and real DLLs with such exports have to exist. Exactly. And that is why it fails with api-ms-win-core-console-l1-2-0.dll but successfully loads api-ms-win-core-console-l1-1-0.dll. > Second one is that in Microsoft SDK this function is really only exported > from l1-2-0.def and not from l1-1-0.def: > > https://github.com/lhmouse/winsdk-defs/blob/0f5e1ee7c8f2e9c61b86895f7d83ba39d3ebd9e6/um/x86/api-ms-win-core-console-l1-1-0.def > https://github.com/lhmouse/winsdk-defs/blob/0f5e1ee7c8f2e9c61b86895f7d83ba39d3ebd9e6/um/x86/api-ms-win-core-console-l1-2-0.def Interesting. But those are generated from import libraries, which sometimes do not have to fully match the reality (like we know information about kernel32.dll exports). I really do not know. _______________________________________________ Mingw-w64-public mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/mingw-w64-public
