次の方法で共有


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

NdisCreateBlockPool returns the handle to a block of memory pool.

Syntax

NDIS_HANDLE NdisCreateBlockPool(
  _In_     USHORT                 BlockSize,
  _In_     USHORT                 FreeBlockLinkOffset,
  _In_     ULONG                  Tag,
  _In_opt_ NDIS_BLOCK_INITIALIZER InitFunction
);

Parameters

  • BlockSize [in]
    Specifies the size, in bytes, of the block to create.

  • FreeBlockLinkOffset [in]
    Specifies the offset, in bytes, to the block.

  • Tag [in]
    Specifies a value to identify the block.

  • InitFunction [in, optional]
    Specifies the entry point of a caller-supplied function that is called to initialize all or a portion of the block. Specifying this function is optional. The following describes the syntax of this function:

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

Return value

Returns a handle to the block that NdisCreateBlockPool creates.

Remarks

After NdisCreateBlockPool creates a block of memory pool, the NdisAllocateFromBlockPool function can be called to allocate from the block. The NdisFreeToBlockPool function is subsequently called to release memory back to the block.

The NdisDestroyBlockPool function is called to release resources for 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)

Library

Ndis.lib

IRQL

<= DISPATCH_LEVEL.

See also

NdisAllocateFromBlockPool

NdisDestroyBlockPool

NdisFreeToBlockPool

 

 

Send comments about this topic to Microsoft