Ver Mensaje Individual
  #2  
Antiguo 13-10-2007
Avatar de aeff
aeff aeff is offline
Miembro
 
Registrado: oct 2006
Ubicación: Cuba, Guantánamo
Posts: 348
Reputación: 18
aeff Va camino a la fama
implementa esta función

Código Delphi [-]
function GetVolumeID(DriveChar: Char): String; 
var
   MaxFileNameLength, VolFlags, SerNum: DWord;
begin
   if GetVolumeInformation(PChar(DriveChar + ':\'), nil, 0,
      @SerNum, MaxFileNameLength, VolFlags, nil, 0)
   then 
   begin
     Result := IntToHex(SerNum,8);
     Insert('-', Result, 5);
   end
   else
       Result := '';
end;

un ejemplo de llamada
Código Delphi [-]
 Caption:=GetVolumeId('c');

espero que te sirva de algo

saludos
aeff!
Responder Con Cita