
Signature
Jon Skeet - <skeet@pobox.com>
http://www.pobox.com/~skeet
If replying to the group, please do not mail me too
Hi Jon,
executing : mono foo.exe
does it mean then that the unmanaged stub part of file 'foo.exe' (that
contains win32 code if compiled on Win) will not be used then ?
thnx
Chris
> > I've seen the following being explained about .NET applications in a C#
> > Microsoft Course :
[quoted text clipped - 14 lines]
>
> mono foo.exe
Matt Davey - 29 Mar 2004 10:27 GMT
I believe, but could be wrong, that the PE header just has a bit set to say
its for .NET
http://www.codeproject.com/dotnet/insidedontnet.asp gives a little detail
http://www.smidgeonsoft.com/ has an interesting PE header utility
Later
http://weblogs.asp.net/mdavey/
> Hi Jon,
>
[quoted text clipped - 30 lines]
> >
> > mono foo.exe
Jon Skeet [C# MVP] - 29 Mar 2004 13:49 GMT
> I believe, but could be wrong, that the PE header just has a bit set to say
> its for .NET
> http://www.codeproject.com/dotnet/insidedontnet.asp gives a little detail
>
> http://www.smidgeonsoft.com/ has an interesting PE header utility
It's not just a bit being set. From the link above:
<quote>
The following section to the above is also a bit interesting. There we
have said that there is link to another module mscoree.dll. That is the
core of common language runtime. It also specifies the entry point to
the mscoree.dll, which allows the module to be attached to the current
process. Here it=3Fs shown as 0 _CorExeMain.
</quote>
That's what gets .NET loaded, basically.

Signature
Jon Skeet - <skeet@pobox.com>
http://www.pobox.com/~skeet
If replying to the group, please do not mail me too
Matt Davey - 29 Mar 2004 10:38 GMT
The ECMA spec details the PE header:
http://www.ecma-international.org/publications/standards/Ecma-335.htm
Later
> Hi Jon,
>
[quoted text clipped - 30 lines]
> >
> > mono foo.exe
Jon Skeet [C# MVP] - 29 Mar 2004 13:47 GMT
> executing : mono foo.exe
>
> does it mean then that the unmanaged stub part of file 'foo.exe' (that
> contains win32 code if compiled on Win) will not be used then ?
Indeed.
Basically the stub part just tells it which CLR to load, and the
"mono" bit does that already.

Signature
Jon Skeet - <skeet@pobox.com>
http://www.pobox.com/~skeet
If replying to the group, please do not mail me too