Why do you care that it’s port 5 vs. port 4? Obviously you want to
uniquely identify which controller it is, but the port number isn’t the
way to do that as the port number can change across boots.
You can find all the storage port devices using SetupDi to find all
instances of the device interface GUID_DEVINTERFACE_STORAGEPORT (this
will show all port drivers, scsi or not) and query each for the
information. You can reuse the name that SetupDi gives you for the
device interface across reboots to uniquely identify that device (as
long as it isn’t moved - PCI devices don’t have unique IDs that would
allow the system to track devices moving slots).
So what are you actually trying to do?
-p
-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Peter Trinh
Sent: Thursday, April 08, 2004 9:36 AM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] How to get PCI Bus# user mode
Robin,
Thanks for the suggestion.
But how do I tell SetupDixxx that this is Scsi Port 5, for example, that
I am looking for? Could you elaborate?
Thanks
-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com]On Behalf Of
xxxxx@exgate.tek.com
Sent: Thursday, April 08, 2004 9:04 AM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] How to get PCI Bus# user mode
use SPDRP_LOCATION_INFORMATION like this:
TCHAR fname[256];
SetupDiGetDeviceRegistryProperty(info, &did,
SPDRP_LOCATION_INFORMATION, NULL, (PBYTE) fname, sizeof(fname), NULL))
where did is SP_DEVINFO_DATA (from SetupDiGetDeviceInterfaceDetail(…)
and info is HDEVINFO info (from SetupDiGetClassDevs(…)
Robin
-----Original Message-----
From: Peter Trinh [mailto:xxxxx@verizon.net]
Sent: Donnerstag, 8. April 2004 17:42
To: Windows System Software Devs Interest List
Subject: [ntdev] How to get PCI Bus# user mode
Hi all,
Is there a way to map a PCI-based SCSI Port to its associating PCI Bus
location from user mode?
For example, in
HKEY_LOCAL_MACHINE\HARDWARE\DEVICEMAP\Scsi\Scsi Port 5 (Emulex LP8000
card, driver: elxstor.sys) , I want to know the PCI Bus location of
the adapter/controller, like “PCI Bus 3, Device 7, Function 0”
I am familiar with SetupDixxx and the SCSI setup class GUID.
Thanks in advance
PT
Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256
You are currently subscribed to ntdev as: xxxxx@exgate.tek.com
To unsubscribe send a blank email to xxxxx@lists.osr.com
Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256
You are currently subscribed to ntdev as: xxxxx@verizon.net To
unsubscribe send a blank email to xxxxx@lists.osr.com
Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256
You are currently subscribed to ntdev as: xxxxx@windows.microsoft.com
To unsubscribe send a blank email to xxxxx@lists.osr.com