Skip to content

Instantly share code, notes, and snippets.

@kennykerr
Created October 24, 2016 18:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kennykerr/22eab94df12ef3a3169932f5f6b790f9 to your computer and use it in GitHub Desktop.
Save kennykerr/22eab94df12ef3a3169932f5f6b790f9 to your computer and use it in GitHub Desktop.
#pragma comment(lib, "windowsapp")
#include "winrt/Windows.Networking.Connectivity.h"
using namespace winrt;
using namespace Windows::Networking;
using namespace Windows::Networking::Connectivity;
int main()
{
initialize();
for (HostName const & name : NetworkInformation::GetHostNames())
{
printf("%ls\n", name.ToString().c_str());
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment