Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

do not use CM_xxx function call

3 views
Skip to first unread message

KenH

unread,
Mar 27, 2008, 4:16:05 PM3/27/08
to
Hi,

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

Kalle Olavi Niemitalo

unread,
Mar 27, 2008, 5:08:35 PM3/27/08
to
KenH <KenH...@newsgroup.nospam> writes:

> 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.

KenH

unread,
Mar 28, 2008, 12:53:00 AM3/28/08
to
Kalle,

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

KenH

unread,
Apr 1, 2008, 2:04:01 PM4/1/08
to
Hi,

I found used the same function call with SPDRP_PHYSICAL_DEVICE_OBJECT_NAME
property can get all of them.

Ken

KenH

unread,
Apr 5, 2008, 11:40:01 AM4/5/08
to
No, I take it back. Yesterday I installed another HBA and the
SPDRP_PHYSICAL_DEVICE_OBJECT_NAME did not show SCSI port address at all. It's
in \Device\xxxx format. So I still don't know how to get the SCSI port
address of a enclosure.

Ken

0 new messages