Closed Thread
Results 1 to 7 of 7

Thread: Is it possible to detect an usb device when the device is plugged in??

  1. #1
    yonghan is offline Learning Programmer
    Join Date
    May 2008
    Posts
    99
    Rep Power
    0

    Is it possible to detect an usb device when the device is plugged in??

    I want to ask,is it possible to detect a device that are connected to the usb port?And directly link to the software that we've made?Thanks a lot

  2. CODECALL Circuit advertisement
    Join Date
    Always
    Posts
    Many

     
  3. #2
    excavator is offline Newbie
    Join Date
    Apr 2008
    Location
    behind my desk
    Posts
    16
    Rep Power
    14

    Re: Is it possible to detect an usb device when the device is plugged in??

    it is possible. try using Win32_ControllerDevice, Win32_USBHub, Win32_Controller class from WMI Classes. there may be other alternatives that more suitable for your app, but you need to be more specific (eg: is the device a storage device? or custom made hardware, etc). HTH

  4. #3
    yonghan is offline Learning Programmer
    Join Date
    May 2008
    Posts
    99
    Rep Power
    0

    Re: Is it possible to detect an usb device when the device is plugged in??

    To read a pole display/customer display so the application i made can directly connect with it..Thanks a lot.

  5. #4
    Join Date
    Mar 2008
    Location
    The North Pole
    Posts
    13,174
    Blog Entries
    13
    Rep Power
    114

    Re: Is it possible to detect an usb device when the device is plugged in??

    In a few cases the hardware came with software, which in turn may have an API for you to automate.

    Quote Originally Posted by Jordan View Post
    Good members, like yourself, stick around and post for ages to come!
    Mr. Xav | Blog | Forums

  6. #5
    excavator is offline Newbie
    Join Date
    Apr 2008
    Location
    behind my desk
    Posts
    16
    Rep Power
    14

    Re: Is it possible to detect an usb device when the device is plugged in??

    Other alternatives are,you could check if the usb device is emulating serial port / network. if it is emulating serial port then you can use System.IO.Ports.SerialPort class. if the device capable of TCP/IP communication then you can use System.Net.Sockets.Socket class. other than that you can use Windows API.

    Most customer display device i know emulate serial port (COM5/COM6) perhaps yours too.

  7. #6
    Join Date
    Mar 2008
    Location
    The North Pole
    Posts
    13,174
    Blog Entries
    13
    Rep Power
    114

    Re: Is it possible to detect an usb device when the device is plugged in??

    Check the software that came with the device, or try the website. When you install the software, sometimes it installs the API with it.

    Quote Originally Posted by Jordan View Post
    Good members, like yourself, stick around and post for ages to come!
    Mr. Xav | Blog | Forums

  8. #7
    avosoft's Avatar
    avosoft is offline Learning Programmer
    Join Date
    Apr 2010
    Location
    ....
    Posts
    47
    Blog Entries
    2
    Rep Power
    0

    Re: Is it possible to detect an usb device when the device is plugged in??

    Add the Microsoft SysInfo Control to your toolbox and place the control on your form.

    The control fires its DeviceArrival event when a new device is attached to the computer. For example a CDROM or a USB device.
    Programming is all about good logic. Spend more time here

    vHost for Apache

Closed Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Linux does not detect my USB device
    By BigLinux in forum Linux Hardware
    Replies: 4
    Last Post: 08-23-2010, 10:35 PM
  2. Detect when a USB or W32disk is plugged in!
    By Sharper_Software in forum Visual Basic Tutorials
    Replies: 2
    Last Post: 03-17-2010, 12:40 AM
  3. RAW device
    By admin1980 in forum C and C++
    Replies: 1
    Last Post: 01-20-2010, 03:07 PM
  4. Getting Device and Vendor Id
    By cooldued17 in forum C and C++
    Replies: 1
    Last Post: 08-23-2008, 07:25 AM
  5. How to get device instance id using VB6
    By LeoZao in forum Visual Basic Programming
    Replies: 1
    Last Post: 05-02-2008, 09:55 AM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts