Windows Vista Tips

Windows Vista Tips > Newsgroups > Windows Vista General Discussion > GetBestRoute and GetBestInterface in Vista

Reply
Thread Tools Display Modes

GetBestRoute and GetBestInterface in Vista

 
 
Laurent Frelechoux
Guest
Posts: n/a

 
      11-05-2007
I have noticed a change of behaviour from XP to Vista with regard to the
GetBestRoute and GetBestInterface. On Vista, If I turn on my internal WLAN,
connect to an access point, get the IP layer up, and then turn off the WLAN
adapter, the two mentionned primitives do not see that the IP connectivity is
gone and this for at least one minute. Funny enough, if I open Internet
Explorer and try to reach a Web site, it detects directly that there is no IP
connectivity, the two mentionned primitives however still return that there
is a route or an interface respectively.



Any suggestion on how to get an up-to-date status of the routing ? What I
need to test is whether there is IP connectivity with a default gateway for
routing.

 
Reply With Quote
 
 
 
 
Andrew McLaren
Guest
Posts: n/a

 
      11-05-2007
"Laurent Frelechoux" <Laurent > wrote...
>I have noticed a change of behaviour from XP to Vista with regard to the
> GetBestRoute and GetBestInterface. On Vista, If I turn on my internal
> WLAN,


Hi Laurent,

The short answer is: I dunno. But a couple of guesses ... first, in Vista,
the out parameter of GetBestInterface() is a pointer to a NET_IFINDEX
structure; not a DWORD as in XP and ealier. So you may need to adjust that
in your code.

Also, what does does GetBestInterface() return? Does it complete with
NO_ERROR? Or do you get a return code like ERROR_CAN_NOT_COMPLETE or
ERROR_NOT_SUPPORTED? That might give you a clue.

Finally, note that GetBestInterface only works with the IPv4 stack. On
Vista, by default you will have the IPv4 and IPv6 stacks running
side-by-side. If your IP connection is actually over IPv6, you would need to
use GetBestInterfaceEx().

microsoft.public.windows.vista.general is a pretty user-oriented newsgroup,
there aren't many devlopers here. You may get better results asking in
places like microsoft.public.win32.programmer.networks, or the MSDN Windows
Vista Wireless SDK forum:
http://forums.microsoft.com/MSDN/Sho...=1700&SiteID=1


Good luck with it,
--
Andrew McLaren
amclar (at) optusnet dot com dot au


 
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off




1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59