What is the MZ signature in a PE file for?

前端 未结 6 2101
孤独总比滥情好
孤独总比滥情好 2021-02-06 03:25

I\'m working on a program that will parse a PE object for various pieces of information.

Reading the specifications though, I cannot find out why the MZ bytes are there,

6条回答
  •  忘掉有多难
    2021-02-06 04:13

    In the early days of Microsoft® Windows, The Windows™ 1.x, 2.x and 3.xx OS not only existed in the same volumes as Microsoft® DOS, but also ran on top of an MS-DOS OS. It was not only possible, but very probable that a user might attempt to run some of the Windows® programs under DOS. Therefore, Microsoft® programmers made sure all Windows® programs would have a simple 16-bit DOS program placed at the front of each Windows executable that would alert the user if they were attempting to run a Windows® program under DOS. This is all the DOS "Stub" program does. resource: http://thestarman.pcministry.com/asm/debug/DOSstub.htm

提交回复
热议问题