开发者

.NET mscorlib.dll and Kernel32.dll relation

开发者 https://www.devze.com 2023-03-22 07:10 出处:网络
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. In .NET however, the console cla

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. In .NET however, the console class, located in the mscorlib.dll, like any other application, doesn't directly talk to the kernel, correct? Does mscorlib.dll hav开发者_如何转开发e to send it's request to the Kernel32.dll or does .NET have special privilege to bypass it?

Does anyone have in dept knowledge on how it works?

Thank you.


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. This is pretty much the only way to get things done on Windows. The .NET Framework is a simply run-time environment on top of Windows, albeit a very thorough one.

The functionality provided by mscorlib.dll is no exception here. It indeed invokes the native Win32 API functions, including those found in kernel32.dll.


.net it self is a native application which calls underlying system calls. So when you call console.writeline you are calling a wrapper in effect of writeconsole.

0

精彩评论

暂无评论...
验证码 换一张
取 消