在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
代码实现如下 procedure TMainForm.tmrMonitorTimer(Sender: TObject); var ComputerName:array[0..MAX_COMPUTERNAME_LENGTH+1] of char; //保留计算机名的缓冲区 Buffer:Dword; // 缓冲区大小 sComputerName:string;//计算机名 begin Buffer:=MAX_COMPUTERNAME_LENGTH+1; if GetComputerName(@ComputerName,Buffer) then begin sComputerName:=ComputerName; end else begin sComputerName:=''; end; ShowMessage(sComputerName); end; |
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论