咨询电话:010-82823766

Delphi下读取网卡的MAC
  • 2008-5-5 10:54:23
  • 发表时间:
  • 浏览次数:
  • 本站原创
  • 文章来源:
  • 佚名
  • 作者:

var
  LanaNum: Byte;
  MACAddress: PMACAddress;
  RetCode: Byte;
begin
  LanaNum := StrToInt(ComboBox1.Text);
  New(MACAddress);
  try
    RetCode := GetMACAddress(LanaNum, MACAddress);
    if RetCode = NRC_GOODRET then
    begin
      Edit1.Text := Format('%2.2x-%2.2x-%2.2x-%2.2x-%2.2x-%.2x', MACAddress[0], MACAddress[1], MACAddress[2], MACAddress[3], MACAddress[4], MACAddress[5]]);
    end else
    begin
      Beep;
      Edit1.Text := 'Error';
      ShowMessage('GetMACAddress Error! RetCode

top
推荐导读
推荐导读
bottom
top
热门文章
热门文章
bottom