Click here to Skip to main content
15,911,531 members
Home / Discussions / Hardware & Devices
   

Hardware & Devices

 
AnswerRe: How to find a legal online movies site Pin
Dave Kreskowiak14-Sep-08 4:37
mveDave Kreskowiak14-Sep-08 4:37 
QuestionHow to find a legal internet tv program Pin
Harshit Agrawal13-Sep-08 22:11
Harshit Agrawal13-Sep-08 22:11 
AnswerRe: How to find a legal internet tv program Pin
Dave Kreskowiak14-Sep-08 4:36
mveDave Kreskowiak14-Sep-08 4:36 
QuestionDead DVD Drive [modified] Pin
Leslie Sanford13-Sep-08 20:01
Leslie Sanford13-Sep-08 20:01 
AnswerRe: Dead DVD Drive Pin
Dave Kreskowiak14-Sep-08 4:35
mveDave Kreskowiak14-Sep-08 4:35 
GeneralRe: Dead DVD Drive Pin
Leslie Sanford14-Sep-08 5:20
Leslie Sanford14-Sep-08 5:20 
AnswerGot it working. Pin
Leslie Sanford14-Sep-08 6:28
Leslie Sanford14-Sep-08 6:28 
QuestionSetupDiGetDeviceRegistryProperty(..SDRP_ADDRESS...) gets USB hub port? Pin
Roger Stoltz12-Sep-08 3:18
Roger Stoltz12-Sep-08 3:18 
I've spent more than a week on a problem with getting the serial number string descriptor from a USB device that uses USBSER as driver.
The USBSER driver doesn't seem to support any kind of functionality for getting the serial number directly and in some cases the device is a composite device which adds to the problem.
So I've tried another way...

I get the symbolic link for my device either through WM_DEVICECHANGE or by enumeration with the Setup API. I enumerate the USB device tree and get hold of the parent hub on which my device is connected and then ask the hub for the string descriptor.

So far so good, but...

There are two scenarios where I'm afraid this may fail:
1. If a hub with multiple devices attached is inserted, the order of device notifications may not be in "port" order although it seems that way
2. When enumerating devices at application start the enumeration order may not be in "port" order

When I iterate through the ports of the parent hub and I find a new device I assume it is the one I got the notification for, but this method fails under the circumstances mentioned above.
Mapping the original symbolic link for my device to a specific port number in the parent hub would solve my problem.

I think I have found a solution for this, but I cannot find any information that verifies this as a reliable method even though I've google'ed like insane.
I use SetupDiGetDeviceRegistryProperty() and get the "address". The address seems to correspond to the port number of the parent hub.
I've tried this on my machine (XP SP3) and it works all right, even if I move things around, add hubs in between and so on.

Can anyone verify this as reliable or unreliable, or point me toward some Microsoft-ish information about using SDRP_ADDRESS on USB devices?
Is it an undocumented feature or pure coincidence?

Thanks
--
Rog


"It's supposed to be hard, otherwise anybody could do it!" - selfquote
"High speed never compensates for wrong direction!" - unknown


AnswerRe: SetupDiGetDeviceRegistryProperty(..SDRP_ADDRESS...) gets USB hub port? Pin
User 171649212-Sep-08 4:56
professionalUser 171649212-Sep-08 4:56 
GeneralRe: SetupDiGetDeviceRegistryProperty(..SDRP_ADDRESS...) gets USB hub port? Pin
Roger Stoltz12-Sep-08 5:32
Roger Stoltz12-Sep-08 5:32 
QuestionDevice Power Management Pin
Ben Burnett10-Sep-08 5:07
Ben Burnett10-Sep-08 5:07 
AnswerRe: Device Power Management Pin
fat_boy12-Sep-08 1:19
fat_boy12-Sep-08 1:19 
GeneralRe: Device Power Management [modified] Pin
Ben Burnett15-Sep-08 4:31
Ben Burnett15-Sep-08 4:31 
GeneralRe: Device Power Management Pin
fat_boy15-Sep-08 4:34
fat_boy15-Sep-08 4:34 
GeneralRe: Device Power Management Pin
Ben Burnett15-Sep-08 4:55
Ben Burnett15-Sep-08 4:55 
GeneralRe: Device Power Management Pin
fat_boy15-Sep-08 5:00
fat_boy15-Sep-08 5:00 
GeneralRe: Device Power Management Pin
Ben Burnett15-Sep-08 6:07
Ben Burnett15-Sep-08 6:07 
GeneralRe: Device Power Management Pin
Dan Neely15-Sep-08 7:06
Dan Neely15-Sep-08 7:06 
JokeRe: Device Power Management Pin
Ben Burnett15-Sep-08 8:16
Ben Burnett15-Sep-08 8:16 
GeneralRe: Device Power Management Pin
Dan Neely15-Sep-08 8:50
Dan Neely15-Sep-08 8:50 
GeneralRe: Device Power Management Pin
fat_boy15-Sep-08 21:42
fat_boy15-Sep-08 21:42 
GeneralRe: Device Power Management Pin
fat_boy15-Sep-08 21:37
fat_boy15-Sep-08 21:37 
JokeRe: Device Power Management Pin
Ben Burnett16-Sep-08 7:18
Ben Burnett16-Sep-08 7:18 
QuestionnVidia 8800 Driver issue Pin
Sarath C8-Sep-08 7:11
Sarath C8-Sep-08 7:11 
AnswerRe: nVidia 8800 Driver issue Pin
Sarath C9-Sep-08 8:58
Sarath C9-Sep-08 8:58 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.