I need to discover and know the scsi disk enclosure port/bus/target/LUN
numbers. I read some MSDN sample and learn how to enumerate them and can find
the disk enclosures attached to my Windows 2003 x64 server. And I use the
CM_Get_DevNode_Registry_Property to get the bus/target/LUN of the enclosure,
but I could not get the scsi port number. And MSDN mentioned "Do not use..."
the CM_ function I used and suggest to use SetupDixxx instead. But they
require different input parameters: CM_xxx use "handle of device instance"
while SetupDixxx use "handle of device infoset" and "device info data" I
think. May someone hint me how to get the parameters used in SetupDixxx from
the CM_xx device instance handle? Also how to get the scsi port number please?
Thanks,
Ken
> May someone hint me how to get the parameters used in SetupDixxx from
> the CM_xx device instance handle?
Perhaps you could use CM_Get_Device_ID, then SetupDiOpenDeviceInfo.
SP_DEVINFO_DATA::DevInst is for the opposite direction.
Thanks, it works. May I ask for how to get the scsi port number for the disk
enclosure? I can get the bus/target/lun now, I need the scsi port# also.
Ken
I found used the same function call with SPDRP_PHYSICAL_DEVICE_OBJECT_NAME
property can get all of them.
Ken
Ken