quarta-feira, 2 de setembro de 2009

Função que retorna o nome do computador

Uses Registry;
function TForm1.Getcomputer : string;
var
registro : tregistry;
begin
registro:=tregistry.create;
registro.RootKey:=HKEY_LOCAL_MACHINE;
registro.openkey('SystemCurrentControlSetServicesVXDVNETSUP',false);
result:=registro.readstring('ComputerName');
end;

Nenhum comentário:

Postar um comentário