Subversion Repositories recyclebinunit

Rev

Rev 75 | Rev 82 | 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
76 daniel-mar 55
  PRbVistaRecord = ^TRbVistaRecord;
75 daniel-mar 56
  TRbVistaRecord = record
57
    signature: int64; // Always 01 00 00 00 00 00 00 00 ?
58
    originalSize: int64;
59
    deletionTime: FILETIME;
60
    sourceUnicode: array[0..MAX_PATH-1] of WideChar;
61
  end;
62
 
63
type
76 daniel-mar 64
  // Windows 95 + Windows NT 4
75 daniel-mar 65
  // HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\explorer\BitBucket: PurgeInfo (Binary)
76 daniel-mar 66
  PRbWin95PurgeInfo = ^TRbWin95PurgeInfo;
75 daniel-mar 67
  TRbWin95PurgeInfo = record
68
    cbSize: DWORD;
69
    bGlobalSettings: BOOL;
70
    percentDrive: array['A'..'Z'] of WORD; // 0x00..0x64 = 0%..100%
71
    percentHomedrive: WORD;
72
    percentGlobal: WORD;
73
    NukeOnDeleteBits: DWORD; // Flags "Nuke on delete"
74
                             // Bit 0 (LSB): Drive A
75
                             // Bit 1: Drive B
76
                             // ...
77
                             // Bit 25: Drive Z
78
                             // Bit 26: Homedrive
79
                             // Bit 27: Global
80
                             // Bit 28..31 (MSB) probably unused
81
    unknown1: DWORD; // For example 04 0D 02 00
82
  end;               // or          C4 0C 02 00
83
 
84
implementation
85
 
86
end.