I was certain that somebody would have specifically asked this question, but from what I can see no-one has (there's been a question about learning win32 but that doesn't cover whether it's worthwhile doing so).
I am very interested in gaining a deeper understanding of all the systems I use (I mostly program in C#, at least professionally), so I wondered, very simply - is learning win32 worthwhile, or is it overkill? Am I wasting my time? Is the knowledge I'd gain worth the effort?
Similar / related questions on StackOverflow:
Does it still make sense to learn low level WinAPI programming?
How relevant is Win32 programming to modern professionals?
Obsolete? Not likely. There will always be a need for people who understand how Windows works at a lower level.
No. Win32 is used by so many applications (including those that ship with Windows), that it's going to be there for a long long time.
I believe the best way to approach Win32 is through "Programming Windows" by Charles Petzold. It's very clear to read and easy to understand. There are a lot of examples you can pick up and experiment on your own. After you learn the basic stuff, I recommend "Microsoft Windows Internals" by Mark Russinovich.
Most Win Api is C. There are couple exceptions (dor example COM IFAIR). But almost every code in MSDN says C++.. @MarekR All the COM APIs are C compatible.
Having a working knowledge of how Win32 works at the lowest level will certainly be invaluable if you are planning on doing Windows development in the future. It gives you a level of insight into things like Windows, Messaging and GDI that are hidden by the time you get to the level of .NET.
I wouldn't recommend you try and use Win32 for writing all your applications, but I feel that any Windows developer would benefit from writing a simple Win32 application using C/C++.
This is less true for things like WPF where there is less dependency on Win32, but just knowing how Win32 works will help you understand or appreciate some of the design decisions in WPF.
I advocate learning the concepts behind low level windows programming if all of the following are true.
Abstraction layers like .NET work create and allow developers to do incredible things without having to know a lot. However, when .NET is used in a way unanticipated by its authors which reveals one of its subtle bugs, then that is the time where some win32 API knowledge goes a long way.
Will you ever have to write a message pump? I doubt it. Can it help diagnose problems? You betcha!
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With