NdisMSetAttributes

This function informs the NDIS library about significant features of the caller's network adapter during initialization.

VOID NdisMSetAttributes(
IN NDIS_HANDLE MiniportAdapterHandle, 
IN NDIS_HANDLE MiniportAdapterContext, 
IN BOOLEAN BusMaster, 
IN NDIS_INTERFACE_TYPE AdapterType );

Parameters

  • MiniportAdapterHandle
    Handle input to the MiniportInitialize function.
  • MiniportAdapterContext
    Handle to a resident context area allocated by MiniportInitialize.
  • BusMaster
    Specifies TRUE if the caller's network adapter is a busmaster DMA device.
  • AdapterType
    Specifies the I/O bus interface type of the caller's network adapter, which usually is the type of I/O bus on which the network adapter is connected, as one of the following:
    Value Description
    NdisInterfaceInternal Specifies a host-specific internal interface.
    NdisInterfaceIsa Specifies the ISA interface.
    NdisInterfaceEisa Specifies the extended ISA (EISA) interface.
    NdisInterfacePci Specifies the Peripheral Component Interconnect (PCI) interface.
    NdisInterfacePCMcia Specifies the Personal Computer Memory Card International Association (PCMCIA) interface.

Remarks

A MiniportInitialize function must call this function or NdisMSetAttributesEx before calling any other NdisMRegisterXXX or NdisXXX ** function that depends on the information supplied to this function or NdisMSetAttributesEx. For example, a call to the NdisMAllocateMapRegisters function fails if MiniportInitialize has not yet called this function with BusMaster set to TRUE or NdisMSetAttributesEx with NDIS_ATTRIBUTE_BUS_MASTER set in the AttributeFlags.

In general, a network adapter driver must call this function or NdisMSetAttributesEx before it calls any NdisXXX function that claims hardware resources in the registry for its network adapter because NDIS must have the BusMaster or AttributeFlags value, respectively, before such a call is made and because the driver usually needs the memory at MiniportAdapterContext to store information for these calls. This restriction implies that a network adapter driver's MiniportInitialize function cannot call the following NdisXXX functions before it calls this function or NdisMSetAttributesEx:

However, before calling this function or NdisMSetAttributesEx, a network adapter driver can call the NDIS configuration functions to retrieve configuration information installed in the registry and the NdisImmediateXXX, such as NdisImmediateReadSharedMemory, as well as the NdisImmediateXXXPortXXX functions. MiniportInitialize can also call the bus-type-specific NdisReadXXX functions, such as NdisReadPciSlotInformation, as long as the installed registry entry for the driver's interface type matches the bus-type-specific NdisReadXXX MiniportInitialize calls.

The MiniportAdapterContext handle supplied to this function or NdisMSetAttributesEx becomes an input parameter to all MiniportXXX functions that were registered, along with MiniportInitialize, in the call to NdisMRegisterMiniport. Usually, this handle is a pointer to resident memory, allocated by MiniportInitialize, in which the driver maintains network adapter-specific run-time state.

Intermediate drivers must call NdisMSetAttributesEx, rather than this function. Network adapter drivers can call either of these functions, but NdisMSetAttributesEx allows a miniport to adjust the intervals at which its MiniportCheckForHang and MiniportReset functions are called.

Requirements

Runs on Versions Defined in Include Link to
Windows CE OS 2.0 and later Ndis.h   Ndislib.lib

Note   This API is part of the complete Windows CE OS package as provided by Microsoft. The functionality of a particular platform is determined by the original equipment manufacturer (OEM) and some devices may not support this API.

See Also

MiniportCheckForHang, MiniportInitialize, MiniportReset, NdisMAllocateMapRegisters, NdisMMapIoSpace, NdisMRegisterInterrupt, NdisMRegisterIoPortRange, NdisMRegisterMiniport, NdisMSetAttributesEx, NdisOpenConfiguration, NdisReadPciSlotInformation, NdisWritePciSlotInformation

 Last updated on Tuesday, July 13, 2004

© 1992-2000 Microsoft Corporation. All rights reserved.