I am going through a Pluralsight course on Windows Services, and in the course, the instructor creates an instance of the FileSystemWatcher object. I am mostly following the course for now, but once I finish it, I have bigger dreams than taking someone else's code. I need something that will watch for external devices being connected and disconnected, via ports, Bluetooth, LAN, etc. Is there any object that will watch for external device connections, and notify me if there are any?
Asked
Active
Viewed 63 times
0
-
Possible duplicate of [Check for device change (add/remove) events](http://stackoverflow.com/questions/16245706/check-for-device-change-add-remove-events) – TnTinMn Jun 24 '16 at 21:33
-
There is in the Windows API, but no wrapper in the .NET Base Class Library. Various 3rd party libraries have such a thing, saving you the effort of p/invoking it yourself. Asking which ones is off-topic here. – Ben Voigt Jun 24 '16 at 21:33
-
I'm creating a service, so there's no window involved. – Nick Fulton Jun 24 '16 at 21:36