阅读:3542回复:9
NtCreateFile vs. ZwCreateFile
请问,NtCreateFile和ZwCreateFile之间的关系。是调用与被调用关系么?
|
|
最新喜欢:![]() |
沙发#
发布于:2003-08-25 11:02
NtCreateFile 是 native API 名字, user mode
ZwCreateFile 是 kernel mode API 名字 基本上前者调用后者 |
|
板凳#
发布于:2003-08-25 11:09
基本上?
那么应用程序中调用CreateFile,最终是调用那一个?还是都调用?两者的功能除了参数校验还有何差别? 谢谢 |
|
地板#
发布于:2003-08-25 11:24
CreateFile --> NtCreateFile user mode | | int2E (if x86) | | v ZwCreateFile kernel mode 明白了吗? 关键区别在于是 user mode 还是 kernel mode. |
|
地下室#
发布于:2003-08-25 12:05
user mode 和 kernel mode 我当然知道。
我的问题是,是否每个NtXXX都对应ZwXXX。 |
|
5楼#
发布于:2003-08-25 13:35
user mode 和 kernel mode 我当然知道。 基本上每一个个NtXXX都对应一个ZwXXX, 流程就像 holly_lee 讲的一样 |
|
|
6楼#
发布于:2003-08-28 17:06
http://www.sysinternals.com/ntw2k/info/ntdll.shtml
... Note that all of the Native APIs begin with \"Nt\". The export table in NTDLL.DLL also makes the Native API accessible through an alternate naming convention, one where command names begin with \"Zw\" instead of \"Nt\". Thus, ZwCreateFile() is an alias for NtCreateFile(). ... 这也是一种说法? |
|
7楼#
发布于:2003-08-29 11:52
http://www.osronline.com/article.cfm?id=257
又一种说法 !! |
|
8楼#
发布于:2003-08-29 13:19
用户态与核心态各有自己的Zw*/Nt*函数,有人搞混了。
|
|
9楼#
发布于:2003-09-09 11:24
我知道了,NTDLL.DLL和NTOSKRNL.EXE各自都有Zw和Nt。
而ntdll中的Zw和Nt完全一样。 NTOSKRNL.EXE中的Zw的内容和ntdll.dll中的Zw或Nt一样。 NTOSKRNL.EXE中的Nt才是真正的SerivceID所对应的入口,可以用Softice的ntcall验证。 谢谢大家讨论,尤其是kernel_kernel,其实这一问题的答案在我贴贴子的第二天就知道了。:) |
|