PE file vs. (.NET)exe file? tempPE folder?

L

Lore Leunoeg

Can anybody tell me the difference between a PE file and a .NET-exe file? Do
both contain MSIL Code?
Where can I find PE files? Where and when are they created?

In all documentations about the .NET compilation process a PE file is
described. But I never saw any. All I have found is a directory called
tempPE.


Thank you
Sincerely
Lore
 
V

Vadym Stetsyak

PE stands for portable format.
This format describes the internal structure of the binary file.

PE files intialy where binary modules (.dlls, .exes ). Information stored in
the file was described with the set of PE headers ( winnt.h ). This
information is used by windows loader, when it is loading module into
memory.

..NET assemblies are also PE compatible. But in the .NET assembly PE header
contains information that this file is not an unmanaged module but .NET
assembly. This helps loader to correctly load the file. In case of .NET
assembly CLR is started and completes further load of an assembly.

More info about PE files you can find on
( http://msdn.microsoft.com/msdnmag/issues/02/02/PE/default.aspx )
( http://msdn.microsoft.com/msdnmag/issues/02/03/PE2/default.aspx )
 
G

Guest

Can anybody tell me the difference between a PE file and a .NET-exe file?

Managed executables (.NET-exe as you call them) use the PE format, and so
does regular native Win32 executables. So in a way there's no difference,
..NET executables are simply one kind of PE files.

Do both contain MSIL Code?

Managed executables do. PE files may, if they are managed executables.

Where can I find PE files? Where and when are they created?

All over your machine. Almost any file with a .exe or .dll extension for a
start. They are created by a compiler or linker.

But I never saw any.

I think you have.


Mattias
 
L

Lore Leunoeg

Thank you very much for your answers.
Now things get much clearer.
The only question I still have is: What is that tempPE directory good for
which resides in every .NET project folder?

Thank you
Sincerely
Lore
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top