Гость
Целевая тема:
Создать новую тему:
Автор:
Форумы / C++ [игнор отключен] [закрыт для гостей] / SendARP / 3 сообщений из 3, страница 1 из 1
18.01.2017, 08:01
    #39386581
muk07
Участник
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
SendARP
Моя программа использует функцию SendARP. Успешно получает MAC адрес при запуске под XP, но возвращает ошибку 1168 (ERROR_NOT_FOUND) при запуске под WIN 7. И от имени администратора тоже.
В чём может быть дело?
...
Рейтинг: 0 / 0
18.01.2017, 08:16
    #39386585
Dima T
Участник
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
SendARP
Почитай описаловку, там что-то поменялось со времен XP
https://msdn.microsoft.com/ru-ru/library/windows/desktop/aa366358(v=vs.85).aspx On Windows Vista and later, a NULL pointer passed as the pMacAddr or PhyAddrLen parameter to the SendARP function causes an access violation and the application is terminated. If an error occurs on Windows Vista and later and ERROR_BAD_NET_NAME, ERROR_BUFFER_OVERFLOW, or ERROR_NOT_FOUND is returned, the ULONG value pointed to by the PhyAddrLen parameter is set to zero. If the ULONG value pointed to by the PhyAddrLen parameter is less than 6 on Windows Vista and later, SendARP function returns ERROR_BUFFER_OVERFLOW indicating the buffer to receive the physical address is too small. If the SrcIp parameter specifies an IPv4 address that is not an interface on the local computer, the SendARP function on Windows Vista and later returns ERROR_NOT_FOUND.
...
Рейтинг: 0 / 0
18.01.2017, 08:32
    #39386592
muk07
Участник
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
SendARP
Спасибо, действительно я невнимательно прочитал.
Причина действительно была:
If the SrcIp parameter specifies an IPv4 address that is not an interface on the local computer, the SendARP function on Windows Vista and later returns ERROR_NOT_FOUND.
...
Рейтинг: 0 / 0
Форумы / C++ [игнор отключен] [закрыт для гостей] / SendARP / 3 сообщений из 3, страница 1 из 1
Найденые пользователи ...
Разблокировать пользователей ...
Читали форум (0):
Пользователи онлайн (0):
x
x
Закрыть


Просмотр
0 / 0
Close
Debug Console [Select Text]