Microsoft KB Archive/182148

{|
 * width="100%"|

SAMPLE: GetAddr.exe Demonstrates IOCTL_SCSI_GET_ADDRESS

 * }

Q182148

-

The information in this article applies to:


 * Microsoft Win32 Device Driver Kit (DDK) for Windows NT, versions 3.51, 4.0

-

SUMMARY
GetAddr.exe is a sample Win32 console-mode application that demonstrates IOCTL_SCSI_GET_ADDRESS functionality.

MORE INFORMATION
The following file is available for download from the Microsoft Download Center:

"GetAddr.exe" For additional information about how to download Microsoft Support files, click the article number below to view the article in the Microsoft Knowledge Base:

"Q119591 How to Obtain Microsoft Support Files from Online Services" Microsoft used the most current virus detection software available on the date of posting to scan this file for viruses. Once posted, the file is housed on secure servers that prevent any unauthorized changes to the file.

This is a sample Win32 console mode application that demonstrates how to retrieve the SCSI address information (ScsiPort number, Path ID, Target ID, and LUN) for the specified device. You etrieve this information by calling DeviceIoControl with the IoControlCode parameter set to IOCTL_SCSI_GET_ADDRESS. See the sample for specific parameter issues.

To run the GetAddr.exe:


 * 1) Build the Win32 application. See the DDK documentation for details on creating Win32 applications from the DDK Build Environment.
 * 2) Copy the executable to a location that is in your path.

When building in the Free Build Environment, the executable is created in \ddk\lib\i386\free.

When building in the Checked Build Environment, the executable is created in \ddk\lib\i386\checked.
 * 1) From a command prompt, type "gettaddr X:", where X: is the SCSI device with the SCSI address information you want to display.

Additional query words:

Keywords : kbfile kbsample

Issue type :

Technology : kbAudDeveloper kbWinDDKSearch kbWin32sSearch kbWin32DDKSearch kbWin32DDKNT351 kbWin32DDKNT400 kbWin32DDKNTSearch