The MASM Forum

Specialised Projects => Assembler/Compiler Technology => Topic started by: Vortex on October 08, 2023, 06:58:53 AM

Title: The Universal CRT
Post by: Vortex on October 08, 2023, 06:58:53 AM
A nice article by James McNellis :

Introducing the Universal CRT

https://devblogs.microsoft.com/cppblog/introducing-the-universal-crt/
Title: Re: The Universal CRT
Post by: jj2007 on October 08, 2023, 08:14:54 AM
QuoteYou will need to copy all of the DLLs with your app (note that the set of DLLs are necessary is different on different versions of Windows, so you must include all of the DLLs in order for your program to run on all supported versions of Windows)

Sounds suspiciously like good ol' DLL hell :biggrin:
Title: Re: The Universal CRT
Post by: Vortex on October 08, 2023, 08:18:55 AM
Hi Jochen,

Exactly. The last versions of the C\C++ compilers are defaulting to the universal C runtime library. Too bad that this is going to replace our good old friend msvcrt.dll
Title: Re: The Universal CRT
Post by: Vortex on October 08, 2023, 08:55:40 AM
How to correctly link to UCRT :

https://mingwpy.github.io/ucrt.html
Title: Re: The Universal CRT
Post by: NoCforMe on October 09, 2023, 03:07:20 PM
Quote from: Vortex on October 08, 2023, 08:18:55 AMHi Jochen,

Exactly. The last versions of the C\C++ compilers are defaulting to the universal C runtime library. Too bad that this is going to replace our good old friend msvcrt.dll

Not my friend; I've never used it.

Just out of curiosity, what exactly is in that library and why would I want to use it? I make do pretty well between the MASM32 stuff and my homemade functions.
Title: Re: The Universal CRT
Post by: TimoVJL on October 09, 2023, 07:04:35 PM
Quote from: NoCforMe on October 09, 2023, 03:07:20 PMJust out of curiosity, what exactly is in that library and why would I want to use it? I make do pretty well between the MASM32 stuff and my homemade functions.
Quote1. The Universal CRT is a Windows operating system component. It is a part of Windows 10.
Title: Re: The Universal CRT
Post by: NoCforMe on October 10, 2023, 04:45:45 AM
OK, but what's in it? Curious but not enough to do further research, hence the question.
Title: Re: The Universal CRT
Post by: Vortex on October 10, 2023, 06:32:38 AM
Hi NoCforMe,

You can consider the Universal C Runtime as a replacement \ upgrade to the classical library msvcrt.dll
Title: Re: The Universal CRT
Post by: jj2007 on October 10, 2023, 07:55:44 AM
I made a quick check: neither the MasmBasic library nor the RichMasm IDE use the msvcrt library. No crt_ in over 50k lines - you really can live without it.

Hutch didn't like the crt, and it was always kind of uncool to use it in Masm32 code.
Title: Re: The Universal CRT
Post by: zedd on October 10, 2023, 08:16:00 AM
Quote from: TimoVJL on October 09, 2023, 07:04:35 PM
Quote1. The Universal CRT is a Windows operating system component. It is a part of Windows 10.

Well, that does it for me... I now know, that I will never use it. I break out in hives just thinking about Windows 10/11...  :tongue:  :joking:

I try to make my code backward compatible. Something which Microsoft has done everything in its power, to abandon.

Quote from: jj2007 on October 10, 2023, 07:55:44 AMHutch didn't like the crt, and it was always kind of uncool to use it in Masm32 code.
You would be surprised to see then, that one of the last versions of qeditor uses a couple api's from msvcrt...  :cool: ... "atol" and "atoi"  :wink2:  I was surprised.
Title: Re: The Universal CRT
Post by: NoCforMe on October 10, 2023, 01:09:17 PM
Quote from: Vortex on October 10, 2023, 06:32:38 AMYou can consider the Universal C Runtime as a replacement \ upgrade to the classical library msvcrt.dll

But I don't use that either; never have and never will. So what's in there, string routines, numeric conversion functions, low-level stuff?
Title: Re: The Universal CRT
Post by: Greenhorn on October 11, 2023, 02:43:17 AM
Quote from: NoCforMe on October 10, 2023, 01:09:17 PM
Quote from: Vortex on October 10, 2023, 06:32:38 AMYou can consider the Universal C Runtime as a replacement \ upgrade to the classical library msvcrt.dll

But I don't use that either; never have and never will. So what's in there, string routines, numeric conversion functions, low-level stuff?

https://cplusplus.com/reference/

https://learn.microsoft.com/en-us/cpp/c-runtime-library/c-run-time-library-reference?view=msvc-170

https://www.gnu.org/software/libc/manual/pdf/libc.pdf
Title: Re: The Universal CRT
Post by: TimoVJL on October 11, 2023, 03:18:20 AM
The nickname NoCforMe tell a lot for many.
Just an one person to develop a new stone wheels ?
In TLPEView msvcrt.dll wasn't used, but if you really work for someone ?
Title: Re: The Universal CRT
Post by: NoCforMe on October 11, 2023, 04:11:57 AM
Quote from: TimoVJL on October 11, 2023, 03:18:20 AMThe nickname NoCforMe tell a lot for many.
Well, I damn well hope so. I didn't make that handle for no reason.

QuoteJust an one person to develop a new stone wheels ?
Yes, just one person here who likes to reinvent my own wheels, stone or otherwise. Do you have a problem with that?

QuoteIn TLPEView msvcrt.dll wasn't used, but if you really work for someone ?
Look, I don't work for anyone; I'm a hobby programmer, so I just don't need those libraries. Sheesh, what is it with you people? This is supposed to be an assembly language forum, not some fan club for high-level languages.
Title: Re: The Universal CRT
Post by: Vortex on October 11, 2023, 04:19:19 AM
Hi NoCforMe,

The Universal C runtime library contains a lot of useful services like string manipluation, memory management, file handling, number to string convertion etc. There is nothing wrong with this thread as it's location is the Assembler/Compiler Technology subforum. An assembly programmer might be interested in this library for practical programming purposes. It's just only an approach to combine assembly and C code. If you wish, I can present a small example.
Title: Re: The Universal CRT
Post by: NoCforMe on October 11, 2023, 04:55:56 AM
No, that really won't be necessary. I understand what the CRT is, just didn't know what it contained (Greenhorn's links satisfied my curiosity). I know how to call a function, whether for C or for native assembly.
Title: Re: The Universal CRT
Post by: Vortex on October 11, 2023, 04:57:59 AM
Hi NoCforMe,

No worries, it's all OK.