Re: How to make link between USB physical port and drive letter mount by windows
- From: max_mont <maxime.montserret@xxxxxxxxx>
- Date: Mon, 16 Jun 2008 08:19:15 -0700 (PDT)
thanks you for your help.
Now, I'm managing to display all USB devices and when it's an USB key,
I display the letter of the driver assigned by Windows.
On 10 juin, 18:47, Uwe Sieber <m...@xxxxxxxxxxxxx> wrote:
All I've written is for user mode.
You get a parent device by CM_Get_Parent and the
driver key name by CM_Get_DevInst_Registry_Property
called with CM_DRP_DRIVER.
Using CM_xxx functions is not suggested by MS, but
they are so easy too use...
Uwe
max_mont wrote:
Thank you very much for your help. But I'm a newbie in driver
development (I usually develop in higer level).
I don't see how I can get parent device and get "driver key name).
Have you got a piece of code ?
Many thanks in advance again.
On 10 juin, 09:12, Uwe Sieber <m...@xxxxxxxxxxxxx> wrote:
max_mont wrote:
I would like to enumerate all USB storage plugged on a PC, identifyYou need an enumeration of all VOLUMES. Get their device
all by physical port and by drive letter.
I can enumerate all USB device with DDK sample (usbview) but I can't
manage to find drive letter for each storage.
numbers. The enumerate all DISKs, CDROMs and FLOPPYs. Match
them with the volumes by their device numbers. I've shown
this here:http://www.codeproject.com/system/RemoveDriveByLetter.asp
For each drive with BusType==BusTypeUsb get the parent
device of the DISK/CDROM/FLOPPY which is the USB device
itself. Get their "driver key name" (SPDRP_DRIVER / CM_DRP_DRIVER).
Match it with the driver key name of the USB devices found
thru the USB API (IOCTL_USB_GET_NODE_CONNECTION_DRIVERKEY_NAME).
Good luck :-)
Uwe
.
- References:
- How to make link between USB physical port and drive letter mount by windows
- From: max_mont
- Re: How to make link between USB physical port and drive letter mount by windows
- From: Uwe Sieber
- Re: How to make link between USB physical port and drive letter mount by windows
- From: max_mont
- Re: How to make link between USB physical port and drive letter mount by windows
- From: Uwe Sieber
- How to make link between USB physical port and drive letter mount by windows
- Prev by Date: Re: Another bug in the USB selective suapend system / documentation on XP
- Next by Date: Re: WDFQUEUE's REQUIRE DISPATCH_LEVEL operation on X64/AMD64 platf
- Previous by thread: Re: How to make link between USB physical port and drive letter mount by windows
- Next by thread: How do I use NdisMIndicateReceivePacket ?
- Index(es):
Relevant Pages
|