NdisMSetAttributes
Other versions of this page are also available for the following:
8/28/2008
This function informs the NDIS library about significant features of the caller's NIC during initialization.
Syntax
VOID NdisMSetAttributes(
NDIS_HANDLE MiniportAdapterHandle,
NDIS_HANDLE MiniportAdapterContext,
BOOLEAN BusMaster,
NDIS_INTERFACE_TYPE AdapterType
);
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 Value
None.
Remarks
A MiniportInitialize function must call this function or NdisMSetAttributesEx before calling any other NdisMRegisterXXX or NdisXXXfunction 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:
- NdisMPciAssignResources
- NdisMAllocateSharedMemory
- NdisMMapIoSpace
- NdisMRegisterInterrupt
- NdisMRegisterIoPortRange and, consequently, the NdisRawXXXPortXXX functions
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 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 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
Header | ndis.h |
Library | ndis.dll |
Windows Embedded CE | Windows CE .NET 4.0 and later |
See Also
Reference
MiniportCheckForHang
MiniportInitialize
MiniportReset
NdisMAllocateSharedMemory
NdisMMapIoSpace
NdisMPciAssignResources
NdisMRegisterInterrupt
NdisMRegisterIoPortRange
NdisReadPciSlotInformation
NdisMRegisterMiniport
NdisMSetAttributesEx
NdisOpenConfiguration
NdisWritePciSlotInformation