Driver Problems? Questions? Issues?
Put OSR's experience to work for you! Contact us for assistance with:
  • Creating the right design for your requirements
  • Reviewing your existing driver code
  • Analyzing driver reliability/performance issues
  • Custom training mixed with consulting and focused directly on your specific areas of interest/concern.
Check us out. OSR, the Windows driver experts.

Upcoming OSR Seminars:

Writing WDF Drivers I: Core Concepts, Nashua, NH 30 January-3 February, 2017
Kernel Debugging and Crash Analysis, Nashua, NH 20-24 February, 2017
Windows Internals & Software Driver Development, Dulles, VA 27-31 March, 2017
Writing WDF Drivers II: Advanced Implementation Tech., Nashua, NH 23-26 May, 2017
Kernel Debugging and Crash Analysis, Dulles, VA 26-30 June, 2017
Windows Internals & Software Driver Development, Nashua, NH 24-28 July, 2017


Go Back   OSR Online Lists > ntdev
Welcome, Guest
You must login to post to this list
  Message 1 of 3  
24 Jun 11 21:46
Disney C
xxxxxx@qq.com
Join Date: 14 Dec 2010
Posts To This List: 42
How to get USB device descriptor in user mode conveniently

I want to get the device descriptor of a USB device in user mode. And I read the usbview sample in WDK. It use the device IOCTL with IOCTL_USB_GET_NODE_CONNECTION_INFORMATION to the hub port to get the descriptor of the corresponding USB device. Is there another way to do this conveniently? I don't want to get the hub information, and I've already get the SP_DEVINFO_DATA struct and the file handle of the device, can I use these to get the device descriptor?
  Message 2 of 3  
24 Jun 11 22:02
Doron Holan
xxxxxx@microsoft.com
Join Date: 08 Sep 2005
Posts To This List: 9919
How to get USB device descriptor in user mode conveniently

What USBview shows you is the way you need to do it. Each usb enumerated dr= iver does not expose usb details at its file io interface. If you have the = SP_DEVINFO_DATA struct, use the devinst in the struct and call cm_get_paren= t to get the hub's devinst and from there open a handle to the hub and send= the ioctl. d debt from my phone -----Original Message----- From: xxxxx@qq.com Sent: Friday, June 24, 2011 6:46 PM To: Windows System Software Devs Interest List Subject: [ntdev] How to get USB device descriptor in user mode conveniently I want to get the device descriptor of a USB device in user mode. And I rea= d the usbview sample in WDK. It use the device IOCTL with IOCTL_USB_GET_NOD= E_CONNECTION_INFORMATION to the hub port to get the descriptor of the corre= sponding USB device. Is there another way to do this conveniently? I don't = want to get the hub information, and I've already get the SP_DEVINFO_DATA s= truct and the file handle of the device, can I use these to get the device = descriptor? --- NTDEV is sponsored by OSR For our schedule of WDF, WDM, debugging and other seminars visit: http://www.osr.com/seminars To unsubscribe, visit the List Server section of OSR Online at http://www.o= sronline.com/page.cfm?name=3DListServer
  Message 3 of 3  
27 Jun 11 01:41
ntdev member 39603
xxxxxx@gmail.com
Join Date:
Posts To This List: 105
How to get USB device descriptor in user mode conveniently

Two ways to get the USB device descriptor: 1st is that you should be in kernel, and has get the specified USB device's pdo, and then send a urb_get_device_descriptor request. 2nd, send ioctl to usbd driver in either kernel or user mode. ---------------------------- Best regards! Moore Zhang 2011/6/25 Doron Holan <xxxxx@microsoft.com> > What USBview shows you is the way you need to do it. Each usb enumerated > driver does not expose usb details at its file io interface. If you have the > SP_DEVINFO_DATA struct, use the devinst in the struct and call cm_get_parent > to get the hub's devinst and from there open a handle to the hub and send > the ioctl. > > d > > debt from my phone > <...excess quoted lines suppressed...> -- ================================= Best Regards! Moore.Zhang (Zhang Pei) --
Posting Rules  
You may not post new threads
You may not post replies
You may not post attachments
You must login to OSR Online AND be a member of the ntdev list to be able to post.

All times are GMT -5. The time now is 18:59.


Copyright ©2015, OSR Open Systems Resources, Inc.
Based on vBulletin Copyright ©2000 - 2005, Jelsoft Enterprises Ltd.
Modified under license