T taizi Unregistered / Unconfirmed GUEST, unregistred user! 2003-04-08 #1 例如,我的机器名是h,现在改为l,请问怎么实现,用socket API函数实现,<br>请给出例子,谢谢!
Y yczjs Unregistered / Unconfirmed GUEST, unregistred user! 2003-04-08 #2 //取名<br>var<br> s:Array[1..127] of Char;<br> iWord;<br>begin<br> GetComputerName(@s,i);<br> Edit5.Text:=s;<br>end;<br>//改名<br> if SetComputerName(Pchar(Edit2.Text)) then<br> ShowMessage('改名成功')<br> else<br> ShowMessage('改名失败')
//取名<br>var<br> s:Array[1..127] of Char;<br> iWord;<br>begin<br> GetComputerName(@s,i);<br> Edit5.Text:=s;<br>end;<br>//改名<br> if SetComputerName(Pchar(Edit2.Text)) then<br> ShowMessage('改名成功')<br> else<br> ShowMessage('改名失败')