[PATCH] iphlpapi: call WSASetLastError in NotifyAddrChange/NotifyRouteChange
Hao Peng
penghao at linuxdeepin.com
Mon Nov 3 01:26:39 CST 2014
call WSASetLastError in NotifyAddrChange/NotifyRouteChange to make following DEMO code working.
void main()
{
OVERLAPPED overlap;
DWORD ret;
HANDLE hand = NULL;
overlap.hEvent = WSACreateEvent();
ret = NotifyAddrChange(&hand, &overlap);
if (ret != NO_ERROR)
{
if (WSAGetLastError() != WSA_IO_PENDING)
{
printf("NotifyAddrChange error...%d\n", WSAGetLastError());
return;
}
}
if ( WaitForSingleObject(overlap.hEvent, INFINITE) == WAIT_OBJECT_0 )
printf("IP Address table changed..\n");
}
---
dlls/iphlpapi/iphlpapi_main.c | 57 ++++++++++++++++++++++++++++++++++---------
1 file changed, 45 insertions(+), 12 deletions(-)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-iphlpapi-call-WSASetLastError-in-NotifyAddrChange-Noti.txt
Type: application/octet-stream
Size: 6062 bytes
Desc: not available
URL: <http://www.winehq.org/pipermail/wine-patches/attachments/20141103/ebcf1b5b/attachment-0001.obj>
More information about the wine-patches
mailing list