I am unable to get the DNS Server IP address using C. I have tried using IP_ADAPTER_INFO however it only gets the Primary and Secondary WINS Server IP address using pAdapter->PrimaryWinsServer and pAdapter->SecondaryWinsServer.
And based on my knowledge the WINS server and the DNS server are two different types of servers.
Use
GetAdaptersAddresses(), and see theIP_ADAPTER_ADDRESSstructure.