摘要:
近期在做USB Key插入和移除监控,已经做到了插入和移除USB Key时,程序能够及时感应到。如下为源代码: private void Form1_Load(object sender, EventArgs e) { //创建查询条件,监控USB Key插入和拔出 string condintion = "TargetInstance ISA 'Win32_USBControllerdevice'"; var qCreate = new WqlEventQuery("__InstanceCreationEvent... 阅读全文