关于sendarp的用法,想从IP直接得到MAC地址 sendarp 在哪个DLL中?DELPHI中怎么申明?怎么用?能不能给一个例子? 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 VC版http://www.pcvc.net/category/content.asp?sendid=229在IPHLPAPI.DLL中Delphi版:http://users.pandora.be/sonal.nv/ics/faq/General.html===================================Example 2: const INADDR_NONE = $FFFFFFFF; function SendARP( const DestIP : DWord; const SrcIP : DWord; const pMacAddr : Pointer; const PhyAddrLen : PULONG) : DWord; stdcall; external 'IPHLPAPI.DLL' name 'SendARP';function inet_addr(const cp : PChar) : DWord; stdcall; external 'WS2_32.DLL' name 'inet_addr';vardwResult : DWord;ulIPAddr : DWord;ulMACAddr : Array [0..5] of Byte;ulAddrLen : ULONG;begin ulIPAddr := inet_addr(PChar('192.168.1.1')); ShowMessage(IntToHex(ulIPAddr,8)); // Ist mal interessant zu sehen if ulIPAddr = INADDR_NONE exit; ulAddrLen := 6; dwResult := SendARP(ulIPAddr,0,@ulMACAddr,@ulAddrLen); ShowMessage('dwResult: '+IntToStr(dwResult)); // if 0, then ok ShowMessage(IntToHex(ulMACAddr[0],2)+':'+ IntToHex(ulMACAddr[1],2)+':'+ IntToHex(ulMACAddr[2],2)+':'+ IntToHex(ulMACAddr[3],2)+':'+ IntToHex(ulMACAddr[4],2)+':'+ IntToHex(ulMACAddr[5],2));end; BDE错误,求助各位大神~~~~~~~~~~ [Delphi求助]我想要个简单的Grid,怎么做 请教 使用哪个组件可以选择同一个数据库中不同的表 新手求助! fastreport的送分问题 求 Sql 语句 ===关于变量处理问题=== 怎样产生这样的效果啊?(急!!,救命:() 高手请进,同一命令,在WIN98下可以读取主板序列号,在NT、2000下不可以,命令如下: 如何在DBGRID中处理Paradox logical fields ★★★★C/S架构ADO连接的应用程序,在打包成安装程序时应分发哪些文件?★★★★ 请问一个很菜的问题,在线等…
Delphi版:http://users.pandora.be/sonal.nv/ics/faq/General.html===================================Example 2: const INADDR_NONE = $FFFFFFFF;
function SendARP( const DestIP : DWord;
const SrcIP : DWord;
const pMacAddr : Pointer;
const PhyAddrLen : PULONG) : DWord; stdcall; external 'IPHLPAPI.DLL' name 'SendARP';function inet_addr(const cp : PChar) : DWord; stdcall; external 'WS2_32.DLL' name 'inet_addr';var
dwResult : DWord;
ulIPAddr : DWord;
ulMACAddr : Array [0..5] of Byte;
ulAddrLen : ULONG;begin
ulIPAddr := inet_addr(PChar('192.168.1.1'));
ShowMessage(IntToHex(ulIPAddr,8)); // Ist mal interessant zu sehen
if ulIPAddr = INADDR_NONE exit;
ulAddrLen := 6;
dwResult := SendARP(ulIPAddr,0,@ulMACAddr,@ulAddrLen);
ShowMessage('dwResult: '+IntToStr(dwResult)); // if 0, then ok
ShowMessage(IntToHex(ulMACAddr[0],2)+':'+
IntToHex(ulMACAddr[1],2)+':'+
IntToHex(ulMACAddr[2],2)+':'+
IntToHex(ulMACAddr[3],2)+':'+
IntToHex(ulMACAddr[4],2)+':'+
IntToHex(ulMACAddr[5],2));
end;