求助pB调用API函数SendARP问题
我用pb9.0调用API函数SendARP读本机的mac地址,但是升级到pb11.5后,mac地址读的就不对了,请高手指点!万分感谢!
SendARP函数定义如下:
FUNCTION Long SendARP(uLong DestIP,Long SrcIP,REF char pMacAddr[6],REF Long PhyAddrLen) Library "iphlpapi.dll" alias for "SendARP;Ansi"
调用如下:
LONG ll_RTN, ll_PhyAddrLen
ULONG ll_RemoteIP
Char lc_pMacAddr[6]
ll_RTN = SendARP(ll_RemoteIP, 0, lc_pMacAddr, ll_PhyAddrLen)
在线等!谢啦!
[解决办法]
把REF char pMacAddr[6]改为ref char pMacAddr[255]或 ref string pMacAddr试试,
如果采用ref string的话记得pMacAddr = space(255);