Ver Mensaje Individual
  #2  
Antiguo 30-07-2007
Avatar de MaMu
MaMu MaMu is offline
Miembro
 
Registrado: abr 2006
Ubicación: Argentina
Posts: 863
Reputación: 19
MaMu Va por buen camino
Código Delphi [-]
function DiskInDrive(Drive: Char): Boolean;
     var
       ErrorMode: word;
     begin
       if Drive in ['a'..'z'] then Dec(Drive, $20);
       if not (Drive in ['A'..'Z']) then
         raise EConvertError.Create('Not a valid drive ID');
       ErrorMode := SetErrorMode(SEM_FailCriticalErrors);
       try
         if DiskSize(Ord(Drive) - $40) = -1 then
           Result := False
         else
           Result := True;
       finally
         SetErrorMode(ErrorMode);
       end;
     end;

y su llamada

Código Delphi [-]
If DiskInDrive('a') then ShowMessage('disco A') else ShowMessage('No hay A');

Espero que te oriente, Saludos
__________________
Código Delphi [-]
 
try 
ProgramarMicro(80C52,'Intel',MnHex,True);
except
On Exception do
MicroChip.IsPresent(True);
end;
Responder Con Cita