Ebola57 Posted August 6, 2020 Share Posted August 6, 2020 (edited) Hi community I got an error, while runing this code #include <Inet.au3> #include <MsgBoxConstants.au3> Local $aResult, $sResult, $sIp TCPStartup() $sIp = TCPNameToIP("MyHostname.fr") $sResult = _TCPIpToName($sIp) If @error Then MsgBox($MB_SYSTEMMODAL, "_TCPIpToName()", "@error = " & @error & @CRLF & "@extended = " & @extended) Else MsgBox($MB_SYSTEMMODAL, "MyHostname.fr really is: ", $sResult) EndIf $sIp contains the expected IP but IP to Name leads me to error @error = 4 @extended = 0 I am runing this script on Win10, ws2_32.dll exists in C:\Windows\System32 Also read @MS : https://docs.microsoft.com/en-us/windows/win32/api/winsock/nf-winsock-gethostbyaddr than gethostbyaddr is not anymore used and should be replaced by getnameinfo Any help appreciated Regards Edited August 6, 2020 by Ebola57 Link to comment Share on other sites More sharing options...
jguinch Posted August 6, 2020 Share Posted August 6, 2020 (edited) Can you try the same script using "autoitscript.com" as hostname ? I think your hostname is not registred in the Reverse lookup Zone of your DNS server Try the command nslookup IP (where IP is the IP address of the host) to see if the issue is related to autoit or not. Edited August 6, 2020 by jguinch Spoiler Network configuration UDF, _DirGetSizeByExtension, _UninstallList Firefox ConfigurationArray multi-dimensions, Printer Management UDF Link to comment Share on other sites More sharing options...
Ebola57 Posted August 6, 2020 Author Share Posted August 6, 2020 Using "autoitscript.com" leads to success, resulst is "server1.autoitscript.com" nslookup MyIp Serveur : server.domain.fr Address: ServerIP *** server.domain.fr ne parvient pas à trouver MyIp : Non-existent domain Pinging expected domain leads to a correct resolving IP Link to comment Share on other sites More sharing options...
jguinch Posted August 6, 2020 Share Posted August 6, 2020 (edited) OK, so it's not an Autoit issue, it's a reverse DNS issue. What kind of host is it ? an internal host or public host ? If it's an internal host, ask to your IT best friend to add an entry in the reverse lookup zone on your internal DNS server Edited August 6, 2020 by jguinch Ebola57 1 Spoiler Network configuration UDF, _DirGetSizeByExtension, _UninstallList Firefox ConfigurationArray multi-dimensions, Printer Management UDF Link to comment Share on other sites More sharing options...
Ebola57 Posted August 6, 2020 Author Share Posted August 6, 2020 It's a switch on my local LAN, private LAN My IT system is so screwed, that I will never get response to such query Thanks anyway Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now