Page 1 of 1

ComputerName() / HostName()

Posted: Tue Jul 04, 2023 12:14 pm
by Splunk
I am writing a server/client application. Server or client can be any computer in this network. The computer that starts the program first is automatically the server.

Where exactly is the difference between the functions computername() vs. hostname()? For me the result is always the same.

Re: ComputerName() / HostName()

Posted: Tue Jul 04, 2023 12:21 pm
by Mindphazer
HostName() is in the Network section of the help, so I guess you should preferably use it, as you write a client/server application.
It might be the NetBIOS name of the computer.

Re: ComputerName() / HostName()

Posted: Wed Jul 05, 2023 1:57 pm
by Splunk
Ok, thanks. You have put me on the right track with NetBios. The hostname could possibly also contain the domain name.