Expand Minimize

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

NdisImmediateWriteSharedMemory writes a specified number of bytes from a caller-supplied buffer to shared device RAM.


VOID NdisImmediateWriteSharedMemory(
  _In_  NDIS_HANDLE WrapperConfigurationContext,
  _In_  ULONG       SharedMemoryAddress,
  _In_  PUCHAR      Buffer,
  _In_  ULONG       Length


WrapperConfigurationContext [in]

Specifies the handle passed to MiniportInitialize.

SharedMemoryAddress [in]

Specifies the bus-relative base address of the shared device memory range.

Buffer [in]

Pointer to a caller-allocated buffer containing the data to be written to 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 transfer to device RAM.

Return value



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

A miniport driver can call NdisImmediateWriteSharedMemory during initialization to transfer data to 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.

Miniport drivers should not call NdisImmediateWriteSharedMemory in a Plug and Play environment.


Target platform



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


Ndis.h (include Ndis.h)



See also




Send comments about this topic to Microsoft

© 2015 Microsoft