Condividi tramite


NdisMSetAttributes (Windows CE 5.0)

Send Feedback

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

VOID NdisMSetAttributes(NDIS_HANDLE MiniportAdapterHandle,NDIS_HANDLEMiniportAdapterContext,BOOLEAN BusMaster,NDIS_INTERFACE_TYPEAdapterType);

Parameters

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

Return Values

None.

Remarks

A MiniportInitialize function must call this function or NdisMSetAttributesEx before calling any other NdisMRegisterXXX or Ndis*XXX***function that depends on the information supplied to this function or NdisMSetAttributesEx.

In general, an NIC driver must call this function or NdisMSetAttributesEx before it calls any NdisXXX function that claims hardware resources in the registry for its NIC 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 an NIC driver's MiniportInitialize function cannot call the following NdisXXX functions before it calls this function or NdisMSetAttributesEx:

However, before calling this function or NdisMSetAttributesEx, an NIC driver can call the NDIS configuration functions to retrieve configuration information installed in the registry. 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 NdisReadXXXMiniportInitialize 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 NIC-specific run-time state.

Intermediate drivers must call NdisMSetAttributesEx, rather than this function. NIC 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

OS Versions: Windows CE .NET 4.0 and later.
Header: Ndis.h.
Link Library: Ndis.dll.

See Also

MiniportCheckForHang | MiniportInitialize | MiniportReset | NdisMAllocateSharedMemory | NdisMMapIoSpace | NdisMPciAssignResources | NdisMRegisterInterrupt | NdisMRegisterIoPortRange | NdisReadPciSlotInformation | NdisMRegisterMiniport | NdisMSetAttributesEx | NdisOpenConfiguration | NdisWritePciSlotInformation

Send Feedback on this topic to the authors

Feedback FAQs

© 2006 Microsoft Corporation. All rights reserved.