Subversion Repositories recyclebinunit

Compare Revisions

Regard whitespace Rev 91 → Rev 90

/trunk/Recycle Bin Unit/RecyclerFunctions.pas
22,10 → 22,8
// Windows 2003 Server EE SP1 //
// Windows Vista //
// Windows 7 //
// Windows 10 //
////////////////////////////////////////////////////////////////////////////////////
// DOES **NOT** WORK WITH "VERSION 2" INDEX FILES USED IN LATER VERSIONS OF WIN10 //
// USE RECYCLE BIN UNIT V2 INSTEAD! //
////////////////////////////////////////////////////////////////////////////////////
// //
// Needs Delphi 4 or higher. If you are using Delphi 4 or 5, you can not use the //
// RecyclerGetDateTime() functions, because the unit "DateUtils" is missing. //
2285,11 → 2283,9
reg: TRegistry;
rbuf: array[0..255] of byte;
 
//dwResult: DWORD;
lpdwResult: PDWORD_PTR;
dwResult: DWORD;
begin
PSHGetSetSettings := nil;
lpdwResult := nil;
 
RBHandle := LoadLibrary(shell32);
if(RBHandle <> 0) then
2312,7 → 2308,7
SendMessageTimeout (
HWND_BROADCAST, WM_SETTINGCHANGE,
0, lParam (pChar ('ShellState')),
SMTO_ABORTIFHUNG, 5000, lpdwResult(*dwResult*)
SMTO_ABORTIFHUNG, 5000, dwResult
);
end
else
2335,7 → 2331,7
SendMessageTimeout (
HWND_BROADCAST, WM_SETTINGCHANGE,
0, lParam (pChar ('ShellState')),
SMTO_ABORTIFHUNG, 5000, lpdwResult(*dwResult*)
SMTO_ABORTIFHUNG, 5000, dwResult
);
 
reg.CloseKey;
2682,7 → 2678,7
function RecyclerGlobalIsNukeOnDelete: boolean;
var
reg: TRegistry;
dump: AnsiString;
dump: string;
const
RES_DEFAULT = false;
begin
2706,7 → 2702,7
 
// See comment at RecyclerSpecificIsNukeOnDelete()
 
dump := AnsiString(_registryReadDump(reg, 'PurgeInfo'));
dump := _registryReadDump(reg, 'PurgeInfo');
result := GetAnsiCharBit(dump[68], 3);
end
else
2726,7 → 2722,7
function RecyclerSpecificIsNukeOnDelete(Drive: Char): boolean;
var
reg: TRegistry;
dump: AnsiString;
dump: string;
d: Byte;
const
RES_DEFAULT = false;
2755,7 → 2751,7
begin
// Windows 95 - Verschlüsselte Informationen liegen in PurgeInfo
 
dump := AnsiString(_registryReadDump(reg, 'PurgeInfo'));
dump := _registryReadDump(reg, 'PurgeInfo');
 
// NOT tested, only theoretical! My idea about the possible structure is:
//
2952,7 → 2948,6
begin
// Since Windows Vista, SHQueryRecycleBin will fail with E_FAIL (80004005)
// if Path is a floppy or CD drive...
// Windows 10: Error 0x8007003 for Path 'C:\'
raise EAPICallError.CreateFmt(LNG_API_CALL_ERROR, [Format(LNG_ERROR_CODE, [C_SHQueryRecycleBin, Path, '0x'+IntToHex(res, 2*SizeOf(HRESULT))])]);
end;
end