在 winnt.h 里面已经有完整的定义
1. DOS MZ Header (DOS MZ 头) IMAGE_DOS_HEADER 结构
#define IMAGE_DOS_SIGNATURE 0x4D5A // MZ
typedef struct _IMAGE_DOS_HEADER
{
// DOS .EXE header
WORD e_magic; // Magic number // 永远赋值为 IMAGE_DOS_SIGNATURE,
WORD e_cblp; // Bytes on last page of file // 字段赋为 0, 作用不详
WORD e_cp; // Pages in file // 字段赋为 0, 作用不详
WORD e_crlc; // Relocations // 字段赋为 0, 作用不详
WORD e_cparhdr; // Size of header in paragraphs // 字段赋为 0, 作用不详
WORD e_minalloc; // Minimum extra paragraphs needed // 字段赋为 0, 作用不详
WORD e_maxalloc; // Maximum extra paragraphs needed // 字段赋为 0, 作用不详
WORD e_ss; // Initial (relative) SS value // 字段赋为 0, 作用不详
WORD e_sp; // Initial SP value // 字段赋为 0, 作用不详
WORD e_csum; // Checksum // 字段赋为 0, 作用不详
WORD e_ip; // Initial IP value // 字段赋为 0, 作用不详
WORD e_cs; // Initial (relative) CS value // 字段赋为 0, 作用不详
WORD e_lfarlc; // File address of relocation table // 字段赋为 0, 作用不详
WORD e_ovno; // Overlay number // 字段赋为 0, 作用不详
WORD e_res[4]; // Reserved words // 字段赋为 0, 作用不详
WORD e_oemid; // OEM identifier (for e_oeminfo) // 字段赋为 0, 作用不详
WORD e_oeminfo; // OEM information; e_oemid specific // 字段赋为 0, 作用不详
WORD e_res2[10]; // Reserved words // 字段赋为 0, 作用不详
LONG e_lfanew; // File address of new exe header // 字段赋为 0, 作用不详
} IMAGE_DOS_HEADER, *PIMAGE_DOS_HEADER;
sizeof(IMAGE_DOS_HEADER) = 64
"MZ" means?
MZ
(standard, file format) The file signature of an MS-DOS executable (.EXE) file (0x4d 5a), always the first two bytes of the
file. It was reportedly invented by, and named after, a Microsoft programmer, Mark Zbikowski. In Unix systems, the string MZ
is the magic number that identifies an MS-DOS EXE file. (2003-06-10)
"史前大师Mark Zbikowski(MZ,PE、NTFS 结构之父)
<<From DOS 1.0 to Windows Vista>>
http://channel9.msdn.com/Showpost.aspx?postid=193997
This is Behind the Code’s pilot episode with Core File Services architect, Mark Zbikowski. Mark began his career at
Microsoft in 1981, working on DOS 1.0 as a designer, coder and liaison with IBM. His quarter century long career has included
significant involvement in OS/2, Cairo’s Object File System (OFS), and the NT File System (NTFS). In addition, he has been a
key player in all of Microsoft’s File System work. Former Microsoft software architect Pat Helland interviews Mark about the
early days at Microsoft, his passion for product development and the challenges of producing software.
Show: Behind The Code
Tags: MS+Personalities