Type a page name and press Enter. You'll jump to the page if it exists, or you can create it if it doesn't.
To create a page in a module other than Structures, prefix the name with the module name and a period.
USN_RECORD (Structures)
.
C# Definition:
struct USN_RECORD {
public UInt32 RecordLength;
public UInt16 MajorVersion;
public UInt16 MinorVersion;
public UInt64 FileReferenceNumber;
public UInt64 ParentFileReferenceNumber;
public Int64 Usn;
public Int64 TimeStamp; // strictly, this is a LARGE_INTEGER in C
public UInt32 Reason;
public UInt32 SourceInfo;
public UInt32 SecurityId;
public UInt32 FileAttributes;
public UInt16 FileNameLength;
public UInt16 FileNameOffset;
// immediately after the FileNameOffset comes an array of WCHARs containing the FileName
}
VB Definition:
<StructLayout(LayoutKind.Explicit)> Private Structure USN_RECORD
<FieldOffset(0)> Public RecordLength As Integer 'DWORD RecordLength;
<FieldOffset(4)> Public MajorVersion As Short 'WORD MajorVersion;
<FieldOffset(6)> Public MinorVersion As Short 'WORD MinorVersion;
<FieldOffset(8)> Public FileReferenceNumber As Long 'DWORDLONG FileReferenceNumber;
<FieldOffset(16)> Public ParentFileReferenceNumber As Long 'DWORDLONG ParentFileReferenceNumber;
<FieldOffset(24)> Public Usn As Long 'USN Usn;
<FieldOffset(32)> Public TimeStamp As Long 'LARGE_INTEGER TimeStamp;
<FieldOffset(40)> Public Reason As Integer 'DWORD Reason;
<FieldOffset(44)> Public SourceInfo As Integer 'DWORD SourceInfo;
<FieldOffset(48)> Public SecurityID As Integer 'DWORD SecurityId;
<FieldOffset(52)> Public FileAttributes As Integer 'DWORD FileAttributes;
<FieldOffset(56)> Public FileNameLength As Short 'WORD FileNameLength;
<FieldOffset(58)> Public FileNameOffset As Short 'WORD FileNameOffset;
<FieldOffset(60)> Public FileName As Char 'WCHAR FileName[1];
End Structure
User-Defined Field Types:
None.
Notes:
None.
The above is for what is now called USN_RECORD_V2. For USN_RECORD_V3 the FileReferenceNumber and ParentFileReferenceNumber change to 16-byte values. The result is something like this (not yet tested)
[StructLayout(LayoutKind.Sequential)]
unsafe struct USNJournalRecord
{
public UInt32 RecordLength;
public UInt16 MajorVersion;
public UInt16 MinorVersion;
public fixed byte FileReferenceNumber[16];
public fixed byte ParentFileReferenceNumber[16];
public Int64 Usn;
public Int64 TimeStamp;
public USNJournalReason Reason;
public USNJournalSourceInfo SourceInfo;
public UInt32 SecurityId;
public UInt32 FileAttributes;
public UInt16 FileNameLength;
public UInt16 FileNameOffset;
public fixed char FileName[Windows.MAX_PATH];
}