Partager via


NdisWritePcmciaAttributeMemory (Windows Embedded CE 6.0)

1/6/2010

This function writes bus-relative configuration parameters for a PC Card NIC to attribute memory.

Syntax

ULONG NdisWritePcmciaAttributeMemory(
  NDIS_HANDLE NdisAdapterHandle,
  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 writing.
  • Buffer
    [in] Pointer to a caller-allocated buffer from which this function copies the specified number of bytes to PC Card attribute memory.
  • Length
    [in] Specifies the number of even-numbered bytes to write to attribute memory, beginning at Offset.

Return Value

NdisWritePcmciaAttributeMemory returns how many bytes it wrote to attribute memory. A return value of zero indicates that the write operation failed.

Remarks

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.

Requirements

Header ndis.h
Library ndis.lib
Windows Embedded CE Windows CE 5.0 and later

See Also

Reference

NDIS Library Functions
MiniportInitialize
NdisReadPcmciaAttributeMemory