Поделиться через


NdisMSetMiniportAttributes (Compact 2013)

3/26/2014

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  NdisMiniportAdapterHandle,
    PNDIS_MINIPORT_ADAPTER_ATTRIBUTES  MiniportAttributes
); 

Parameters

  • NdisMiniportAdapterHandle
    [in] The miniport adapter handle that NDIS passed to the MiniportAdapterHandle parameter of MiniportInitializeEx.
  • MiniportAttributes
    [in] A pointer to a 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:

  • 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. 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.

Requirements

Header

ndis.h

See Also

Reference

NDIS Functions for Miniport Drivers
MiniportInitializeEx
NDIS_MINIPORT_ADAPTER_ATTRIBUTES
NDIS_MINIPORT_ADAPTER_GENERAL_ATTRIBUTES
NDIS_MINIPORT_ADAPTER_REGISTRATION_ATTRIBUTES