Вниз
Скачать: CL | DM;

IP -> MAC и наоборот   Найти похожие ветки 

 
Demetrius ©   (2003-09-15 14:15) [0]

Есть ли возможность средствали дельфи узнать MAC-адрес из IP-адреса и наоборот.
Спасибо


 
Verg ©   (2003-09-15 16:45) [1]

Для Win2k, WinXP...

узнать MAC-адрес из IP-адреса:

interface
uses windows;

function SendARP(DestIP:DWORD;SrcIP:DWORD; var pMacAddr; var PhyAddrLen:DWORD):DWORD;stdcall;
{
Parameters
DestIP
[in] Destination IP address. The ARP request attempts to obtain the physical address that corresponds to this IP address.
SrcIP
[in] IP address of the sender. This parameter is optional. The caller may specify zero for the parameter.
pMacAddr
[out] Pointer to an array of ULONG variables. The first six bytes of this array receive the physical address that corresponds to the IP address specified by DestIP.
PhyAddrLen
[in, out] On input, specifies the maximum buffer size the user has set aside at pMacAddr to receive the MAC address, in bytes. On output, specifies the number of bytes written to pMacAddr.
Return Values
If the function succeeds, the return value is NO_ERROR.

If the function fails, use FormatMessage to obtain the message string for the returned error.}

implementation

function SendARP; external "IPHLPAPI.DLL" name "SendARP";
end.



Страницы: 1 вся ветка

Скачать: CL | DM;



Память: 0.45 MB
Время: 0.06 c
3-41084
нет
2003-10-23 15:28
2003.11.13
Уникальное поле в Парадоксе


1-41207
Alibaba
2003-11-01 21:27
2003.11.13
Show


7-42201
ksa2002
2003-08-27 11:37
2003.11.13
МОДЕМЫ


7-42181
Akim2
2003-08-29 16:47
2003.11.13
При отключении компа от хаба/свитча, не прочитывается MAC


1-41454
ss-dd
2003-10-29 11:30
2003.11.13
Rational ClearCase




   Наверх