# IPAddress and IPName

**URL:** <https://forum.xojo.com/t/ipaddress-and-ipname/44251>\
**Category:** General\
**Created:** [July 8, 2018, 1:18pm UTC](https://forum.xojo.com/t/ipaddress-and-ipname/44251 "2018-07-08T13:18:25Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

**Author:** ![Emile\_Schwarz](https://forum.xojo.com/letter_avatar_proxy/v4/letter/e/90ced4/32.png) [@Emile\_Schwarz](https://forum.xojo.com/u/Emile_Schwarz)\
**Post date:** [July 8, 2018, 1:18pm UTC](https://forum.xojo.com/t/ipaddress-and-ipname/44251/1 "2018-07-08T13:18:25Z")

</div>

In `AutoDiscovery1.MemberJoined`, I have:

`JoinUIP = System.Network.LookupIPAddress(ip)
JoinUN = System.Network.LookupDNSAddress(ip)`

but both returns an IP Address (the four values typical address like: `123.456.789.0` for example)

Since this appears on screen to choose the message person name to send the message, this is far from useful.

IDs ?

---

<div class="post-metadata">

**Author:** ![Greg\_O\_Lone](https://forum.xojo.com/user_avatar/forum.xojo.com/greg_o_lone/32/49_2.png) [@Greg\_O\_Lone](https://forum.xojo.com/u/Greg_O_Lone)\
**Post date:** [July 8, 2018, 1:23pm UTC](https://forum.xojo.com/t/ipaddress-and-ipname/44251/2 "2018-07-08T13:23:53Z")

</div>

If youre on a private network, LookupDNSAddress requires that you be running a local DNS server to give you a name. Otherwise it can only return what you put in.

---

<div class="post-metadata">

**Author:** ![Emile\_Schwarz](https://forum.xojo.com/letter_avatar_proxy/v4/letter/e/90ced4/32.png) [@Emile\_Schwarz](https://forum.xojo.com/u/Emile_Schwarz)\
**Post date:** [July 8, 2018, 1:33pm UTC](https://forum.xojo.com/t/ipaddress-and-ipname/44251/3 "2018-07-08T13:33:15Z")

</div>

Hi Greg,

No, I was on a public WiFi Hot Spot.

---

<div class="post-metadata">

**Author:** ![anon20074439](https://forum.xojo.com/letter_avatar_proxy/v4/letter/a/ac8455/32.png) [@anon20074439](https://forum.xojo.com/u/anon20074439)\
**Post date:** [July 8, 2018, 1:42pm UTC](https://forum.xojo.com/t/ipaddress-and-ipname/44251/4 "2018-07-08T13:42:31Z")

</div>

Even if its a public WiFi hot spot you’re still connecting to the private network provided by the public WiFi hot spot which probably wont have internal DNS names for its internal IPs.

You need to come up with an alternative method of resolving a username for example, the user enters a name when they start the app and this is transmitted on connection.

---

<div class="post-metadata">

**Author:** ![José\_María\_Terry\_Jiménez](https://forum.xojo.com/letter_avatar_proxy/v4/letter/j/fbc32d/32.png) [@José\_María\_Terry\_Jiménez](https://forum.xojo.com/u/Jos%C3%A9_Mar%C3%ADa_Terry_Jim%C3%A9nez)\
**Post date:** [July 8, 2018, 2:11pm UTC](https://forum.xojo.com/t/ipaddress-and-ipname/44251/5 "2018-07-08T14:11:20Z")

</div>

I run a local DNS address that resolve all local and Internet hosts and if i run the documentation example:

`Dim s As String
s = System.Network.LookupDNSAddress("178.73.17.204")
MsgBox(s)`

If i do:

```auto
s = System.Network.LookupDNSAddress("INTERNET_IP_ADDRESS_THAT_HAS_REVERSE_RESOLUTION")
```

Then i get the passed IP, not the hostname or reverse hostname

If i do:

```auto
s = System.Network.LookupDNSAddress("LOCAL_IP_ADDRESS_THAT_HAS_A_DNS_ENTRY_IN_DNS_SERVER")
```

Then i get the passed IP, not the hostname or reverse hostname

If i do:

```auto
s = System.Network.LookupDNSAddress("HOSTNAME")
```

Then i get the passed HOSTNAME, not the IP that that hostname resolves.

So it seems, yes there is some kind of problem as you always get the passed string.

I forgot, this is 2018r1.1 on macOS 10.13.5

---

<div class="post-metadata">

**Author:** ![Emile\_Schwarz](https://forum.xojo.com/letter_avatar_proxy/v4/letter/e/90ced4/32.png) [@Emile\_Schwarz](https://forum.xojo.com/u/Emile_Schwarz)\
**Post date:** [July 8, 2018, 3:48pm UTC](https://forum.xojo.com/t/ipaddress-and-ipname/44251/6 "2018-07-08T15:48:51Z")

</div>

Thanks all.

I will make more checkings tomorrow (probably, if I can).

The original project (.rb !) dates from 2005-10 (or 11, probably too). Unfortunately, I do not do screen shots then, and the Carbon application cannot be run (and I do not have an older enough computer to run Carbon).

I do not recall what I get - then - in the Listboxs list of registered users (on line users in that group), but who recalls an IP address is Joes Newbie IP Address (this seems logical to provide a name).

> [@395242:@](#):
>
> Even if its a public WiFi hot spot you’re still connecting to the private network provided by the public WiFi hot spot which probably wont have internal DNS names for its internal IPs.

I remember that I do not have to be registered in the Hot Spot to be able to communicate.  
Also, earlier today when I made my tests, I was not able to go to the Internet, but I saw the HotSpot name and connection window.

> [@395242:@](#):
>
> You need to come up with an alternative method of resolving a username for example, the user enters a name when they start the app and this is transmitted on connection.

Or checking the computer user name ? I forgot how, but I remember its possible to get that (someone shared that information years ago).

Ah, the ins and outs of the brain memory ! (and this goes wronger day after day,).

---

<div class="post-metadata">

**Author:** ![Emile\_Schwarz](https://forum.xojo.com/letter_avatar_proxy/v4/letter/e/90ced4/32.png) [@Emile\_Schwarz](https://forum.xojo.com/u/Emile_Schwarz)\
**Post date:** [July 9, 2018, 8:58am UTC](https://forum.xojo.com/t/ipaddress-and-ipname/44251/7 "2018-07-09T08:58:21Z")

</div>

New test. Mixed result:

At one location, I get the IP Address as User Name, at another, I get the machine name (DESKTOP-) on the Windows Machine.  
On El Capitan: IP Address only.

I am starting to think my EC machine is broken.

BTW: since I get home, yesterday, after testings, I do not have sounds anymore on the Windows machine. Nobeep, no Speak (in my example), no TV Sound ☹ Why Lord, why ?

---

<div class="post-metadata">

**Author:** ![Loannis\_Kolliageorgas](https://forum.xojo.com/letter_avatar_proxy/v4/letter/l/b2d939/32.png) [@Loannis\_Kolliageorgas](https://forum.xojo.com/u/Loannis_Kolliageorgas)\
**Post date:** [July 9, 2018, 9:05am UTC](https://forum.xojo.com/t/ipaddress-and-ipname/44251/8 "2018-07-09T09:05:54Z")

</div>

[quote=395334:@Emile Schwarz]New test. Mixed result:  
BTW: since I get home, yesterday, after testings, I do not have sounds anymore on the Windows machine. Nobeep, no Speak (in my example), no TV Sound ☹ Why Lord, why ?[/quote]  
Make a safe Boot and then reboot  
Then check for malware (malwarbytes is good)

---

<div class="post-metadata">

**Author:** ![Christian\_Schmitz](https://forum.xojo.com/user_avatar/forum.xojo.com/christian_schmitz/32/158_2.png) [@Christian\_Schmitz](https://forum.xojo.com/u/Christian_Schmitz)\
**Post date:** [July 9, 2018, 10:15am UTC](https://forum.xojo.com/t/ipaddress-and-ipname/44251/9 "2018-07-09T10:15:40Z")

</div>

If you need more functions, you can try our DNS Lookup class:

[http://www.monkeybreadsoftware.net/pluginpart-lookup.shtml](http://www.monkeybreadsoftware.net/pluginpart-lookup.shtml)

---

<div class="post-metadata">

**Author:** ![Lewis\_Poppelreiter](https://forum.xojo.com/letter_avatar_proxy/v4/letter/l/ea666f/32.png) [@Lewis\_Poppelreiter](https://forum.xojo.com/u/Lewis_Poppelreiter)\
**Post date:** [July 9, 2018, 10:36am UTC](https://forum.xojo.com/t/ipaddress-and-ipname/44251/10 "2018-07-09T10:36:28Z")

</div>

In my networking experience, anytime I do a DNS lookup using an IP address, it returns the Computer Name, never a User’s name. The Computer may have been named something like “JOE” or “SANDY”, to match the person’s name that is using it. There are ways to get the user’s name, but I am not aware of any using DNS to get it.

---

<div class="post-metadata">

**Author:** ![Emile\_Schwarz](https://forum.xojo.com/letter_avatar_proxy/v4/letter/e/90ced4/32.png) [@Emile\_Schwarz](https://forum.xojo.com/u/Emile_Schwarz)\
**Post date:** [July 12, 2018, 8:34am UTC](https://forum.xojo.com/t/ipaddress-and-ipname/44251/11 "2018-07-12T08:34:38Z")

</div>

All: Thank you for your answers.

Loanis: I will try.

---

<div class="post-metadata">

**Author:** ![Emile\_Schwarz](https://forum.xojo.com/letter_avatar_proxy/v4/letter/e/90ced4/32.png) [@Emile\_Schwarz](https://forum.xojo.com/u/Emile_Schwarz)\
**Post date:** [July 12, 2018, 1:46pm UTC](https://forum.xojo.com/t/ipaddress-and-ipname/44251/12 "2018-07-12T13:46:20Z")

</div>

I removed the screen part (tablet mode), toyed a bit / find nothing / re build the two-in-one laptop, reboot and I heard the boot sound ! Incredible

Launched the TV sofware sound is back !

I prepared some screen shots that displays “trouble”. I can trash them now.

---

<div class="post-metadata">

**Author:** ![system](https://forum.xojo.com/uploads/default/original/1X/455b4dcc0e61630e9f81940004ddffa49c432a46.png) [@system](https://forum.xojo.com/u/system)\
**Post date:** [October 29, 2020, 7:16pm UTC](https://forum.xojo.com/t/ipaddress-and-ipname/44251/13 "2020-10-29T19:16:37Z")

</div>


