how to find "dns server" that was set on the running computer? it's is the same result as command "ipconfig /all" but i dont want to know all of the information just only dns server. this dns may be change when the computer connected to the internet via modem with different isp.
after seeing the code of "network monitor" (code found on this site by And-Or) i found iphlpapi.dll has the funciton GetNetworkParams that can retrieve the CurrentDnsServer on the computer. But I dont know anything about iphlpapi.dll. Is this funciton is the right way? Is iphlpapi.dll is the standard that already comes with window? Is it will work on NT? Another way I found that dns server is stored in the registry. but the same problem, i wonder that is it will work on all computer? Anyone know about these please help me....
I have NT 4.0 with SP6 and there is iphlpapi.dll found. I can check that reg key for you if you tell me where to look.
don't bother dude. it's too hard. i've tried with everything from ida to softice and there is always something that fucks me up. just use a fullblown resolver. you don't actually need a 'dns' ever, it's just polite to use a local one where results might be cached.