Function ReadComputerName:string; var i:DWORD; p:PChar; begin i:=255; GetMem(p, i); GetComputerName(p, i); Result:=String(p); FreeMem(p); end;