How to Pass Parameters to a SCSI Miniport via the Registry

Last reviewed: August 3, 1995
Article ID: Q133706
The information in this article applies to:
  • Microsoft Win32 Device Driver Kit (DDK) version 3.51

SUMMARY

This article describes how to pass information from the Windows NT registry to a SCSI miniport driver. The parameter string passed to the SCSI miniport is in the fourth parameter of the HwFindAdapter routine. This article refers to the following registry location:

   HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services

MORE INFORMATION

There are two formats that can be used to pass registry information to SCSI miniports. The first is used when a different parameter string must be passed to each HBA that the SCSI miniport supports. The second is used when the same parameter string should be passed to all the HBAs the SCSI miniport supports.

The registry string described below will be passed in as the fourth parameter (the ArgumentString) in the SCSI miniport's HwScsiFindAdapter routine. The FD8XX driver in the Windows NT DDK shows an example of the parameter string being passed to the SCSI miniport.

WARNING: Use extreme care when making changes to the Windows NT Registry. Improper changes can cause the system to become unbootable. Refer to the Windows NT DDK documentation for assistance on general registry changes.

Format One

MpName                                 // SCSI miniport key name
   Parameters                          // key name
      Device0                          // key name
         DriverParameter               // value name
            REG_SZ                     // value data type
            Parm string for HBA-0      // parameter string
      Device1
         DriverParameter
            REG_SZ
            Parm string for HBA-1
      ...

      DeviceN
         DriverParameter
            REG_SZ
            Parm string for HBA-N

Format Two

MpName                                          // SCSI miniport key name
   Parameters                                   // key name
      Device                                    // key name
         DriverParameter                        // value name
            REG_SZ                              // value data type
            Parm string for all MpName HBA's    // parameter string

There are several methods to add the information to the registry:
  • Using REGEDT32.EXE
  • Using INF files
  • Using various Win32 APIs

NOTE: The SCSI miniport cannot use any of the C-runtime functions such as STRCMP or STRCPY, so the driver writer must write any string-handling functions needed to interpret the parameter information.


Additional reference words: 3.51 parm
KBCategory: kbprg
KBSubcategory: NTDDKSTORAGE


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: August 3, 1995
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.