AquilaChill Posted November 18, 2007 Share Posted November 18, 2007 (edited) is there a way to specify what network adapter to use for _TCPIpToName? if not, is there a way to modify it to? my problem is that its using the wrong adapter & thus not getting the right result i have three network adapters, LAN & two VMware virtual ones when i run this (.5 is a computer i know is on & connected fine, i can ping it & have verified its ip & connection on it) #include <Inet.au3> Opt("TrayIconDebug",1) $ip="192.168.0.5" Dim $ipname TCPStartup() $ipname=_TCPIpToName($ip,1) For $i=1 To $ipname[0] MsgBox(0,"dev "&@error,"ip's "&$ipname[0]&@CR&$ipname[$i]) Next TCPShutdown() i tried using the array to see if it brings back multiple, but it brings back neontorrents.org when that computer is on. when i disable both the VMware adapters it runs fine, but takes 6-14 extra secs to complete, sticking on trying to use the disabled adapter i guess. i know nothing of interacting with dll's in autoit, let alone if this is possible. now i know asking people todo stuff for me is lame, but this is out of my league. Edited November 20, 2007 by AquilaChill people are anoying, am i? ;) v2.95 Link to comment Share on other sites More sharing options...
AquilaChill Posted November 19, 2007 Author Share Posted November 19, 2007 18hours, bump people are anoying, am i? ;) v2.95 Link to comment Share on other sites More sharing options...
evilertoaster Posted November 19, 2007 Share Posted November 19, 2007 Looks like this was discused when it was first implmented- http://www.autoitscript.com/forum/index.php?showtopic=36173As metioned in the port, there is no way to know for sure a 1 to 1 corelation between a name and ip address. The remarks in the documentation for the function used in the UDF (http://msdn2.microsoft.com/en-us/library/ms738521.aspx) metion that - 1. It's depreciated now (use getnameinfo instead) and 2- The capability to perform reverse lookups using the gethostbyaddr function is convenient, but such lookups are considered inherently unreliable, and should be used only as a hint. Just like PaulIA said in the post. Link to comment Share on other sites More sharing options...
AquilaChill Posted November 20, 2007 Author Share Posted November 20, 2007 thanks for the info, looks like im going to find out/try to have to limit the compiled version to the main adapter only, if i can (silly NPF) people are anoying, am i? ;) v2.95 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