How to get gateway address using GetAdaptersAddresses?



The gateway address is clearly visible in the results returned by
GetAdaptersInfo.

However the spec says:

"Windows Server 2003 and Windows XP: Use the GetAdaptersAddresses function
instead of GetAdaptersInfo."

Where in what is returned by GetAdaptersAddresses is the gateway address?
What goes wrong if I ignore this instruction and use GetAdaptersInfo?

--
Tim Ward - posting as an individual unless otherwise clear
Brett Ward Limited - www.brettward.co.uk
Cambridge Accommodation Notice Board - www.brettward.co.uk/canb
Cambridge City Councillor


.



Relevant Pages

  • Re: How to get gateway address using GetAdaptersAddresses?
    ... This posting is provided "AS IS" with no warranties, ... "Windows Server 2003 and Windows XP: ... function instead of GetAdaptersInfo." ... Cambridge Accommodation Notice Board - www.brettward.co.uk/canb ...
    (microsoft.public.win32.programmer.networks)
  • Re: How to obtain MAC of default gateway interface
    ... GetAdaptersInfo() ... I want to get MAC from interface used to connect to internet, ... that interface what handling default gateway IP. ...
    (microsoft.public.win32.programmer.networks)

Loading