Rev 101 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 101 | Rev 102 | ||
---|---|---|---|
Line 3... | Line 3... | ||
3 | //////////////////////////////////////////////////////////////////////////////////// |
3 | //////////////////////////////////////////////////////////////////////////////////// |
4 | // RECYCLE-BIN-UNIT V2 BY DANIEL MARSCHALL, VIATHINKSOFT // |
4 | // RECYCLE-BIN-UNIT V2 BY DANIEL MARSCHALL, VIATHINKSOFT // |
5 | // E-MAIL: info@daniel-marschall.de // |
5 | // E-MAIL: info@daniel-marschall.de // |
6 | // Web: www.daniel-marschall.de & www.viathinksoft.de // |
6 | // Web: www.daniel-marschall.de & www.viathinksoft.de // |
7 | //////////////////////////////////////////////////////////////////////////////////// |
7 | //////////////////////////////////////////////////////////////////////////////////// |
8 | // Revision: 03 JUL 2022 // |
8 | // Revision: 07 JUL 2022 // |
9 | // This unit is freeware, but please link to my website if you are using it! // |
9 | // This unit is freeware, but please link to my website if you are using it! // |
10 | //////////////////////////////////////////////////////////////////////////////////// |
10 | //////////////////////////////////////////////////////////////////////////////////// |
11 | // Successfully tested with: // |
11 | // Successfully tested with: // |
12 | // Windows 95b (without IE4 Shell Extensions) // |
12 | // Windows 95b (without IE4 Shell Extensions) // |
13 | // Windows 95b (with IE4 Shell Extensions) // |
13 | // Windows 95b (with IE4 Shell Extensions) // |
Line 53... | Line 53... | ||
53 | 53 | ||
54 | uses |
54 | uses |
55 | Windows, SysUtils, Classes, ContNrs, ShellAPI, Registry, Messages, Math; |
55 | Windows, SysUtils, Classes, ContNrs, ShellAPI, Registry, Messages, Math; |
56 | 56 | ||
57 | const |
57 | const |
58 | RECBINUNIT_VERSION = '2022-07-03'; |
58 | RECBINUNIT_VERSION = '2022-07-07'; |
59 | 59 | ||
60 | RECYCLER_CLSID: TGUID = '{645FF040-5081-101B-9F08-00AA002F954E}'; |
60 | RECYCLER_CLSID: TGUID = '{645FF040-5081-101B-9F08-00AA002F954E}'; |
61 | NULL_GUID: TGUID = '{00000000-0000-0000-0000-000000000000}'; |
61 | NULL_GUID: TGUID = '{00000000-0000-0000-0000-000000000000}'; |
62 | 62 | ||
63 | type |
63 | type |
Line 113... | Line 113... | ||
113 | TRbInfoAItem = class(TRbRecycleBinItem) |
113 | TRbInfoAItem = class(TRbRecycleBinItem) |
114 | strict protected |
114 | strict protected |
115 | procedure ReadFromStream(stream: TStream); override; |
115 | procedure ReadFromStream(stream: TStream); override; |
116 | function GetPhysicalFile: string; override; |
116 | function GetPhysicalFile: string; override; |
117 | public |
117 | public |
118 | constructor Create(fs: TStream; AIndexFile: string); |
118 | constructor Create(fs: TStream; AIndexFile: string); reintroduce; |
119 | function DeleteFile: boolean; override; |
119 | function DeleteFile: boolean; override; |
120 | // TODO: function RecoverFile: boolean; override; |
120 | // TODO: function RecoverFile: boolean; override; |
121 | // TODO: function OpenFile: boolean; override; |
121 | // TODO: function OpenFile: boolean; override; |
122 | end; |
122 | end; |
123 | 123 | ||
124 | TRbInfoWItem = class(TRbRecycleBinItem) |
124 | TRbInfoWItem = class(TRbRecycleBinItem) |
125 | strict protected |
125 | strict protected |
126 | procedure ReadFromStream(stream: TStream); override; |
126 | procedure ReadFromStream(stream: TStream); override; |
127 | function GetPhysicalFile: string; override; |
127 | function GetPhysicalFile: string; override; |
128 | public |
128 | public |
129 | constructor Create(fs: TStream; AIndexFile: string); |
129 | constructor Create(fs: TStream; AIndexFile: string); reintroduce; |
130 | function DeleteFile: boolean; override; |
130 | function DeleteFile: boolean; override; |
131 | // TODO: function RecoverFile: boolean; override; |
131 | // TODO: function RecoverFile: boolean; override; |
132 | // TODO: function OpenFile: boolean; override; |
132 | // TODO: function OpenFile: boolean; override; |
133 | end; |
133 | end; |
134 | 134 | ||
135 | TRbVistaItem = class(TRbRecycleBinItem) |
135 | TRbVistaItem = class(TRbRecycleBinItem) |
136 | strict protected |
136 | strict protected |
137 | procedure ReadFromStream(stream: TStream); override; |
137 | procedure ReadFromStream(stream: TStream); override; |
138 | function GetPhysicalFile: string; override; |
138 | function GetPhysicalFile: string; override; |
139 | public |
139 | public |
140 | constructor Create(fs: TStream; AIndexFile, AID: string); |
140 | constructor Create(fs: TStream; AIndexFile, AID: string); reintroduce; |
141 | function DeleteFile: boolean; override; |
141 | function DeleteFile: boolean; override; |
142 | // TODO: function RecoverFile: boolean; override; |
142 | // TODO: function RecoverFile: boolean; override; |
143 | // TODO: function OpenFile: boolean; override; |
143 | // TODO: function OpenFile: boolean; override; |
144 | end; |
144 | end; |
145 | 145 | ||
Line 1417... | Line 1417... | ||
1417 | // Wir lesen den Eintrag trotzdem, da unsere Software ja auch zu forensischen |
1417 | // Wir lesen den Eintrag trotzdem, da unsere Software ja auch zu forensischen |
1418 | // Zwecken eingesetzt werden soll. |
1418 | // Zwecken eingesetzt werden soll. |
1419 | if r.sourceAnsi[0] = #0 then |
1419 | if r.sourceAnsi[0] = #0 then |
1420 | begin |
1420 | begin |
1421 | FRemovedEntry := true; |
1421 | FRemovedEntry := true; |
- | 1422 | if (r.sourceDrive = 26) and (r.sourceAnsi[1] = '\') then |
|
- | 1423 | r.sourceAnsi[0] := '\' |
|
- | 1424 | else |
|
1422 | r.sourceAnsi[0] := AnsiChar(FSourceDrive); |
1425 | r.sourceAnsi[0] := AnsiChar(FSourceDrive); |
1423 | end; |
1426 | end; |
1424 | 1427 | ||
1425 | FSourceAnsi := r.sourceAnsi; |
1428 | FSourceAnsi := r.sourceAnsi; |
1426 | 1429 | ||
1427 | // Unicode does not exist in INFO(1) structure |
1430 | // Unicode does not exist in INFO(1) structure |
Line 1489... | Line 1492... | ||
1489 | // Zwecken eingesetzt werden soll. |
1492 | // Zwecken eingesetzt werden soll. |
1490 | if r.sourceAnsi[0] = #0 then |
1493 | if r.sourceAnsi[0] = #0 then |
1491 | begin |
1494 | begin |
1492 | FRemovedEntry := true; |
1495 | FRemovedEntry := true; |
1493 | r.sourceAnsi[0] := AnsiChar(r.sourceUnicode[0]); |
1496 | r.sourceAnsi[0] := AnsiChar(r.sourceUnicode[0]); |
- | 1497 | (* |
|
- | 1498 | if (r.sourceDrive = 26) and (r.sourceAnsi[1] = '\') then |
|
- | 1499 | r.sourceAnsi[0] := '\' |
|
- | 1500 | else |
|
- | 1501 | r.sourceAnsi[0] := AnsiChar(FSourceDrive); |
|
- | 1502 | *) |
|
1494 | end; |
1503 | end; |
1495 | 1504 | ||
1496 | FSourceAnsi := r.sourceAnsi; |
1505 | FSourceAnsi := r.sourceAnsi; |
1497 | FSourceUnicode := r.sourceUnicode; |
1506 | FSourceUnicode := r.sourceUnicode; |
1498 | FID := IntToStr(r.recordNumber); |
1507 | FID := IntToStr(r.recordNumber); |