Hi,

On Sat, Aug 1, 2015 at 7:52 AM, sunbeam...@juno.com <sunbeam...@juno.com> wrote:
>
> So how can I tell if a file is a PE file. Does it have a special
> extension or file name?

No, the extension is .EXE, same as all others. DOS uses what is called
MZ while OS/2 1.x and Win 3.x used NE. OS/2 2.x also used LX.
(Open)Watcom often uses LE for its 32-bit DOS output.

I'm under Linux right now, and a simple "file *.exe" for various
things tells what most of them are.

There's some hidden magic inside the binary. Though it's not entirely
simple to identify as some of them (e.g. PE or LX) can optionally have
a DOS stub (or optionally just say it can't run in DOS, which is
better than nothing because literally no stub is possible but will
crash).

> Is there just one PE file for everything.

No, but indeed 32-bit Windows has preferred PE since many many years
(NT or Win95 or Win32s). Win64 uses PE+.

> This could be why some software only works under windows.

The PE file format is also used for UEFI, if I'm not mistaken. And
even some DOS extenders have used PE in the past. But that won't run
"natively" under Windows because it doesn't (normally) use Windows
APIs.

Long story short: a "Portable Executable" is what all modern Windows
apps are contained inside. It's mostly Windows only.

> Wikopedia was very good but left out some simple stuff that
> it believes everyone should know I guess.

https://en.wikipedia.org/wiki/Portable_Executable

------------------------------------------------------------------------------
_______________________________________________
Freedos-user mailing list
Freedos-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/freedos-user

Reply via email to