The StorPortGetScatterGatherList routine retrieves the associated scatter/gather list for the specified SCSI request block (SRB).
STORPORT_API PSTOR_SCATTER_GATHER_LIST StorPortGetScatterGatherList( _In_ PVOID HwDeviceExtension, _In_ PSCSI_REQUEST_BLOCK Srb );
- HwDeviceExtension [in]
A pointer to the hardware device extension. This is a per HBA storage area that the port driver allocates and initializes on behalf of the miniport driver. Miniport drivers usually store HBA-specific information in this extension, such as the state of the HBA and the mapped access ranges for the HBA. This area is available to the miniport immediately after the miniport driver calls StorPortInitialize. The port driver frees this memory when it removes the device.
- Srb [in]
Pointer to the SRB for which the scatter gather list is to be constructed.
StorPortGetScatterGatherList returns a pointer to the scatter/gather list.
This routine is provided with the Storport driver library. There is no parallel routine provided in the SCSI port library.
The pointer to the scatter/gather list that is returned is valid only until the SRB is completed.
The miniport driver does not have to free the memory for the scatter/gather list that StorPortGetScatterGatherList returns.
The miniport driver must not modify the scatter/gather list.
Starting in Windows 8, the Srb parameter may point to either SCSI_REQUEST_BLOCK or STORAGE_REQUEST_BLOCK. If the function identifier in the Function field of Srb is SRB_FUNCTION_STORAGE_REQUEST_BLOCK, the SRB is a STORAGE_REQUEST_BLOCK request structure.