Using .Net (C#), how can you work with USB devices?
How can you detect USB events (connections/disconnections) and how do you communicate with devices (read/write).
Is there a native .Net solution to do this?
Using .Net (C#), how can you work with USB devices?
How can you detect USB events (connections/disconnections) and how do you communicate with devices (read/write).
Is there a native .Net solution to do this?
There is no native (e.g., System libraries) solution for this. That's the reason why SharpUSBLib exists as mentioned by moobaa.
If you wish to roll your own handler for USB devices, you can check out the SerialPort class of System.IO.Ports.
I've tried using SharpUSBLib and it screwed up my computer (needed a system restore). Happened to a friend of mine too.
I've found an alternative in LibUSBDotNet: http://sourceforge.net/projects/libusbdotnet Havn't used it much yet but seems good and recently updated (unlike Sharp).