1. kingmiddle's Avatar
    Hello people from wpcentral. Anyone know if it can recover the ( hostname/machine name ) with a local IP address ? I know that the resolution reverse 'hostname -> ip' works perfectly with `DeviceNetworkInformation.ResolveHostNameAsync (endpoint, OnNameResolved, null).`
    Is it possible to do the same thing but in reverse? Given the IP of a Local Machine and retrieve its hostname? A thousand thanks
    **Here is my code** , but it's doesn't work the host is always called **"192.168.1.5"** like the ip . And it's should return **"computer0001"**
    [CODE] DeviceNetworkInformation.ResolveHostNameAsync("192.168.1.5", OnNameResolved, null);

    private void OnNameResolved(NameResolutionResult result)
    {
    IPEndPoint[] endpoints = result.IPEndPoints;
    if (endpoints != null)
    {
    if (endpoints.Length > 0)
    {
    //Host always return ip adress and not the machine name
    host = endpoints[0].ToString();
    }
    }
    }
    [/CODE]
    11-08-2013 04:04 AM

Similar Threads

  1. Replies: 395
    Last Post: 03-24-2015, 05:55 AM
  2. Preorders up on ATT website!
    By jbyron in forum Nokia Lumia 1520
    Replies: 29
    Last Post: 11-13-2013, 05:55 AM
  3. My phones battery lasts for 3 hours only. How to improve it?
    By Abhishek Pradhan in forum Nokia Lumia 620
    Replies: 43
    Last Post: 11-12-2013, 08:18 PM
  4. Keep WifI connected when phone is locked?
    By billybrown in forum Windows Phone 7
    Replies: 1
    Last Post: 11-08-2013, 03:50 AM
LINK TO POST COPIED TO CLIPBOARD