<div><span style="line-height: 1.5;">call WSASetLastError in NotifyAddrChange/NotifyRouteChange to make following DEMO code working.</span></div><div><includetail><div style="font:Verdana normal 14px;color:#000;"><br>void main()<br>{<br>  OVERLAPPED overlap;<br>  DWORD ret;<br>    <br>  HANDLE hand = NULL;<br>  overlap.hEvent = WSACreateEvent();<br><br>  ret = NotifyAddrChange(&hand, &overlap);<br><br>  if (ret != NO_ERROR)<br>  {<br>    if (WSAGetLastError() != WSA_IO_PENDING)<br>    {<br>      printf("NotifyAddrChange error...%d\n", WSAGetLastError());            <br>      return;<br>    }<br>  }<br><br>  if ( WaitForSingleObject(overlap.hEvent, INFINITE) == WAIT_OBJECT_0 )<br>    printf("IP Address table changed..\n");<br>}<br><br>---<br> dlls/iphlpapi/iphlpapi_main.c | 57 ++++++++++++++++++++++++++++++++++---------<br> 1 file changed, 45 insertions(+), 12 deletions(-)</div><!--<![endif]--></includetail></div>