The NdisBuildScatterGatherList function builds a scatter/gather list by using the specified parameters.
NDIS_STATUS NdisBuildScatterGatherList( IN NDIS_HANDLE NdisHandle, IN PNDIS_SCATTER_GATHER_LIST_PARAMETERS SGListParameters );
An NDIS driver or instance handle that was obtained during caller initialization. For example, a miniport driver can use the NDIS handle that it obtained from the NdisMRegisterMiniportDriver or MiniportInitializeEx function. Other NDIS drivers can use the handles from the following functions:
A pointer to an NDIS_SCATTER_GATHER_LIST_PARAMETERS structure that specifies the parameters for allocating the scatter/gather list.
NdisBuildScatterGatherList can return the following status values:
||The operation completed successfully.|
||The operation failed because the buffer length that is specified in the ScatterGatherListBufferSize member of the NDIS_SCATTER_GATHER_LIST_PARAMETERS structure was too short. In this case, NDIS provided the required buffer size in the ScatterGatherListBufferSizeNeeded member.|
NDIS drivers call the NdisBuildScatterGatherList function to build a scatter/gather list for a buffer. To call this function, a miniport driver specifies a miniport adapter handle or a protocol driver specifies an NDIS binding handle.
The underlying miniport adapter must have called NdisMRegisterScatterGatherDma before a driver can call NdisBuildScatterGatherList.
The drivers must call the NdisFreeScatterGatherList function to free a scatter/gather list that was created with the NdisBuildScatterGatherList function.
|Minimum supported client||Supported in NDIS 6.20 and later.|
|Header||ndis.h (include Ndis.h)|
See AlsoNDIS_SCATTER_GATHER_LIST_PARAMETERS NdisMRegisterScatterGatherDma