SetComputerName

  BOOL SetComputerName(lpszName);    
  LPTSTR lpszName; /* address of new computer name */

The SetComputerName function sets the computer name that will be used the next time the system is rebooted.

Parameters

lpszName

Points to a null-terminated character string that specifies the new computer name. The name must not be longer than MAX_COMPUTERNAME_LENGTH characters.

Return Value

The return value is TRUE if the function was successful, or FALSE if an error occurred. To obtain extended error information, use the GetLastError function.

See Also

GetComputerName