You’re right of course, Doron, I did not describe the details of my
workaround or why I have to use it. I can briefly say that it is
related to my application streaming audio to my device in time of heavy
load, and how I recover the streaming process at such time. I would
honestly like to not have to resort to such workarounds, but for the
moment I need to investigate this possibility.
If possible could you please confirm if the DeviceAddress obtained from
IoGetDeviceProperty is unique across the bus? If so I think I can use
this to my advantage with my second solution.
-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Doron Holan
Sent: Friday, May 01, 2009 2:11 PM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] How to see if my USB composite device is on the
root USB hub or not
I don’t know offhand (i.e. I am not withholding the answer unless you
give a good reason J)
d
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Philip Lukidis
Sent: Friday, May 01, 2009 10:59 AM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] How to see if my USB composite device is on the
root USB hub or not
Hello Doron,
Honestly I would rather not care to which hub I am attached, but at this
stage it’s a matter of performance tuning for both cases. I can’t say
more, except that it’s a workaround for cases of heavy load in my
application/kernel combination. Is there a way to accomplish this?
-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Doron Holan
Sent: Friday, May 01, 2009 1:51 PM
To: Windows System Software Devs Interest List
Subject: RE:[ntdev] How to see if my USB composite device is on the root
USB hub or not
Just curious. Why do you need to know that are you are attached to the
root hub?
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Philip Lukidis
Sent: Friday, May 01, 2009 10:48 AM
To: Windows System Software Devs Interest List
Subject: [ntdev] How to see if my USB composite device is on the root
USB hub or not
Hello.
I need to know if my USB (composite) device is connected to the root hub
or to a more downstream hub. Now, I did look at this thread:
http://www.osronline.com/showThread.cfm?link=105655
The IOCTL IOCTL_INTERNAL_USB_GET_HUB_COUNT works great on Vista, but not
on XP. Moreover, it is not documented on Vista, so if I can avoid it so
much the better. There are two broad choices for fulfilling this
requirement:
a) Accomplish the task in kernel mode. Is this possible? Does anyone
have any suggestions? Based on on reading online, perhaps using
IOCTL_INTERNAL_USB_GET_HUB_NAME, following by getting the device object,
then acquiring the PDO, and then examining its properties, perhaps I
could establish if the hub is a root hub or not. However, I could not
get IOCTL_INTERNAL_USB_GET_HUB_NAME to work. Has anyone ever got this
to work, especially on XP?
b) Accomplish the task in user mode. The source to usbview can
enumerate the entire tree, but what if I have multiple devices
connected? Could I use the DeviceAddress member of
USB_NODE_CONNECTION_INFORMATION to compare with the
DevicePropertyAddress property obtained via IoGetDeviceProperty in
kernel mode? And is this address unique on the entire topology (if it
is the real USB address then yes)? This is because my user mode
application can talk to multiple devices, and for each device it needs
to make the determination if the device is on a root hub or not.
Any comments are of course welcome.
thank you,
Philip Lukidis
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.osronline.com/page.cfm?name=ListServer
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.osronline.com/page.cfm?name=ListServer
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.osronline.com/page.cfm?name=ListServer
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.osronline.com/page.cfm?name=ListServer