[Mono-list] why i could not use mscorlib....

Jonathan Pryor jonpryor@vt.edu
18 Sep 2002 13:47:25 -0400


You can't do that, because of one reason: internal calls.

In C#, you can specify that a function is implemented by a particular
library by adding a DllImport attribute:

	[System.Runtime.InteropServices.DllImport ("my-dll-name")]
	public static void MyFunctionName ();

An internal call is the same thing, except instead of specifying that
the function is implemented by a DLL/shared library, the function is
instead implemented by the runtime:

	[System.Runtime.CompilerServicess.MethodImplAttribute (
		MethodImplOptions.InternalCall)]
	private static void MyInternalFunction ();

Internal calls are an implementation detail.  They are not standardized,
and different runtime platforms will have different internal calls.

Furthermore, since the internal call must be present for corlib to
function properly, attempting to load a corlib into a runtime
environment which doesn't support the required internal calls will lead
to errors.

Since Mono and .NET use different internal calls, their corlib libraries
cannot be executed by each other (Mono can't use mscorlib.dll, and .NET
can't use Mono's corlib.dll).

It is not possible to use Mono + Cygin + mscorlib.  It never will be.

Is there anything in particular you would like to do?  There might be
another way to do it.

 - Jon

On Wed, 2002-09-18 at 10:46, Auge Mike wrote:
> 
> 
> Why i could not use mscorlib with mono on Cygwin !!! OK like to do some 
> examination on their Lib Classes. So, Can i use
> 
> Mono + Cygwin + mscorlib......
> 
> ;)
> Thanx
> 
> _________________________________________________________________
> Join the world’s largest e-mail service with MSN Hotmail. 
> http://www.hotmail.com
> 
> 
> _______________________________________________
> Mono-list maillist  -  Mono-list@ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-list