Answered by:
Getting the list of DNS servers addresses ( Windows Store APP, C++)

Question
-
Hi
I need to retrieve the list of DNS server addresses in the Windows Store application (C++).
This discussion is about the same issue but there are no answers.
Is it possible?
Thanks,
Rafi
Thursday, May 2, 2013 10:39 AM
Answers
-
I don't believe there's any way to get this information.
The best I can offer is that you can get the local IP address by creating a new StreamSocket ( http://msdn.microsoft.com/en-us/library/windows/apps/xaml/windows.networking.sockets.streamsocket.aspx ) and then through its Information property getting the LocalAddress property. This isn't a solution to the problem, though. Sorry.
Visual C++ MVP | Website | Blog | @mikebmcl | Windows Store DirectX Game Template
- Marked as answer by Jesse Jiang Wednesday, May 8, 2013 1:52 AM
Thursday, May 2, 2013 4:53 PM -
I went through the exercise of trying to figure this out also for Windows Store Applications and determined that this kind of system level information is not available. Once you've made a socket connection you can determine the IP Address or canonical name of a host. But things like what DNS, WINS, default gateway, etc. that a network interface is configured with is not available, at least from my research.
- Marked as answer by Jesse Jiang Wednesday, May 8, 2013 1:52 AM
Thursday, May 2, 2013 6:40 PM
All replies
-
I don't believe there's any way to get this information.
The best I can offer is that you can get the local IP address by creating a new StreamSocket ( http://msdn.microsoft.com/en-us/library/windows/apps/xaml/windows.networking.sockets.streamsocket.aspx ) and then through its Information property getting the LocalAddress property. This isn't a solution to the problem, though. Sorry.
Visual C++ MVP | Website | Blog | @mikebmcl | Windows Store DirectX Game Template
- Marked as answer by Jesse Jiang Wednesday, May 8, 2013 1:52 AM
Thursday, May 2, 2013 4:53 PM -
I went through the exercise of trying to figure this out also for Windows Store Applications and determined that this kind of system level information is not available. Once you've made a socket connection you can determine the IP Address or canonical name of a host. But things like what DNS, WINS, default gateway, etc. that a network interface is configured with is not available, at least from my research.
- Marked as answer by Jesse Jiang Wednesday, May 8, 2013 1:52 AM
Thursday, May 2, 2013 6:40 PM