Autor Beitrag
Martok
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 3661
Erhaltene Danke: 604

Win 8.1, Win 10 x64
Pascal: Lazarus Snapshot, Delphi 7,2007; PHP, JS: WebStorm
BeitragVerfasst: So 03.02.08 19:19 
Hallo!

Ist zwar fast schon wieder WinAPI, aber egal.

Und zwar möchte ich herausfinden, welchen DNS-Server Windows gerade verwendet. Das heißt also ich möchte nicht nur wissen, was der User eingestellt hat (bringt auch bei DHCP eher wenig), sondern ggf. auch den zugewiesenen DNS.
Sollte es mehrere Adapter geben, wird die Sache ja noch interessanter...

Da gibt es bestimmt eine Funktion für, aber ich finde nichts vernünftiges. Dafür mach ich zu wenig in diesem Gebiet...

mfg
Martok

PS: und nein, ich möchte nicht ipconfig /all parsen ;)

_________________
"The phoenix's price isn't inevitable. It's not part of some deep balance built into the universe. It's just the parts of the game where you haven't figured out yet how to cheat."
jaenicke
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 19346
Erhaltene Danke: 1754

W11 x64 (Chrome, Edge)
Delphi 12 Pro, C# (VS 2022), JS/HTML, Java (NB), PHP, Lazarus
BeitragVerfasst: Di 05.02.08 12:40 
Also ich bin mir gerade nicht sicher, weil es schon eine Weile her ist seit ich mir das angesehen habe, aber ich glaube WSAEnumNameSpaceProviders war die Funktion dafür.

// EDIT:
Hier habe ich (via Google ;-)) was fertiges für Delphi gefunden:
www.mytips123.com/ar...-DNS-servers-list%3F
Martok Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 3661
Erhaltene Danke: 604

Win 8.1, Win 10 x64
Pascal: Lazarus Snapshot, Delphi 7,2007; PHP, JS: WebStorm
BeitragVerfasst: Di 05.02.08 14:27 
Ähm. Schön.

Nach was hast du gesucht? Ich hab mir auch nen Wolf gesucht, aber das nicht gefunden... Ich hatte nach "DNS Server Delphi" gesucht...

_________________
"The phoenix's price isn't inevitable. It's not part of some deep balance built into the universe. It's just the parts of the game where you haven't figured out yet how to cheat."
jaenicke
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 19346
Erhaltene Danke: 1754

W11 x64 (Chrome, Edge)
Delphi 12 Pro, C# (VS 2022), JS/HTML, Java (NB), PHP, Lazarus
BeitragVerfasst: Di 05.02.08 14:56 
www.google.de/search...btnG=Suche&meta= ;-)
Das war aber auch erst die neunte Sucheingabe, die dann zum Erfolg geführt hat. Vorher hatte ich z.B. "windows api get dns server list" u.ä. versucht. ;-)

Wichtig bei den Suchbegriffen war natürlich, dass die Aktion, dass man eine Liste der Server suchen möchte, drin steht, weil man ansonsten einfach zu viele Ergebnisse zu DNS Servern allgemein bekommt.