SAMPLE: GetAddr.exe Demonstrates IOCTL_SCSI_GET_ADDRESS (182148)



The information in this article applies to:

  • Microsoft Win32 Device Driver Kit (DDK) for Windows NT 4.0
  • Microsoft Win32 Device Driver Kit (DDK) for Windows NT 3.51

This article was previously published under Q182148

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:
For additional information about how to download Microsoft Support files, click the following article number to view the article in the Microsoft Knowledge Base:

119591 How to Obtain Microsoft Support Files from Online Services

Microsoft scanned this file for viruses. Microsoft used the most current virus-detection software that was available on the date that the file was posted. The file is stored on security-enhanced servers that help to 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.
  3. From a command prompt, type "gettaddr X:", where X: is the SCSI device with the SCSI address information you want to display.

Modification Type:MinorLast Reviewed:3/21/2005
Keywords:kbdownload kbfile kbSample KB182148 kbAudDeveloper