SAMPLE: GetAddr.exe Demonstrates IOCTL_SCSI_GET_ADDRESS

Last reviewed: March 6, 1998
Article ID: 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 Software Library:

~ GetAddr.exe

For more information about downloading files from the Microsoft Software Library, please see the following article in the Microsoft Knowledge Base:

ARTICLE-ID: Q119591 TITLE : How to Obtain Microsoft Support Files from Online Services

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.
Keywords          : kbfile kbsample
Version           : WINNT:3.51,4.0
Platform          : winnt


================================================================================


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: March 6, 1998
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.