Windows API是否授予对内核的一种访问权?或者比这更复杂? [英] Does Windows API give one access to the Kernel or is it more complicated than that?

查看:54
本文介绍了Windows API是否授予对内核的一种访问权?或者比这更复杂?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我知道Windows API的功能远远超出了OS Kernel的预期.我的问题是Windows API和内核之间的连接是什么?Windows API是否在其中包含所有内核功能作为子集?

I understand that the windows API does a lot more than what an OS Kernel can be expected to do. My question is what is the connection between Windows API and the Kernel? Does the Windows API contain all the Kernel functions within it as a subset?

推荐答案

没有连接.winapi是本机操作系统之上的一层.它的设计类似于Windows版本3的api,旨在简化移植程序.它是三个API层之一,OS/2和Posix,另外两个.但是由于没有人使用它们而被删除,winapi被滑坡获胜.最初的名称是"win32",与16位版本区别开来,但是当64位Windows出现时,这引起了太多混乱,因此今天每个人都将其称为"winapi".

There is no connection. The winapi is a layer on top of the native operating system. It was designed to resemble the api of Windows version 3, intended to make porting programs easy. It was one of three api layers, OS/2 and Posix where the other two. But have been removed because nobody used them, the winapi won by a land-slide. The original name was "win32", distinguishing it from the 16-bit version, but that caused too much confusion when 64-bit Windows came around so everybody calls it "winapi" today.

本机操作系统看起来非常不同,它与VMS非常相似.这不是偶然的,他们有相同的设计师.大卫·卡特勒(David Cutler),他曾在DEC爆破之前为DEC工作.DEC抱怨时,金钱易手.

The native operating system looks very different, it resembles VMS a lot. Which is no coincidence, they had the same designer. David Cutler, he used to work for DEC before it imploded. Money changed hands when DEC complained about it.

未记录本机api.有意允许Microsoft在OS上进行创新,同时仍允许运行旧程序.否则,它不是一个妥善保管的秘密,它已经过大量的反向工程.它的一些确实得到了记录,例如名称以"Nt"和"Rtl"开头的函数.像NtCreateFile和RtlFillMemory.Rtl函数是将winapi与本机api结合的粘合剂的一部分.编写设备驱动程序时,您还将获得更多有关本机api的信息.

The native api is undocumented. Intentionally to allow Microsoft to innovate on the OS while still allowing old programs to run. It is not otherwise a well-kept secret, it has been heavily reverse-engineered. And some of it did get documented, like the functions whose name start with "Nt" and "Rtl". Like NtCreateFile and RtlFillMemory. The Rtl functions are part of the glue that marry the winapi to the native api. You'll also get much more exposure to the native api when you write a device driver.

这篇关于Windows API是否授予对内核的一种访问权?或者比这更复杂?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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