Code: Pascal [Select][+][-]function GetLocalComputerName3: string;var d: dword;begin GetComputerName(nil, @d); setlength(result, d); GetComputerName(@result[1], @d);end;