Поделиться через


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.

Syntax

VOID NdisImmediateWriteSharedMemory(
  _In_ NDIS_HANDLE WrapperConfigurationContext,
  _In_ ULONG       SharedMemoryAddress,
  _In_ 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]
    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

None

Remarks

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.

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

Header

Ndis.h (include Ndis.h)

Library

Ndis.lib

IRQL

PASSIVE_LEVEL

See also

MiniportInitialize

NdisImmediateReadSharedMemory

NdisMMapIoSpace

NdisMoveToMappedMemory

 

 

Send comments about this topic to Microsoft