NdisWritePcmciaAttributeMemory (Windows CE 5.0)
This function writes bus-relative configuration parameters for a PC Card NIC to attribute memory.
ULONG NdisWritePcmciaAttributeMemory( NDIS_HANDLE NdisAdapterHandle, ULONG Offset, PVOID Buffer, ULONG Length );
- [in] Specifies the handle that NDIS passed as an input parameter to MiniportInitialize.
- [in] Specifies the byte offset from the beginning of attribute memory, excluding odd-numbered bytes, at which to begin writing.
- [in] Pointer to a caller-allocated buffer from which this function copies the specified number of bytes to PC Card attribute memory.
- [in] Specifies the number of even-numbered bytes to write to attribute memory, beginning at Offset.
NdisWritePcmciaAttributeMemory returns how many bytes it wrote to attribute memory. A return value of zero indicates that the write operation failed.
The driver of a PC Card NIC calls NdisWritePcmciaAttributeMemory to write bus-relative configuration parameters for its NIC to PC Card attribute memory. Such a miniport driver usually calls NdisWritePcmciaAttributeMemory from its MiniportInitialize function. A driver can call NdisWritePcmciaAttributeMemory more than once to write non-overlapping sections of attribute memory.
PC Card NIC drivers should use NdisWritePcmciaAttributeMemory to maintain binary compatibility across Microsoft operating systems that support Win32. Drivers should never attempt to write attribute memory directly from the bus.
PC Card attribute memory contains significant information only in even-numbered bytes. NdisWritePcmciaAttributeMemory 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 write a 6 byte Ethernet address to attribute memory at an actual offset of 0xFF0, the caller of NdisWritePcmciaAttributeMemory would specify an Offset value of 0x7F8 and a Length value of 6.
OS Versions: Windows CE 5.0 and later.
Link Library: Ndis.lib
Send Feedback on this topic to the authors