2010-05-17

GetComputerName

GetComputerName

function ComputerName: String;
var
  vComputerName: array[0..MAX_COMPUTERNAME_LENGTH] of char;
  Size: DWord;
begin
  Size := MAX_COMPUTERNAME_LENGTH;

  if GetComputerName(vComputerName, Size) then
    result := vComputerName
  else
    result := '';
end;


ComputerName

沒有留言: