4 ms·
I've written Windows programs without the std library. The Win32 has plenty of replacement functions you can use instead though so it's much less work than wha
by imron 10y ago
I've written Windows programs without the std library. The Win32 has plenty of replacement functions you can use instead though so it's much less work than what's presented here.
You get the same sorts of benefits though.
- userbinator 10y agoWin32 is itself a layer on top of the syscalls, and already provides much of the functionality of the C standard library.
- imron 10y agoYes, that was partly my point. You can get reduced executable size and a lack of dependencies on various msvc*.dlls, without giving up much of the functionality of the C standard library and without having to write it all yourself.
- qb45 10y agoFine, but you get this thanks to already being linked with these megagodzillas like kernel32.dll. Try without them.
- vertex-four 10y agoA program which isn't linked against the Win32 stuff is an invalid program, since syscalls in Windows are not at all stable.
- ekr 10y agoOn windows nt, ntdll gets loaded in all processes, it's hardcoded in the kernel (http://gate.upm.ro/os/LABs/Windows_OS_Internals_Curriculum_Resource_Kit-ACADEMIC/WindowsResearchKernel-WRK/WRK-v1.2/base/ntos/ps/psinit.c http://gate.upm.ro/os/LABs/Windows_OS_Internals_Curriculum_R...). That's where the loader resides, so you can't go without it. And that's where all the Zw/Nt* functions/ i.e. where the syscalls are. So you can't really go without it.
- tubs 10y agoExcept the new picoprocesses, which don't get ntdll (or anything really, I guess).