Fórum Serial Físico do hd #462585
29/11/2013
0
olá, pessoal alguém conhece uma função que retorne o serial físico do hd? grato.
Marcos Morais
Curtir tópico
+ 0
Responder
Posts
30/11/2013
Luiz Eduardo
Maneira mais fácil é usando a WMI.
Responder
Gostei + 0
02/12/2013
Gustavo Bretas
Segue:
function SerialNum(FDrive: String): String;
Var
Serial: DWord;
DirLen, Flags: DWord;
DLabel: Array [0 .. 11] of Char;
begin
Try
GetVolumeInformation(PChar(FDrive + ':\'), DLabel, 12, @Serial, DirLen, Flags, nil, 0);
Result := IntToHex(Serial, 8);
Except
Result := '';
end;
end;
Responder
Gostei + 0
Clique aqui para fazer login e interagir na Comunidade :)