Jump to content

TCPStartup() / _TCPIpToName


Recommended Posts

Hi guys, I've run into a snag with the program I'm making.

When I use _TCPIpToName it only seems to work once, then i have to restart my computer before it can work again, I've managed to find a temporary solution and that is running VNC and connecting it to another computer between each use of _TCPIpToName but that Isn't really ideal for 100+ computers.

I suspect it might be TCPShutdown() not working properly, but i am using it.

Any ideas?

Link to comment
Share on other sites

Welcome to the forums.

I just ran it against a dozen systems and it works fine for me.

Post your code and we'll see what's wrong.

[font="Tahoma"]"Tougher than the toughies and smarter than the smarties"[/font]

Link to comment
Share on other sites

Welcome to the forums.

I just ran it against a dozen systems and it works fine for me.

Post your code and we'll see what's wrong.

Hi, thanks.

func hostname($ip, $selectedip)
    $hostname=""
    WinWaitClose("Hostname")
    TCPStartup()
    $hostname = _TCPIpToName($ip[1] & "." & $ip[2] & "." & $ip[3]  & "." & $selectedip,0)
    TCPShutdown()
    MsgBox(0,"Hostname",$hostname)
EndFunc

The function is run from clicking a button on the GUI, $ip and $selectedip have the correct values so i don't think it could be them.

Edit: If you need the rest i can add it but its pretty long code.

Edited by NeilApp
Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...