Exemple #1
0
 protected override void OnStop()
 {
     DeviceNotification.Unregister(_notificationHandle);
     _notificationHandle = IntPtr.Zero;
 }
Exemple #2
0
 protected override void OnStart(string[] args)
 {
     DeviceNotification.Unregister(_notificationHandle);
     _notificationHandle = DeviceNotification.Register(this.ServiceHandle, GUID_DEVINTERFACE_USB_DEVICE);
 }