related to #18

Windows may sent the exception to the application
This commit is contained in:
Basile Burg 2015-07-17 18:21:40 +02:00
parent e690b7434e
commit 2e0209be05
1 changed files with 9 additions and 7 deletions

View File

@ -638,13 +638,15 @@ begin
try try
for drv := 'A' to 'Z' do for drv := 'A' to 'Z' do
begin begin
try
ltr := drv + ':\'; ltr := drv + ':\';
if not GetVolumeInformation(PChar(ltr), PChar(nme), 255, nil, nil, nil, nil, 0) then if not GetVolumeInformation(PChar(ltr), PChar(nme), 255, nil, nil, nil, nil, 0) then
continue; continue;
case GetDriveType(PChar(ltr)) of case GetDriveType(PChar(ltr)) of
DRIVE_REMOVABLE, DRIVE_REMOVABLE, DRIVE_FIXED, DRIVE_REMOTE: aList.Add(ltr);
DRIVE_FIXED, end;
DRIVE_REMOTE: aList.Add(ltr); except
// SEM_FAILCRITICALERRORS: exception is sent to application.
end; end;
end; end;
finally finally