本文整理自网络,侵删。
function SendARP(ipaddr: ulong; temp: dword; ulmacaddr: pointer; ulmacaddrleng: pointer): dword; stdcall; external 'Iphlpapi.dll' Name 'SendARP'; function IP2Mac(ipaddr:ULong):String;var AMac: array [0 .. 5] of BYTE; l: ulong; r: integer;begin l:=6; r := SendARP(ipaddr, 0, @AMac, @l); if r=0 then Result:=Format('%2.2x-%2.2x-%2.2x-%2.2x-%2.2x-%2.2x', [AMac[0], AMac[1], AMac[2], AMac[3], AMac[4],AMac[5]]) else Result:='';end;
来源:http://blog.qdac.cc/?p=2902
相关阅读 >>
Delphi的tservice 服务路径获取 dll中获取文件路径
更多相关阅读请进入《Delphi》频道 >>