4 ms·
It should have been supported approximately 20 years earlier than that. I was coding against Win32 looong before 2019 and wondering for years why they wouldn't
by asveikau 2y ago
It should have been supported approximately 20 years earlier than that. I was coding against Win32 looong before 2019 and wondering for years why they wouldn't let you.
An explanation I heard ~10 years prior is that doing so exposed bugs in CRT and nobody wanted to fix them.
- pjmlp 2y agoNot sure what that has to do with CRT, given that it isn't part of Win32.
- garganzol 2y agoCRT in a form of msvcrt.dll file had a de-facto presence in Windows since the end of 1990s. Later on, since 2018 or so, CRT availability was formalized in Windows API in form of ucrtbase.dll module.
- pjmlp 2y agoWhich doesn't change the fact that Win32 doesn't depend on it.
- okanat 2y agoIt is extremely hard to create an application that doesn't depend on CRT on Windows. CRT provides tables for handlers of SEH exceptions and provides the default event handlers. Win32 headers have hard dependencies of the handler tables CRT provides. So you need to go quite a bit out of your way to hack deep Win32 headers. Loading DLLs etc also may call CRT functions. You can read Mingw64 source to see how many hacks they had to do to make it work.
- ChrisSD 2y agoThat's the "vcruntime" not the "ucrt". There has been a distinction since the ucrt was made an official part of the OS. It's very easy to make a win32 program without the ucrt filesytems APIs so long as you don't mind being platform-specific (or making your own cross-platform wrappers).
- pjmlp 2y agoI have been developing for Microsoft platforms since MS-DOS 3.3, Win16 and Win32 development without any function from standard C library has been a thing for decades, for those doing C development without caring about portability, like demoscene competitions and gaming. Using C++ is another matter.
- ygra 2y agomsvcrt was never for applications to use: https://devblogs.microsoft.com/oldnewthing/20140411-00/?p=1273 https://devblogs.microsoft.com/oldnewthing/20140411-00/?p=12...
- okanat 2y agoThe bundled one with Windows wasn't. However the same "feature" exists in redistributed versions of msvcrt.
- asveikau 2y agoIt's still an important piece of the app compatibility story.
- cesarb 2y ago> An explanation I heard ~10 years prior is that doing so exposed bugs in CRT and nobody wanted to fix them. What I've heard is that the issue is not with the CRT, but with applications using fixed-size byte buffers. IIRC, converting from UTF-16 to any of the traditional Windows code pages requires at most two bytes for each UTF-16 code unit, while the UTF-8 "code page" can need three bytes. That would lead to buffer overflows in these legacy applications if the "ANSI" code page was changed to UTF-8.