Last active
August 29, 2015 14:18
-
-
Save kennykerr/fe31d32c150aa2457ed5 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include "pch.h" | |
#include <conio.h> | |
using namespace Modern; | |
using namespace Windows::Devices::Enumeration; | |
int main() | |
{ | |
Initialize(); | |
DeviceWatcher watcher = DeviceInformation::CreateWatcher(); | |
watcher.Added([](DeviceWatcher const &, DeviceInformation const & info) | |
{ | |
printf("%ls\n", info.Name().Buffer()); | |
}); | |
watcher.EnumerationCompleted([](DeviceWatcher const &, auto const &) | |
{ | |
printf("Done!\n"); | |
}); | |
watcher.Start(); | |
_getch(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment