本文实例讲述了C#获取USB事件API。分享给大家供大家参考。具体如下: const int WM_DEVICECHANGE = 0x2190; const int DBT_DEVICEARRIVAL = 0x8000; const int DBT_DEVICEREMOVECOMPLETE = 0x8004; protected override void WndProc(ref Message m) { try { //if (m.Msg == WM_DEVICECHANGE) //{ switch (m.WParam.ToInt32()) { case D