Getting the Name of your Windows Phone 8 device

You can name your phone to whatever you like, but how can an app display that name? There isn’t an obvious API for this, but I accidentally discovered an un-obvious API. The quick version is that you can ask getaddrinfo for the canonical network name. Too quick? OK, here is some C++/CX code to show…

1