function
ChangeComputerName(NewComputerName: string): Boolean; var ComputerName: array[0..MAX_COMPUTERNAME_LENGTH + 1] of Char; Size: Cardinal; begin StrPCopy(ComputerName, NewComputerName); Result := Windows.SetComputerName(ComputerName); sendMessage(HWND_BROADCAST,WM_WININICHANGE,0,0); end; |