From 250fdcdbf77f0296f31391eb3a8b87de195aad92 Mon Sep 17 00:00:00 2001 From: beware Date: Sat, 10 Dec 2011 13:29:58 +0000 Subject: [PATCH] redone getlocalips fix more neatly git-svn-id: file:///svnroot/lcore/trunk@109 b1de8a11-f9be-4011-bde0-cc7ace90066a --- lcorelocalips.pas | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/lcorelocalips.pas b/lcorelocalips.pas index dcc633a..aafddf7 100644 --- a/lcorelocalips.pas +++ b/lcorelocalips.pas @@ -188,7 +188,7 @@ end; {$else} uses - sysutils,windows,winsock,dnssync,dnscore; + sysutils,windows,winsock,dnswin; {the following code's purpose is to determine what IP windows would come from, to reach an IP it can be abused to find if there's any global v6 IPs on a local interface} @@ -256,13 +256,9 @@ var a:integer; ip:tbinip; usewindnstemp:boolean; + error:integer; begin - {this lookup must always be done with the windows API lookup - setting usewindns to false on windows will fail with infinite recursion} - usewindnstemp := usewindns; - usewindns := true; - result := forwardlookuplist('',0); - usewindns := usewindnstemp; + result := winforwardlookuplist('',0,error); {$ifdef ipv6} -- 2.30.2