Earlier quoted context omitted.
Yes, but he or she is giving convincing sounding reasons that might be helpful for the op. Maybe it is actually better for OP to learn .net, maybe not. But the answer had quality, so I do not think the downvotes are appropriate.
While I think the intentions of the voting system are for marking low quality, as you've said, I think in practice most downvoters are using it to mark their disagreement. There's something interesting about that; it implies that grey text signifies a non-conformist view and approach to a technical issue. As is the case here. I like to skip to the grey text.
Ask HN: Can anyone recommend a Windows Systems programming book?
61–70 of 83 posts
Re: Ask HN: Can anyone recommend a Windows Systems programming book?
#62Earlier quoted context omitted.
No, do you think operating systems only consist of a kernel? What would you consider systems programming on Windows for example?
A task manager application which tells you how much memory your applications are using
Re: Ask HN: Can anyone recommend a Windows Systems programming book?
#63.NET has been the standard interface at Windows system level for many years. The ".NET languages," particularly C# will provide much less friction than .cpp (or Nim). For no other reason than the quantity and quality of tutorials and documentation written by technical experts and edited by technical editors who are getting paid to write and edit from line items in Microsoft's regular operational budgets. Or to put it…
Depends what you mean by "system", but there's plenty of the Win32 API that's not exposed by first-party packages in dotnet (e.g. audio). It's certainly the most convenient way to write an application (once you get over the UI toolkit disaster area), but "systems" programming might also include drivers.
The OP is coming all the way from Nim into two decades of .Net as Windows “easy mode.” There are important reasons to use cpp, but most of the reasons in the world of Windows are .Net.
Re: Ask HN: Can anyone recommend a Windows Systems programming book?
#64Earlier quoted context omitted.
I really wish we had these manuals nowadays. However we are in the mentality of fast iteration so it's probably a bad idea.
A lot of this is there at learn.microsoft.com
Re: Ask HN: Can anyone recommend a Windows Systems programming book?
#65Off topic maybe, but would like recommendations for macOS too, especially C/C++ given that everything is Swift now while I suspect that even so major apps are not using Swift. Windows has much more available.[1], [2] [1]: https://learn.microsoft.com/en-us/sysinternals/resources/win... [2]: https://www.amazon.com/Windows-Kernel-Programming-Pavel-Yosi...
Re: Ask HN: Can anyone recommend a Windows Systems programming book?
#66Earlier quoted context omitted.
In Linux, everything is a file / a file descriptor. In Windows, everything is a handle (except sockets, which are copied from BSD). In Linux, configuration is done via plain text files. In Windows, there is the registry. In Linux, there is the root filesystem, where everything else is mounted beneath. In Windows, there is C: and more. In Linux, the native string encoding is UTF-8 code units stored in char of one byte…
> In Windows, everything is a handle (except sockets, which are copied from BSD). A handle to an object . I think that is the main difference that is also visible in tools like PowerShell (as compared to the UNIX shell). Linux is very free form, Windows is much more structured and strongly typed.
PowerShell is .NET and operates a few more abstraction layers above the Win32 API.
Re: Ask HN: Can anyone recommend a Windows Systems programming book?
#67Earlier quoted context omitted.
Wow this is the first time I've seen someone recommend a microsoft.com domain name for 'updated' information. Usually its 1 year and 15 upgrades outdated. Its basically why I have completely given up on Microsoft. Every update is a breaking change that isnt updated in their docs. And chances are, it wasnt going to work anyway. Any time you have to use a microsoft service/product, know that documentation is just going…
I have no idea how you got that idea about Microsoft's developer documentation. It's always been one of the more robust options out there. You can find full tutorials and documentation on the entirety of WinUI3, which is the literal bleeding edge; for instance.
Re: Ask HN: Can anyone recommend a Windows Systems programming book?
#68Earlier quoted context omitted.
I really miss the MSDN CD-ROMs. They had all of the information without network latency. Indexed and searchable. Categorized in a tree, complete with code examples you could immediately try. Press F1 on a function and there is the reference. Most of the old APIs still work exactly the same so I am frequently tempted to look stuff up in my VS6 install just because it's so fast and convenient. MSDN_Library_October_2001…
you can download MS documentation via visual studio installer. Under "Individual Components", it's called "Help viewer"
Re: Ask HN: Can anyone recommend a Windows Systems programming book?
#69Earlier quoted context omitted.
I remember reading a funny story somewhere recently that back in the day, ms developers intentionally left gaps in the docs or straight up didn't document certain apis etc so they could put them in their books and sell those so if you were working on certain things you'd be forced to buy said books.
I know there are many legends like this, but I wouldn't be too sure about that. For example, most of the authors of the old-time classics were not employed by Microsoft when they wrote their books. I think Charles Petzold (Windows Programming) was a freelancer, Jeffrey Richter (MFC) was working a company called Wintellect, David Solomon (Inside Windows NT) had a seminar company (Solsem), I think initially primarily f…
Re: Ask HN: Can anyone recommend a Windows Systems programming book?
#70Earlier quoted context omitted.
> In Windows, everything is a handle (except sockets, which are copied from BSD). A handle to an object . I think that is the main difference that is also visible in tools like PowerShell (as compared to the UNIX shell). Linux is very free form, Windows is much more structured and strongly typed.
I'm not sure I understand, the APIs are opaque HANDLEs, nothing prevents me from passing a file handle to ShowWindow(), just as nothing prevents me from passing a timerfd to write(), of which neither makes any sense. PowerShell is .NET and operates a few more abstraction layers above the Win32 API.
On the other hand, HWNDs are global (at least within a window station, I don’t know how that works). If you display the numeric value of a HWND in a message box in program A and type it by hand into program B, program B can (usually) pass it to PostMessage and successfully reach program A. I don’t know if other USER and GDI “handles” (e.g. HMENU, HRC) are like that, but I wouldn’t be surprised if they are.
I also think defining STRICT before windows.h will still prevent you from passing a HANDLE where an HWND is needed, even though the last (also the first and the only) time Microsoft promoted this feature was in the Win16-to-Win32 migration docs in the early 90s. A HANDLE to a file vs a HANDLE to a named pipe or even a mutex is another matter—those are all genuine NT objects, and handles to them are to an extent all the same kind of thing.