Expand Minimize

NdisReadPcmciaAttributeMemory function

Note   NDIS 5. x has been deprecated and is superseded by NDIS 6. x. For new NDIS driver development, see Network Drivers Starting with Windows Vista. For information about porting NDIS 5. x drivers to NDIS 6. x, see Porting NDIS 5.x Drivers to NDIS 6.0.

NdisReadPcmciaAttributeMemory reads bus-relative configuration parameters for a PC Card NIC from attribute memory.

Syntax


ULONG NdisReadPcmciaAttributeMemory(
  _In_   NDIS_HANDLE NdisAdapterHandle,
  _In_   ULONG Offset,
  _Out_  PVOID Buffer,
  _In_   ULONG Length
);

Parameters

NdisAdapterHandle [in]

Specifies the handle that NDIS passed as an input parameter to MiniportInitialize.

Offset [in]

Specifies the byte offset from the beginning of attribute memory, excluding odd-numbered bytes, at which to begin reading.

Buffer [out]

Pointer to a caller-allocated buffer into which this function copies the specified number of bytes from PC Card attribute memory.

Length [in]

Specifies the number of even-numbered bytes to read from attribute memory, beginning at Offset.

Return value

NdisReadPcmciaAttributeMemory returns how many bytes it read from attribute memory. A return value of zero indicates that the read operation failed.

Remarks

The driver of a PC Card NIC calls NdisReadPcmciaAttributeMemory to read bus-relative configuration parameters for its NIC from PC Card attribute memory. Such a miniport driver usually calls NdisReadPcmciaAttributeMemory from its MiniportInitialize function. A miniport driver can call NdisReadPcmciaAttributeMemory more than once to read nonoverlapping sections of attribute memory.

Drivers of PC Card NICs should use NdisReadPcmciaAttributeMemory to maintain binary compatibility across Microsoft operating systems that support Win32. Drivers should never attempt to read attribute memory directly from the bus.

PC Card attribute memory contains significant information only in even-numbered bytes. NdisReadPcmciaAttributeMemory therefore treats attribute memory as if it were compacted, with all odd (meaningless) bytes removed. The Offset and Length parameters refer to compacted memory (memory consisting only of even-numbered bytes). For example, to read a 6-byte Ethernet address from attribute memory at an actual offset of 0xFF0, the caller of NdisWritePcmciaAttributeMemory would specify an Offset of 0x7F8 (0xFF0/2) and a Length of 6.

Requirements

Version

Not supported for NDIS 6.0 drivers in Windows Vista. Supported for NDIS 5.1 drivers in Windows Vista and Windows XP.

Header

Ndis.h (include Ndis.h)

IRQL

<= DISPATCH

See also

MiniportInitialize
NdisWritePcmciaAttributeMemory

 

 

Send comments about this topic to Microsoft

Show:
© 2014 Microsoft