-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathntfs_structs.h
74 lines (69 loc) · 1.38 KB
/
ntfs_structs.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
#pragma once
#include <Windows.h>
typedef struct {
BYTE chBootInd;
BYTE chHead;
BYTE chSector;
BYTE chCylinder;
BYTE chType;
BYTE chLastHead;
BYTE chLastSector;
BYTE chLastCylinder;
DWORD dwRelativeSector;
DWORD dwNumberSectors;
} PARTITION;
typedef struct {
char fileSignature[4];
WORD wFixupOffset;
WORD wFixupSize;
LONGLONG n64LogSeqNumber;
WORD wSequence;
WORD wHardLinks;
WORD wAttribOffset;
WORD wFlags;
DWORD dwRecLength;
DWORD dwAllLength;
LONGLONG n64BaseMftRec;
WORD wNextAttrID;
WORD wFixupPattern;
DWORD dwMFTRecNumber;
} NTFS_MFT_FILE_ENTRY_HEADER;
typedef struct {
char chJumpInstruction[3];
char chOemID[4];
char chDummy[4];
struct NTFS_BPB {
WORD wBytesPerSec;
BYTE uchSecPerClust;
WORD wReservedSec;
BYTE uchReserved[3];
WORD wUnused1;
BYTE uchMediaDescriptor;
WORD wUnused2;
WORD wSecPerTrack;
WORD wNumberOfHeads;
DWORD dwHiddenSec;
DWORD dwUnused3;
DWORD dwUnused4;
LONGLONG n64TotalSec;
LONGLONG n64MFTLogicalClustNum; // ( cluster for MFT
LONGLONG n64MFTMirrLogicalClustNum;
int nClustPerMFTRecord;
int nClustPerIndexRecord;
LONGLONG n64VolumeSerialNum;
DWORD dwChecksum;
} bpb;
char chBootstrapCode[426];
WORD wSecMark;
} NTFS_PART_BOOT_SECTOR;
typedef struct
{
BYTE buff[446];
PARTITION parts[4];
BYTE signature1, signature2;
} MBR_SECTOR;
typedef struct
{
LONGLONG beg_rec_num;
LONGLONG offset;
} MFT_FRAG;