Condividi tramite


Funzione NdisMSetMiniportAttributes (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

Puntatore a un oggetto 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
NDIS_STATUS_SUCCESS

NdisMSetMiniportAttributes registered the miniport adapter attributes successfully.

NDIS_STATUS_BAD_VERSION
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. Un driver miniport deve fornire un inizializzato 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. Questa area di contesto contiene informazioni sullo stato specifiche dell'adattatore miniport.

I driver Miniport devono impostare gli attributi nel 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
Client minimo supportato Supportato in NDIS 6.0 e versioni successive.
Target Platform Universal
Header ndis.h (include Ndis.h)
Library Ndis.lib
IRQL PASSIVE_LEVEL
regole di conformità DDI Irql_Miniport_Driver_Function(ndis), NdisMRegisterIoPortRange(ndis)

See also

inizializzazione di un adattatore miniport

MiniportInitializeEx

NDIS_MINIPORT_ADAPTER_ATTRIBUTES NDIS_MINIPORT_ADAPTER_GENERAL_ATTRIBUTES

NDIS_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

NDIS_MINIPORT_ADD_DEVICE_REGISTRATION_ATTRIBUTES

Impostazione degli attributi dell'adattatore miniport NDIS 6.0