Previous Next

NdisImmediateReadSharedMemory

This function is obsolete for Windows XP and later. 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 NdisMMapIoSpace and then NdisMoveFromMappedMemory instead.

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

VOID
  NdisImmediateReadSharedMemory(
    IN NDIS_HANDLE  WrapperConfigurationContext,
    IN ULONG  SharedMemoryAddress,
    IN OUT PUCHAR  Buffer,
    IN ULONG  Length
    );

Parameters

WrapperConfigurationContext
Specifies the handle passed to MiniportInitialize.
SharedMemoryAddress
Specifies the bus-relative base address of the shared device memory range.
Buffer
Pointer to a caller-allocated buffer in which this function returns the data read from the device memory range starting at SharedMemoryAddress.
Length
Specifies the size in bytes of the buffer at Buffer and, therefore, how many bytes of data to return.

Headers

Declared in Ndis.h. Include Ndis.h.

Comments

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.

Callers of NdisImmediateReadSharedMemory run at IRQL = PASSIVE_LEVEL.

See Also

MiniportInitialize, NdisImmediateWriteSharedMemory, NdisMMapIoSpace, NdisMoveFromMappedMemory