Archive for April, 2008

Exporting stuff from .exe

One of my colleagues posed an interesting question the other day over an excellent Thai lunch (after we got tired enough walking through booths at RSA 2008) – how does one export and use stuff from an exe ? The short answer I gave was


MZ = ZM ?

Have you ever wondered why every DOS executable (and since PE headers are derived from DOS headers every Windows executable such as a DLL or an EXE) has MZ at the beginning of the fileĀ ? You will find DOS header defined in winnt.h starting off like