NdisReadPcmciaAttributeMemory reads bus-relative configuration parameters for a PC Card NIC from attribute memory.
ULONG
NdisReadPcmciaAttributeMemory(
IN NDIS_HANDLE NdisAdapterHandle,
IN ULONG Offset,
IN PVOID Buffer,
IN ULONG Length
);
NdisReadPcmciaAttributeMemory returns how many bytes it read from attribute memory. A return value of zero indicates that the read operation failed.
Declared in Ndis.h. Include Ndis.h.
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.
Callers of NdisWritePcmciaAttributeMemory run at IRQL <= DISPATCH.