Главная страница
    Top.Mail.Ru    Яндекс.Метрика
Текущий архив: 2003.11.13;
Скачать: 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 вся ветка

Текущий архив: 2003.11.13;
Скачать: CL | DM;

Наверх




Память: 0.44 MB
Время: 0.036 c
8-41772
Santana
2003-07-16 13:33
2003.11.13
выводится ли звуковой поток в даный момент


14-42042
Карелин Артем
2003-10-22 15:53
2003.11.13
Покритикуйте мою вторую попытку многопоточного доступа к базе.


1-41472
Star
2003-10-28 02:19
2003.11.13
TGraphic


3-41096
Devourer
2003-10-22 16:47
2003.11.13
Delphi+Oracle


6-41839
Michael_X
2003-09-05 15:01
2003.11.13
Winsock2





Afrikaans Albanian Arabic Armenian Azerbaijani Basque Belarusian Bulgarian Catalan Chinese (Simplified) Chinese (Traditional) Croatian Czech Danish Dutch English Estonian Filipino Finnish French
Galician Georgian German Greek Haitian Creole Hebrew Hindi Hungarian Icelandic Indonesian Irish Italian Japanese Korean Latvian Lithuanian Macedonian Malay Maltese Norwegian
Persian Polish Portuguese Romanian Russian Serbian Slovak Slovenian Spanish Swahili Swedish Thai Turkish Ukrainian Urdu Vietnamese Welsh Yiddish Bengali Bosnian
Cebuano Esperanto Gujarati Hausa Hmong Igbo Javanese Kannada Khmer Lao Latin Maori Marathi Mongolian Nepali Punjabi Somali Tamil Telugu Yoruba
Zulu
Английский Французский Немецкий Итальянский Португальский Русский Испанский