Compartilhar via


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

NdisQueryBuffer retrieves the size of the range, and optionally the base virtual address, from a buffer descriptor.

Syntax

VOID NdisQueryBuffer(
  _In_      PNDIS_BUFFER Buffer,
  _Out_opt_ PVOID        *VirtualAddress,
  _Out_     PUINT        Length
);

Parameters

  • Buffer [in]
    Pointer to the buffer descriptor.

  • VirtualAddress [out, optional]
    Pointer to a caller-supplied variable in which this function returns the base virtual address of the range described.

  • Length [out]
    Pointer to to a caller-supplied variable in which this function returns the number of bytes in the virtual range.

Return value

None

Remarks

Drivers should call NdisQueryBufferSafe instead of NdisQueryBuffer. NDIS 5.1 miniport drivers must call NdisQueryBufferSafe instead of NdisQueryBuffer. Unlike NdisQueryBuffer, NdisQueryBufferSafe does not cause a bug check if system resources are low or exhausted.

NDIS drivers call NdisQueryBuffer to retrieve information from the buffer descriptors chained to incoming packets for subsequent transfer operations.

The driver must release any spin lock it is holding before calling NdisQueryBuffer.

Requirements

Target platform

Universal

Version

Not supported for NDIS 6.0 drivers in Windows Vista. Use NdisQueryMdlinstead. Supported for NDIS 5.1 drivers in Windows Vista and Windows XP. Use NdisQueryBufferSafeinstead.

Header

Ndis.h (include Ndis.h)

Library

Ndis.lib

IRQL

<= DISPATCH_LEVEL

See also

MiniportHandleInterrupt

MiniportSend

MiniportSendPackets

MiniportTimer

MiniportTransferData

MiniportWanSend

NdisAllocateBuffer

NdisGetFirstBufferFromPacket

NdisGetFirstBufferFromPacketSafe

NdisMoveFromMappedMemory

NdisMoveMemory

NdisMoveToMappedMemory

NdisQueryBufferOffset

NdisQueryBufferSafe

NdisQueryPacket

NdisRawReadPortBufferUchar

NdisRawReadPortBufferUlong

NdisRawReadPortBufferUshort

NdisRawWritePortBufferUchar

NdisRawWritePortBufferUlong

NdisRawWritePortBufferUshort

NdisReleaseSpinLock

NdisUnchainBufferAtBack

NdisUnchainBufferAtFront

ProtocolReceive

ProtocolReceivePacket

 

 

Send comments about this topic to Microsoft