次の方法で共有


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

NdisAllocateFromBlockPool allocates memory from a block of memory pool.

Syntax

PUCHAR NdisAllocateFromBlockPool(
  _In_ NDIS_HANDLE BlockPoolHandle
);

Parameters

  • BlockPoolHandle [in]
    Handle to the block to allocate from.

Return value

Returns a buffer if one can be allocated from the block; otherwise, it returns NULL.

Remarks

NdisAllocateFromBlockPool causes the driver-supplied initialization functionif it is suppliedto run once. This initialization function becomes associated with the block handle after NdisCreateBlockPool is called. The following describes the syntax of the driver-supplied initialization function:

VOID
(__stdcall *NDIS_BLOCK_INITIALIZER) (
    IN  PUCHAR  Block,
    IN  SIZE_T  NumberOfBytes
    );

The NdisFreeToBlockPool function is called to release memory back to the block.

Requirements

Target platform

Desktop

Version

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

Header

Ndis.h (include Ndis.h)

IRQL

<= DISPATCH_LEVEL.

See also

NdisCreateBlockPool

NdisFreeToBlockPool

 

 

Send comments about this topic to Microsoft