Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Does it still make sense to learn low level WinAPI programming? [closed]

Tags:

windows

winapi

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?

like image 718
Camilo Díaz Repka Avatar asked Aug 08 '08 00:08

Camilo Díaz Repka


People also ask

Is Win32 still relevant?

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.

Is WinAPI in C?

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.

Should you learn Win32 API?

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.

How do I learn Win32 API?

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.


1 Answers

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!

like image 107
OJ. Avatar answered Oct 22 '22 15:10

OJ.