|This is retired content. This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This content may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist.|
This function returns a handle with which the caller can allocate buffer descriptors by calling the NdisAllocateBufferfunction.
VOID NdisAllocateBufferPool( OUT PNDIS_STATUS Status , OUT PNDIS_HANDLE PoolHandle , IN UINT NumberOfDescriptors );
Always returns NDIS_STATUS_SUCCESS.
After this function returns, the driver calls the NdisAllocateBufferfunction one or more times to allocate the buffer descriptors that it requires. A driver should call this function during initialization.
The NumberOfDescriptorsparameter specified by an NIC driver usually depends on the features of the NIC. For example, the driver of a busmaster DMA NIC with ring buffers would specify at least a large enough NumberOfDescriptorsto map the full ring.
The NumberOfDescriptorsspecified in the call to this function is the effective limit on how many times the driver can call NdisAllocateBufferbefore it must call the NdisFreeBufferfunction to return a buffer descriptor to the free list for the buffer pool.
When a driver no longer needs the buffer pool that it allocated, it calls the NdisFreeBufferPoolfunction to release the buffer pool handle.
The driver must release any spin lock that it is holding before calling this function.
All lower-level NDIS drivers must allocate all buffer descriptors that they chain to packets from a buffer pool. Only highest-level protocol drivers can be given OS-dependent descriptors mapping virtual memory ranges. If these memory descriptors are equivalent to NDIS buffer descriptors, a highest-level protocol can pass such descriptors as parameters to NDIS functions.
A driver that calls this function runs at IRQL <=DISPATCH_LEVEL.
|Runs on||Versions||Defined in||Include||Link to|
|Windows CE OS||2.0 and later||Ndis.h|
Note This API is part of the complete Windows CE OS package as provided by Microsoft. The functionality of a particular platform is determined by the original equipment manufacturer (OEM) and some devices may not support this API.
Last updated on Tuesday, July 13, 2004