none
USB Device Access RRS feed

  • Question

  • Hi.


     I want to develop an application to access my usb devices and manage those devices  from my application.

    For example . my device is  a USB mass storage device and i want to enumerate the particular device connected to my usb port and then write/send and read file .  

    And an another question is can i do this operations with out writing a separate client driver for the  device ?

    i would like to use the existing driver  installed for the device, can i?



     This is my very first question in msdn forum.  I hope  will get answer for my question

     


    Monday, May 27, 2013 9:39 AM

Answers

  • Take a look at SetupDiGetClassDevs this will allow you to enumerate the devices of a specific class.  Other calls will get you the device interface and enough detail to open it.  You will probably have to check that this mass storage device is connected by USB using IOCTL_STORAGE_QUERY_PROPERTY.

    You say "connected to my USB port" unless you are talking about a specific system you will not know how the port numbers compare to the physical locations on the machine (the hardware manufacturer controls this and some firms sell machines with the front port is X on one system and Y on the next).

    The above should get you going, you don't need a device driver.


    Don Burn Windows Filesystem and Driver Consulting Website: http://www.windrvr.com Blog: http://msmvps.com/blogs/WinDrvr

    Monday, May 27, 2013 11:39 AM

All replies

  • Take a look at SetupDiGetClassDevs this will allow you to enumerate the devices of a specific class.  Other calls will get you the device interface and enough detail to open it.  You will probably have to check that this mass storage device is connected by USB using IOCTL_STORAGE_QUERY_PROPERTY.

    You say "connected to my USB port" unless you are talking about a specific system you will not know how the port numbers compare to the physical locations on the machine (the hardware manufacturer controls this and some firms sell machines with the front port is X on one system and Y on the next).

    The above should get you going, you don't need a device driver.


    Don Burn Windows Filesystem and Driver Consulting Website: http://www.windrvr.com Blog: http://msmvps.com/blogs/WinDrvr

    Monday, May 27, 2013 11:39 AM
  • you can give a look to usbview sample of WDK.
    Monday, May 27, 2013 11:46 AM