How are you going to use the vid/pid as an ID? Is this id something you are going to store somewhere (disk, registry, etc)? Or just internal bookkeeping? Or as an id to some app to give a disk and identity? What happens if 2 instances of a device with the same vid/pid are plugged in at the same time?
Basically the vid/pid is not a unique id in and of itself. If you tell us how you are going to use the id, i think there will be much simpler solutions for your problem.
d
Sent from my phone with no t9, all spilling mistakes are not intentional.
From: Michael Zhu
Sent: Wednesday, August 26, 2009 10:59 AM
To: Windows System Software Devs Interest List
Subject: Re: [ntdev] 2 questions about usbhub.sys and usbstor.sys
I do want to filter all usb mass storage devices. And I just want to use the vid/pid to uniquely identify the device.
On Wed, Aug 26, 2009 at 12:48 PM, Doron Holan > wrote:
Open the usbstor fdo properties in device manager. The details tab will include all of the compat and hw ids as well as the matched id. Why would you filter all usb mass storage devices vs the few vid/pids (you can specify more than one match in your inf btw) inparticular?
d
Sent from my phone with no t9, all spilling mistakes are not intentional.
From: Michael Zhu >
Sent: Wednesday, August 26, 2009 8:33 AM
To: Windows System Software Devs Interest List >
Subject: Re: [ntdev] 2 questions about usbhub.sys and usbstor.sys
Where I can find that compat id? And how I can match that compat id in my inf file? Thanks.
On Wed, Aug 26, 2009 at 10:57 AM, Doron Holan > wrote:
They al have the same compat id which is what usbstor matches on. You were saying that you wanted to do something specific for a vid/pid. Match against the hwid which contains the vid/pid
d
Sent from my phone with no t9, all spilling mistakes are not intentional.
From: Michael Zhu >
Sent: Wednesday, August 26, 2009 7:51 AM
To: Windows System Software Devs Interest List >
Subject: Re: [ntdev] 2 questions about usbhub.sys and usbstor.sys
Thanks Doron. So I need to use an INF file to register lower filter to usbstor. But how to match on hwid? Different USB storage deivce has different hwid, right? If I plug in a USB flash drive, how the system can add a lower filter to usbstor for this flash drive?
Appreciate your help.
On Wed, Aug 26, 2009 at 10:15 AM, Doron Holan > wrote:
Use and inf and match on hwid and yes, it should be a device lower filter, not a class lower filter
d
Sent from my phone with no t9, all spilling mistakes are not intentional.
________________________________
From: Michael Zhu >
Sent: Wednesday, August 26, 2009 6:46 AM
To: Windows System Software Devs Interest List >
Subject: Re: [ntdev] 2 questions about usbhub.sys and usbstor.sys
One more question. What is the best way to add a lower filter to usbstor? I’ve searched for a while. But couldn’t figure it out. And this filter should be device lower filter?
On Tue, Aug 25, 2009 at 12:19 PM, Tim Roberts > wrote:
Michael Zhu wrote:
> Thanks Doron. I don’t need to match the vid&pid. I just want to use
> the vid&pid to identify different USB storage devices.
>
> Even I add a lower filter to usbstor and get the vid&pid I still don’t
> know this vid&pid is for which USB storage disk in my disk class upper
> filter. I have to find some other ways to accomplish this.
You don’t seem to be thinking outside the box very much. Once you have
a lower filter to usbstor that has the VID & PID, you can have your disk
class upper filter send an IRP_MN_QUERY_INTERFACE down the stack, and
return a set of function pointers. Now your disk upper filter can call
directly into your usbstor lower filter to exchange whatever information
they need to exchange.
The contract for IRP_MN_QUERY_INTERFACE is that all drivers should pass
it along until someone recognizes the GUID.
–
Tim Roberts, xxxxx@probo.commailto:xxxxx
Providenza & Boekelheide, Inc.
—
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
—
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</mailto:xxxxx>