//声明:
SetComputerName(
lpComputerName: PChar {新名称串指针}
): BOOL;
//举例:
var
s: string;
begin
s := 'NewName';
if SetComputerName(PAnsiChar(s)) then
ShowMessage(s)
else
ShowMessage('改名失败');
end;
{改名成功后, 重新启动计算机后才有效}
时间: 2024-11-08 21:17:57