NDIS_BUFFER_TO_SPAN_PAGES

NDIS_BUFFER_TO_SPAN_PAGES (Windows Embedded CE 6.0)

1/6/2010

This macro determines how many physical pages of memory are being used to back a specified buffer.


ULONG NDIS_BUFFER_TO_SPAN_PAGES(
  PNDIS_BUFFER _Buffer
);

_Buffer

Specifies the buffer descriptor mapping the buffer.

The return value is the Windows Embedded CE version, which is always 1.

This macro is used by DMA drivers to determine how many physical discontiguities exist in a specified virtual buffer.

The NDIS_BUFFER_TO_SPAN_PAGES macro is defined as follows.

#define NDIS_BUFFER_TO_SPAN_PAGES(_Buffer)                  \
    (MmGetMdlByteCount(_Buffer)==0 ?                        \
                1 :                                         \
                (COMPUTE_PAGES_SPANNED(                     \
                        MmGetMdlVirtualAddress(_Buffer),    \
                        MmGetMdlByteCount(_Buffer))))

Headerndis.h
Windows Embedded CEWindows CE .NET 4.0 and later

Community Additions

ADD
Show:
© 2016 Microsoft