Win32 API是否已过时? [英] Is the win32 api obsolete?

查看:189
本文介绍了Win32 API是否已过时?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

win32 api是否仍在开发中,今天值得学习吗?您可以使用.net框架完成所有与本机api一样的工作吗?

Is the win32 api still being developed and is it worth learning it today? Can you do everything you can with .net framework that you can with the native api?

推荐答案

Windows API仍在开发中.例如,请参见面向开发人员的Windows 8.1新API和功能 Windows 8和8.1 API索引.过时的?不见得.始终需要了解Windows在较低级别的工作方式的人员.有人必须编写设备驱动程序和底层系统实用程序.

The Windows API is still being developed. For example, see Windows 8.1 New APIs and features for developers and Windows 8 and 8.1 API Index. Obsolete? Not likely. There will always be a need for people who understand how Windows works at a lower level. Somebody has to write device drivers and low-level system utilities.

知识很少是没有用的.如果您正在编写低级实用程序,则必须了解Windows API的工作原理,即使在用C ++或Delphi编写本机应用程序时也非常方便.在编写.NET应用程序时,情况并非如此,但是.NET运行时库中的许多内容在很大程度上都依赖于Windows API.因此,了解其幕后"工作原理非常有用.

Knowledge is rarely useless. Learning how the Windows API works is absolutely necessary if you're writing low-level utilities, and very handy even when writing native applications in C++ or Delphi. Less so when you're writing .NET applications, but much of the .NET runtime libraries depends heavily on the Windows API. So understanding how it works "under the hood" is quite useful.

此外,.NET库没有公开某些内容.例如,我正在开发的C#程序需要访问 Waitable Timer ..NET库未提供该特定内核对象的包装,因此我不得不编写自己的对象,这涉及到Windows API的研究.

In addition, there are things that the .NET libraries don't expose. For example, a C# program I was working on needed access to a Waitable Timer that another developer was using in a C++ application. The .NET libraries don't provide a wrapper to that particular kernel object so I had to write my own, which involved delving into the Windows API.

在大多数.NET开发中,您可能不必了解有关Windows API的任何知识.但这肯定不会造成伤害.我知道,通过对Windows API编程的了解,我对.NET某些部分为何以这种方式工作的理解得到了加强.此外,在Windows API开发方面苦苦挣扎之后,我更有能力欣赏.NET为我带来的巨大生产力提高.

In most .NET development, you probably don't have to understand anything about the Windows API. But it sure doesn't hurt. I know that my understanding of why some parts of .NET work the way they do is enhanced by my understanding of Windows API programming. In addition, having struggled with Windows API development, I'm much more able to appreciate the huge productivity gains that .NET gives me.

这篇关于Win32 API是否已过时?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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