#include<iostream>
#include<windows.h>
using namespace std;
#define BOOTRECORDSIZE 440
typedef struct _BOOTRECORD {
unsigned char BootRecord[BOOTRECORDSIZE];
}BOOTRECORD,*PBOOTRECORD;
#define DPTSIZE 64
typedef struct _DPT {
unsigned char Dpt[DPTSIZE];
}DPT,*PDPT;
typedef struct _MBR {
BOOTRECORD BootRecord; //引导程序
unsigned char ulSinged[4]; //Windows 磁盘签名
unsigned char sReserve[2]; //保留位
DPT Dpt; //分区表
unsigned char EndSign[2]; //结束标志
}MBR,*PMBR;
#define DPTNUMBER 4
typedef struct _DP {
unsigned char BootSign; //引导标志
unsigned char StartHsc[3];
unsigned char Partitiontype; //分区类型
unsigned char EndHsc[3];
unsigned int SectorsPreceding; //本分区之前使用的扇区数
unsigned int SectorInPartition;
}DP,*PDP;
unsigned char FixMbr[16] = { 0x00, 0xFE,
0xFF ,0xFF ,0x07 ,0xFE, 0xFF ,0xFF ,0x00, 0xA8 ,0x58 ,0x01 ,0x00, 0x48 ,0x27 ,0x01 };
MBR表获取与解析
最新推荐文章于 2025-03-21 21:24:40 发布