- SetupDI - How do I find what port a scsi device is sitting on?
- Posted by ranjit on January 18th, 2006
Using SetupDiGetDeviceRegistryProperty with SPDRP_LOCATION_INFORMATION
I get -
"Bus Number 0, Target ID 5, LUN 0"
however how do I find the Port (Hba) this device is sitting on?
(The same device in registry appears under HKEY_LOCAL_MACHINE ->
DEVICEMAP -> Scsi -> Scsi Port 5 -> Scsi Bus 0 -> Target Id 5 -> Logical
Unit Id 0)
So I want to find -
"Port 5, Bus Number 0, Target ID 5, LUN 0" instead of just the "Bus Number
0, Target ID 5, LUN 0".
How do I do this using SetupDI api? or do I need to do something more?
Thanks,
- Posted by Maxim S. Shatskih on January 19th, 2006
Try IOCTL_SCSI_GET_ADDRESS
--
Maxim Shatskih, Windows DDK MVP
StorageCraft Corporation
maxim@storagecraft.com
http://www.storagecraft.com
"ranjit" <ranjit@discussions.microsoft.com> wrote in message
news:A33A9483-6DE8-41FE-BE57-54257E0076D5@microsoft.com...
- Posted by ranjit on January 19th, 2006
This works except that scsi medium changers, and usb tape drives seem to
have problems. Do you have any suggestions how I could tackle them as well.
Thanks,
"Maxim S. Shatskih" wrote:
- Posted by ranjit on January 19th, 2006
Actually pls. ignore usb. Only I am wondering how to tackle the medium
changers.
"ranjit" wrote:
- Getting Serial Port Resources using SetupDi or CM_ Calls (Drivers) by winddklearner
- iscsi setupdi - how do I get port number? (Drivers) by ranjit
- Single Port SCSI Card vs Dual Port SCSI Card (Computer Hardware) by John Smith
- how to find out which USB port my device is attached to? (Drivers) by JC
- Re: SCSI Miniport driver to emulate a SCSI device (Drivers) by David J. Craig

