Tech Support > Microsoft Windows > Drivers > SetupDI - How do I find what port a scsi device is sitting on?
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: