Solved

How to get Gateway, DNS server address/name

Posted on 2000-04-18
1
401 Views
Last Modified: 2010-04-10
is there any api to get the gateway, dns server address/name..?

any idea about the location in registry where it is located..

sanesh@hclt.com
0
Comment
Question by:sanesh
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 1

Accepted Solution

by:
yanissim earned 100 total points
ID: 2734035
if you are using Win2k you can use
the IP helper library,
On nt4 you can extarct the info from the registry,
every installed adapter which is bind to
TCP/ip has a TCP/IP key where all the info you need is stored - including IP address,mask,gateway,etc..

lets say you have one network adapter
under HKLM/software/Microsoft/Windows Nt/Current version/Network cards/1
check the servicename value - this is the name of the base driver instance -
E100b1 for Intel 10/100 adapter.
then, go to HKLM/System/CurrentControlSet/Services/E100B1/TCPIP/Parameters and you will see everything you want
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Templates For Beginners Or How To Encourage The Compiler To Work For You Introduction This tutorial is targeted at the reader who is, perhaps, familiar with the basics of C++ but would prefer a little slower introduction to the more ad…
What is C++ STL?: STL stands for Standard Template Library and is a part of standard C++ libraries. It contains many useful data structures (containers) and algorithms, which can spare you a lot of the time. Today we will look at the STL Vector. …
The viewer will be introduced to the technique of using vectors in C++. The video will cover how to define a vector, store values in the vector and retrieve data from the values stored in the vector.
The viewer will be introduced to the member functions push_back and pop_back of the vector class. The video will teach the difference between the two as well as how to use each one along with its functionality.

728 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question