NdisReadPcmciaAttributeMemory (Windows CE 5.0)

Send Feedback

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

ULONG NdisReadPcmciaAttributeMemory(NDIS_HANDLENdisAdapterHandle,ULONG Offset,PVOID Buffer,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
    [in] 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 Values

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 non-overlapping sections of attribute memory.

PC Card NIC drivers 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 treats attribute memory as if it were compacted, with all odd-numbered bytes removed. The Offset and Length parameters refer to compacted memory. For example, to read a 6 byte Ethernet address from attribute memory at an actual offset of 0xFF0, the caller of NdisReadPcmciaAttributeMemory would specify an Offset value of 0x7F8 and a Length value of 6.

Requirements

OS Versions: Windows CE 5.0 and later.
Header: Ndis.h.
Link Library: Ndis.lib

See Also

MiniportInitialize | NdisWritePcmciaAttributeMemory

Send Feedback on this topic to the authors

Feedback FAQs

© 2006 Microsoft Corporation. All rights reserved.