How does windows differentiate between regular exe and a .Net exe?

Posted by Yogendra on Stack Overflow See other posts from Stack Overflow or by Yogendra
Published on 2010-04-14T15:48:35Z Indexed on 2010/04/14 16:13 UTC
Read the original article Hit count: 196

Filed under:

Hi All,

This might be a duplicate entry. Excuse me if it is.

I was asked in an interview as to how does Windows OS differentiate between regular exe and .Net exe.

My reply was, when .Net exe is build, the compiler emits some information into the header. The information is PE32 or PE32+. windows verifies the header to determine if it needs to load the MSCOREE.dll which loads the CLR and executes the exe.

I am not sure if my answer is correct ? Your inputs is appreciated.

© Stack Overflow or respective owner

Related posts about .NET