Just out of curiosity, does the .NET framework itself depend on any unmanaged DLL-s when accessing the standard library ? For example i call method A and -under the hood- that method A or any other method inside that method A executes a PInvoke against an unmanaged DLL ?
Just out of curiosity, does the .NET framework itself depend on any unmanaged DLL-s
Share
Yes, the .Net libraries use unmanaged functions a lot. There are two types of unmanaged functions (that I know) the library can call: either methods from the Framework itself, or methods from some other DLL (using PInvoke).
The methods that are implemented in the framework are marked with
[MethodImpl(MethodImplOptions.InternalCall)]. Those that come from other unmanaged DLLs are marked with[DllImport].In my version of mscorlib.dll alone, there is 7241 methods that are implemented internally by the framework (e.g. the getter of
string.Length) and 535 that are from some unmanaged DLL (many of them are in the internal classWin32Native).