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.
Syntax
NDIS_STATUS NdisMSetMiniportAttributes(
NDIS_HANDLE NdisMiniportHandle,
[in] PNDIS_MINIPORT_ADAPTER_ATTRIBUTES MiniportAttributes
);
Parameters
NdisMiniportHandle
The miniport adapter handle that NDIS passed to the MiniportAdapterHandle parameter of MiniportInitializeEx.
[in] MiniportAttributes
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.
Return value
NdisMSetMiniportAttributes returns one of the following status values:
Return code | Description |
---|---|
|
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 . |
Remarks
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.
Requirements
Requirement | Value |
---|---|
Minimum supported client | Supported in NDIS 6.0 and later. |
Target Platform | Universal |
Header | ndis.h (include Ndis.h) |
Library | Ndis.lib |
IRQL | PASSIVE_LEVEL |
DDI compliance rules | Irql_Miniport_Driver_Function(ndis), NdisMRegisterIoPortRange(ndis) |
See also
Initializing a Miniport Adapter
NDIS_MINIPORT_ADAPTER_ATTRIBUTES NDIS_MINIPORT_ADAPTER_GENERAL_ATTRIBUTESNDIS_MINIPORT_ADAPTER_HARDWARE_ASSIST_ATTRIBUTES
NDIS_MINIPORT_ADAPTER_NATIVE_802_11_ATTRIBUTES
NDIS_MINIPORT_ADAPTER_NDK_ATTRIBUTES
NDIS_MINIPORT_ADAPTER_OFFLOAD_ATTRIBUTES
NDIS_MINIPORT_ADAPTER_REGISTRATION_ATTRIBUTES