anshdadhich commited on
Commit
60bd5ce
·
verified ·
1 Parent(s): fbf0258

Upload FastSeekWpf/NativeInterop/NativeTypes.cs

Browse files
FastSeekWpf/NativeInterop/NativeTypes.cs ADDED
@@ -0,0 +1,54 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ using System;
2
+ using System.Runtime.InteropServices;
3
+
4
+ namespace FastSeekWpf.NativeInterop;
5
+
6
+ [StructLayout(LayoutKind.Sequential)]
7
+ internal struct MFT_ENUM_DATA_V0
8
+ {
9
+ public ulong StartFileReferenceNumber;
10
+ public long LowUsn;
11
+ public long HighUsn;
12
+ }
13
+
14
+ [StructLayout(LayoutKind.Sequential)]
15
+ internal struct USN_JOURNAL_DATA_V0
16
+ {
17
+ public ulong UsnJournalID;
18
+ public long FirstUsn;
19
+ public long NextUsn;
20
+ public long LowestValidUsn;
21
+ public long MaxUsn;
22
+ public ulong MaximumSize;
23
+ public ulong AllocationDelta;
24
+ }
25
+
26
+ [StructLayout(LayoutKind.Sequential)]
27
+ internal struct READ_USN_JOURNAL_DATA_V0
28
+ {
29
+ public long StartUsn;
30
+ public uint ReasonMask;
31
+ public uint ReturnOnlyOnClose;
32
+ public ulong Timeout;
33
+ public ulong BytesToWaitFor;
34
+ public ulong UsnJournalID;
35
+ }
36
+
37
+ [StructLayout(LayoutKind.Sequential)]
38
+ internal struct USN_RECORD_V2
39
+ {
40
+ public uint RecordLength;
41
+ public ushort MajorVersion;
42
+ public ushort MinorVersion;
43
+ public ulong FileReferenceNumber;
44
+ public ulong ParentFileReferenceNumber;
45
+ public long Usn;
46
+ public ulong TimeStamp;
47
+ public uint Reason;
48
+ public uint SourceInfo;
49
+ public uint SecurityId;
50
+ public uint FileAttributes;
51
+ public ushort FileNameLength;
52
+ public ushort FileNameOffset;
53
+ // FileName follows
54
+ }