Does it make sense, having all of the C#-managed-bliss, to go back to Petzold's Programming Windows and try to produce code w/ pure WinAPI?
What can be learn from it? Isn't it just too outdated to be useful?
Over the years, Microsoft has adopted it internally for the development of Office 365, Skype, and other applications. That was 16 years ago. However, Win32 still is the predominant legacy programming API. More apps out in the wild use it than anything else.
The windows API is implemented in the C programming language. Functionality provided by the C standard libraries, such as fopen, is portable because it is compiled down to the appropriate assembly code for different architectures by different compilers.
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.
This question is bordering on religious :) But I'll give my thoughts anyway.
I do see value in learing the Win32 API. Most, if not all, GUI libraries (managed or unmanaged) result in calls to the Win32 API. Even the most thorough libraries don't cover 100% of the API, and hence there are always gaps which need to be plugged by direct API calls or P/invoking. Some of the names of the wrappers around the API calls have similar names to the underlying API calls, but those names aren't exactly self-documenting. So understanding the underlying API, and the terminology used therein, will aid in understanding the wrapper APIs and what they actually do.
Plus, if you understand the nature of the underlying APIs that are used by frameworks, then you will make better choices with regards to which library functionality you should use in a given scenario.
Cheers!
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