-
June 3rd, 2002, 11:09 AM
#1
isp dns server address
hi
I want to find the default dns server address / default gateway
programatically.
Is there a way to find out dns server ip address like ipconfig.
Here is a sample output while running "ipconfig.exe /all" on my system
(dial up connection)
___________________________________________________________
D:\>ipconfig /all
Windows IP Configuration
Host Name . . . . . . . . . . . . : s
Primary Dns Suffix . . . . . . . :
Node Type . . . . . . . . . . . . : Unknown
IP Routing Enabled. . . . . . . . : Yes
WINS Proxy Enabled. . . . . . . . : Yes
PPP adapter Dishnet:
Connection-specific DNS Suffix . :
Description . . . . . . . . . . . : WAN (PPP/SLIP) Interface
Physical Address. . . . . . . . . : 00-53-45-00-00-00
Dhcp Enabled. . . . . . . . . . . : No
IP Address. . . . . . . . . . . . : 202.9.156.173
Subnet Mask . . . . . . . . . . . : 255.255.255.255
Default Gateway . . . . . . . . . : 0.0.0.0
DNS Servers . . . . . . . . . . . : 202.9.152.11
202.9.145.6
NetBIOS over Tcpip. . . . . . . . : Disabled
___________________________________________________________
Now there it is written DNS servers.
Is there a way to find out the dns servers. I have searched many sites
but I can't find it out. Can you help.
Shrishail Rana
-
June 3rd, 2002, 12:10 PM
#2
Try typing DSN into the index of MSDN (or search msdn.microsoft.com.
There is a ton of info about your question. In particular there is a Dns class with a method that gets the host name.
-
June 3rd, 2002, 12:12 PM
#3
OOPS DNS
Sorry I meant DNS not DSN. (Dyslexic Service Name)
-
April 6th, 2019, 05:06 AM
#4
Re: isp dns server address
Thanks for the information. It really saved me. Thank You
-
April 14th, 2019, 06:44 AM
#5
Re: isp dns server address
Thanks it was of great help.
-
April 14th, 2019, 10:37 AM
#6
Re: isp dns server address
Originally Posted by billwilson3
Try typing DSN into the index of MSDN (or search msdn.microsoft.com.
There is a ton of info about your question. In particular there is a Dns class with a method that gets the host name.
Note that the DNS class is part of .net and therefore only for use within C++/cli and not 'standard' C++.
All advice is offered in good faith only. All my code is tested (unless stated explicitly otherwise) with the latest version of Microsoft Visual Studio (using the supported features of the latest standard) and is offered as examples only - not as production quality. I cannot offer advice regarding any other c/c++ compiler/IDE or incompatibilities with VS. You are ultimately responsible for the effects of your programs and the integrity of the machines they run on. Anything I post, code snippets, advice, etc is licensed as Public Domain https://creativecommons.org/publicdomain/zero/1.0/ and can be used without reference or acknowledgement. Also note that I only provide advice and guidance via the forums - and not via private messages!
C++23 Compiler: Microsoft VS2022 (17.6.5)
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|