学习低级 WinAPI 编程还有意义吗? [英] Does it still make sense to learn low level WinAPI programming?

查看:26
本文介绍了学习低级 WinAPI 编程还有意义吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

拥有所有 C# 管理的幸福,回到 Petzold 的 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?

推荐答案

这个问题接近于宗教 :) 但我还是会给出我的想法.

This question is bordering on religious :) But I'll give my thoughts anyway.

我确实看到了学习 Win32 API 的价值.大多数(如果不是全部)GUI 库(托管或非托管)都会导致调用 Win32 API.即使是最全面的库也不能覆盖 100% 的 API,因此总是存在需要通过直接 API 调用或 P/invoking 来填补的空白.API 调用周围的包装器的一些名称与底层 API 调用具有相似的名称,但这些名称并不完全是自我记录的.因此,了解底层 API 以及其中使用的术语将有助于了解包装器 API 及其实际用途.

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.

另外,如果您了解框架使用的底层 API 的性质,那么您将在给定场景中应该使用哪些库功能方面做出更好的选择.

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.

干杯!

这篇关于学习低级 WinAPI 编程还有意义吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆