Subversion Repositories recyclebinunit

Rev

Rev 76 | Rev 90 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
75 daniel-mar 1
unit RecBinUnitLowLvl;
2
 
3
// TODO: Gain more information about drive '@' / Homedrive / Netdrive? Win2000 source
4
//       + überall verwenden
5
 
6
interface
7
 
8
uses
9
  Windows;
10
 
11
type
76 daniel-mar 12
  PRbInfoHeader = ^TRbInfoHeader;
13
  TRbInfoHeader = record
14
    format: DWORD;         // Unsure...
15
                           // Win95 (without IE4): 00 00 00 00
16
                           // Win95 (with IE4):    04 00 00 00
17
                           // Win NT4:             02 00 00 00
18
                           // Win XP:              05 00 00 00
19
    totalEntries: DWORD;   // Only Win95 (without IE4) and Win NT4, unknown purpose for other OS versions
20
    nextPossibleID: DWORD; // Only Win95 (without IE4) and Win NT4, unknown purpose for other OS versions
75 daniel-mar 21
    recordLength: DWORD; // 0x181  =  INFO  structure (without Unicode)
22
                         // 0x320  =  INFO2 structure (with Unicode)
76 daniel-mar 23
    totalSize: DWORD; // sum of all "originalSize" values;
24
                      // Only Win95 (without IE4) and Win NT4, unknown purpose for other OS versions
75 daniel-mar 25
  end;
26
 
27
type
76 daniel-mar 28
  // Windows 95:      INFO file with TRbInfoRecordA; Folder deletion NOT possible
29
  // Windows 95 +IE4: INFO2 file with TRbInfoRecordA; Folder deletion possible
30
  PRbInfoRecordA = ^TRbInfoRecordA;
31
  TRbInfoRecordA = record
75 daniel-mar 32
    sourceAnsi: array[0..MAX_PATH-3] of AnsiChar; // 258 elements
33
    recordNumber: DWORD;
34
    sourceDrive: DWORD;
35
    deletionTime: FILETIME;
36
    originalSize: DWORD; // Size occupied on disk. Not the actual file size.
76 daniel-mar 37
                         // INFO2, for folders: The whole folder size with contents
75 daniel-mar 38
  end;
39
 
40
type
76 daniel-mar 41
  // Windows NT4:   INFO file with TRbInfoRecordW; Folder deletion possible
42
  // Windows 2000+: INFO2 file with TRbInfoRecordW; Folder deletion possible
43
  PRbInfoRecordW = ^TRbInfoRecordW;
44
  TRbInfoRecordW = record
75 daniel-mar 45
    sourceAnsi: array[0..MAX_PATH-3] of AnsiChar; // 258 elements
46
    recordNumber: DWORD;
47
    sourceDrive: DWORD;
48
    deletionTime: FILETIME;
49
    originalSize: DWORD;
50
    sourceUnicode: array[0..MAX_PATH-3] of WideChar; // 258 elements
51
    unknown1: DWORD; // Dummy?
52
  end;
53
 
54
type
82 daniel-mar 55
  PRbVistaRecord1 = ^TRbVistaRecord1;
56
  TRbVistaRecord1 = record
57
    version: int64; // Always 01 00 00 00 00 00 00 00
75 daniel-mar 58
    originalSize: int64;
59
    deletionTime: FILETIME;
60
    sourceUnicode: array[0..MAX_PATH-1] of WideChar;
61
  end;
62
 
63
type
82 daniel-mar 64
  PRbVistaRecord2Head = ^TRbVistaRecord2Head;
65
  TRbVistaRecord2Head = record
66
    version: int64; // Always 02 00 00 00 00 00 00 00
67
    originalSize: int64;
68
    deletionTime: FILETIME;
69
    sourceCountChars: DWORD; // including NUL
70
    //sourceUnicode: array[0..sourceCountChars+1] of WideChar;
71
  end;
72
 
73
type
76 daniel-mar 74
  // Windows 95 + Windows NT 4
75 daniel-mar 75
  // HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\explorer\BitBucket: PurgeInfo (Binary)
76 daniel-mar 76
  PRbWin95PurgeInfo = ^TRbWin95PurgeInfo;
75 daniel-mar 77
  TRbWin95PurgeInfo = record
78
    cbSize: DWORD;
79
    bGlobalSettings: BOOL;
80
    percentDrive: array['A'..'Z'] of WORD; // 0x00..0x64 = 0%..100%
81
    percentHomedrive: WORD;
82
    percentGlobal: WORD;
83
    NukeOnDeleteBits: DWORD; // Flags "Nuke on delete"
84
                             // Bit 0 (LSB): Drive A
85
                             // Bit 1: Drive B
86
                             // ...
87
                             // Bit 25: Drive Z
88
                             // Bit 26: Homedrive
89
                             // Bit 27: Global
90
                             // Bit 28..31 (MSB) probably unused
91
    unknown1: DWORD; // For example 04 0D 02 00
92
  end;               // or          C4 0C 02 00
93
 
94
implementation
95
 
96
end.