Author Topic: Detect USB Insert / Remove  (Read 1273 times)

moelski

  • Full Member
  • ***
  • Posts: 122
    • View Profile
Detect USB Insert / Remove
« on: December 30, 2011, 04:57:31 pm »
Hi Roman,

I need to detect if a USB device (mostly a USB-Serial Port) is inserted into an USB port or removed.

Can I use any events from nrUSB to archive this?

I need the friendly name and the type (mass storage, usb/serial Converter, ...) of the USB device.

Any suggestions ?

Greetz
   Dominik

Roman Novgorodov

  • Engineer
  • Administrator
  • Hero Member
  • *****
  • Posts: 994
  • we will win
    • View Profile
    • Forums.nrCommLib.Com
Re: Detect USB Insert / Remove
« Reply #1 on: April 05, 2012, 07:56:20 am »
Hello

It seems like our email notifier about board missed this message. I'm sorry.

We recommend to use WM_DEVICE_CHANGE system message for intercept changing of hardware configuration. After that you call Update() method for reload device list of target component (NrHID, NrComm NrUsb)

We will check how it can be done on .NET platform.
It should be easy but I can not show you exact sample of c# code now :-(

Roman Novgorodov
DeepSoftware LLC
DeepSoftware llc - The professional components for Delphi/CBuilder/.NET. The high quality custom software development.
Forums.nrCommLib.Com - DeepSoftware Tech Support Forum.