Code:

SetComputerName(PChar(Edit1.text));

 

  

Code:

Function ReadComputerName:string;

{©Drkb v.3, ®Vit (Vitaly Nevzorov) }

 

var

i:DWORD;

p:PChar;

begin

i:=255;

GetMem(p, i);

GetComputerName(p, i);

Result:=String(p);

FreeMem(p);

end;