Freigeben über


NdisImmediateReadSharedMemory 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.

NdisImmediateReadSharedMemory reads a specified number of bytes from shared device RAM.

Syntax

VOID NdisImmediateReadSharedMemory(
  _In_    NDIS_HANDLE WrapperConfigurationContext,
  _In_    ULONG       SharedMemoryAddress,
  _Inout_ PUCHAR      Buffer,
  _In_    ULONG       Length
);

Parameters

  • WrapperConfigurationContext [in]
    Specifies the handle passed to MiniportInitialize.

  • SharedMemoryAddress [in]
    Specifies the bus-relative base address of the shared device memory range.

  • Buffer [in, out]
    Pointer to a caller-allocated buffer in which this function returns the data read from the device memory range starting at SharedMemoryAddress.

  • Length [in]
    Specifies the size in bytes of the buffer at Buffer and, therefore, how many bytes of data to return.

Return value

None

Remarks

NdisImmediateReadSharedMemory determines how the host accesses shared device memory, maps the bus-relative base address, and then copies Length bytes of data from the device memory area into the given buffer.

A miniport driver can call NdisImmediateReadSharedMemory during initialization to read data from a range of device memory when that driver has not yet called NdisMMapIoSpace to obtain mapped virtual addresses for the bus-relative device memory range. After its call to NdisMMapIoSpace, the driver uses the returned mapped virtual addresses in PIO operations.

Miniports should not call NdisImmediateReadSharedMemory in a Plug and Play environment.

Requirements

Target platform

Universal

Version

Not supported for NDIS 6.0 drivers in Windows Vista. Supported for NDIS 5.1 drivers in Windows Vista and Windows XP. Windows XP supports this function for legacy drivers. However, the Windows XP DDK will not build an NDIS driver that calls this function. Drivers should call NdisMMapIoSpaceand then NdisMoveFromMappedMemoryinstead.

Header

Ndis.h (include Ndis.h)

Library

Ndis.lib

IRQL

PASSIVE_LEVEL

See also

MiniportInitialize

NdisImmediateWriteSharedMemory

NdisMMapIoSpace

NdisMoveFromMappedMemory

 

 

Send comments about this topic to Microsoft