Click here to Skip to main content
15,889,216 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Which API function(s) are needed to determine the IP address of the gateway? I've spent ages searching around on google, but all I could find was information on retrieving the host IP address. I have also searched on MSDN, but have not found any information on their either.

Thanks,
Lloyd
Posted

1 solution

You're going to want to use WMI and the Win32_NetworkAdapterConfiguration class. I can't find anything that's exposed for gateway in the NetworkInformation namespace.

There's actually a CP project here[^] on it.

Cheers.
 
Share this answer
 
Comments
LloydA111 25-Jun-10 1:39am    
Thank you very much :-) Greatly appreciated.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900