[英].NET mscorlib.dll and Kernel32.dll relation
As far as I understand it, applications that want input/output functionalities must speak to the Kernel32.dll which in turns sends the request on to the kernel itself. 据我所知,需要输入/输出功能的应用程序必须与Kernel32.dll对话,后者又将请求发送到内核本身。 In .NET however, the console class, located in the mscorlib.dll, like any other application, doesn't directly talk to the kernel, correct?
但是在.NET中,与任何其他应用程序一样,位于mscorlib.dll中的控制台类不直接与内核通信,对吗? Does mscorlib.dll have to send it's request to the Kernel32.dll or does .NET have special privilege to bypass it?
mscorlib.dll是否必须将其请求发送到Kernel32.dll,或者.NET是否有特权绕过它?
Does anyone have in dept knowledge on how it works? 有没有人知道它是如何工作的?
Thank you. 谢谢。
.net it self is a native application which calls underlying system calls. .net it self是一个调用底层系统调用的本机应用程序。 So when you call console.writeline you are calling a wrapper in effect of writeconsole .
因此,当您调用console.writeline时,您正在调用writeconsole生效的包装器。
All of the .NET libraries call down to the native Win32 APIs, including those found in the three well-known libraries, kernel32.dll
, user32.dll
, and gdi32.dll
, in order to make things happen. 所有.NET库都调用本机Win32 API,包括在三个着名库中找到的API,
kernel32.dll
, user32.dll
和gdi32.dll
,以便实现目标。 This is pretty much the only way to get things done on Windows. 这几乎是在Windows上完成工作的唯一方法。 The .NET Framework is a simply run-time environment on top of Windows, albeit a very thorough one.
.NET Framework是一个基于Windows的简单运行时环境,尽管它非常彻底。
The functionality provided by mscorlib.dll
is no exception here. mscorlib.dll
提供的功能在这里也不例外。 It indeed invokes the native Win32 API functions, including those found in kernel32.dll
. 它确实调用了本机Win32 API函数,包括
kernel32.dll
函数。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.