X-Git-Url: http://www.lcore.org/git/lcore.git/blobdiff_plain/3ac664ec654230b9ad26ab12242c1db6f636a26f..ffb12fba43635d1d31d7dd073cd4d1ea7d8f4ebd:/lcorelocalips.pas?ds=inline

diff --git a/lcorelocalips.pas b/lcorelocalips.pas
index ae2a00b..d275012 100644
--- a/lcorelocalips.pas
+++ b/lcorelocalips.pas
@@ -51,7 +51,7 @@ function getv6localips:tbiniplist;
 
 function getsystemdnsservers:tbiniplist;
 
-{$ifdef win32}
+{$ifdef mswindows}
 function gethostname:ansistring;
 {$endif}
 
@@ -188,7 +188,7 @@ end;
 {$else}
 
 uses
-  sysutils,windows,winsock,dnssync;
+  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}
@@ -255,8 +255,10 @@ function getlocalips:tbiniplist;
 var
   a:integer;
   ip:tbinip;
+  usewindnstemp:boolean;
+  error:integer;
 begin
-  result := forwardlookuplist('',0);
+  result := winforwardlookuplist('',0,error);
 
   {$ifdef ipv6}
 
@@ -282,7 +284,7 @@ end;
 
 
 
-{$ifdef win32}
+{$ifdef mswindows}
   const
     MAX_HOSTNAME_LEN = 132;
     MAX_DOMAIN_NAME_LEN = 132;
@@ -348,7 +350,7 @@ end;
 
 function getsystemdnsservers:tbiniplist;
 var
-  {$ifdef win32}
+  {$ifdef mswindows}
     fixed_info : pfixed_info;
     currentdnsserver : pip_addr_string;
   {$else}
@@ -362,7 +364,7 @@ begin
 
   result := biniplist_new;
 
-  {$ifdef win32}
+  {$ifdef mswindows}
     fixed_info := callgetnetworkparams;
     if fixed_info = nil then exit;
 
@@ -398,7 +400,7 @@ begin
   {$endif}
 end;
 
-{$ifdef win32}
+{$ifdef mswindows}
 function gethostname:ansistring;
 var
     fixed_info : pfixed_info;