NdisMSetMiniportAttributes function (ndis.h)
A miniport driver must call the NdisMSetMiniportAttributes function from its MiniportInitializeEx function to identify a context area for miniport adapter to NDIS, and to provide NDIS with information about the miniport adapter.
NDIS_STATUS NdisMSetMiniportAttributes( NDIS_HANDLE NdisMiniportHandle, [in] PNDIS_MINIPORT_ADAPTER_ATTRIBUTES MiniportAttributes );
The miniport adapter handle that NDIS passed to the MiniportAdapterHandle parameter of MiniportInitializeEx.
A pointer to an NDIS_MINIPORT_ADAPTER_ATTRIBUTES union which contains a driver-allocated attributes structure. The structure defines the attributes of the miniport adapter instance that MiniportAdapterHandle specifies.
NdisMSetMiniportAttributes returns one of the following status values:
NdisMSetMiniportAttributes registered the miniport adapter attributes successfully.
||Indicates that NDIS does not support the version that is specified in the Revision member of the structure specified in the Header member at MiniportAttributes .|
A miniport driver must call NdisMSetMiniportAttributes from its MiniportInitializeEx function before the driver calls any other NdisXxx function that depends on the information supplied to NdisMSetMiniportAttributes.
The NDIS_MINIPORT_ADAPTER_ATTRIBUTES union is a placeholder for various attributes structures. A miniport driver calls NdisMSetMiniportAttributes multiple times with different attributes structures. A miniport driver must provide an initialized NDIS_MINIPORT_ADAPTER_REGISTRATION_ATTRIBUTES structure from MiniportInitializeEx. The miniport driver must provide these registration attributes before it calls any other NdisXxx function that depends on these attributes or that claims hardware resources.
The driver provides a MiniportAdapterContext member to NDIS in the NDIS_MINIPORT_ADAPTER_REGISTRATION_ATTRIBUTES structure. The MiniportAdapterContext member identifies a caller-supplied context area that NDIS passes as an input parameter to the driver's MiniportXxx functions. This context area contains miniport-adapter-specific state information.
Miniport drivers must set the attributes in the NDIS_MINIPORT_ADAPTER_GENERAL_ATTRIBUTES structure after they set the registration attributes in the NDIS_MINIPORT_ADAPTER_REGISTRATION_ATTRIBUTES structure and before they set any additional attributes.
A miniport driver can also call NdisMSetMiniportAttributes from its MiniportAddDevice function. In this case, the NDIS_MINIPORT_ADD_DEVICE_REGISTRATION_ATTRIBUTES structure is used to specify the context area.
|Minimum supported client||Supported in NDIS 6.0 and later.|
|Header||ndis.h (include Ndis.h)|
|DDI compliance rules||Irql_Miniport_Driver_Function, NdisMRegisterIoPortRange|