Question

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 have 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.

Was it helpful?

Solution

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.

OTHER TIPS

.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.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top