The FltAllocateExtraCreateParameterFromLookasideList routine allocates memory pool from a given lookaside list for an extra create parameter (ECP) context structure and generates a pointer to that structure.
NTSTATUS FLTAPI FltAllocateExtraCreateParameterFromLookasideList( PFLT_FILTER Filter, LPCGUID EcpType, ULONG SizeOfContext, FSRTL_ALLOCATE_ECP_FLAGS Flags, PFSRTL_EXTRA_CREATE_PARAMETER_CLEANUP_CALLBACK CleanupCallback, PVOID LookasideList, PVOID *EcpContext );
Opaque filter pointer to the minifilter driver. This pointer uniquely identifies the minifilter driver and remains constant as long as the minifilter driver is loaded.
Pointer to a GUID that indicates the type of the ECP context structure. See Using GUIDs in Drivers for more information.
The size, in bytes, of the ECP context structure.
Defines pool allocation options. If the value of the SizeOfContext parameter is larger than the size, in bytes, of the given lookaside list, the ECP context structure will be allocated from system pool instead of the lookaside list. In this case, if the Flags parameter contains the FSRTL_ALLOCATE_ECP_FLAG_CHARGE_QUOTA bit flag value, system pool allocated by the routine will be charged against the current process' memory quota. See the Flags parameter of FltAllocateExtraCreateParameter for more information. In the more typical case when memory for the ECP context structure is allocated from the lookaside list, the FSRTL_ALLOCATE_ECP_FLAG_CHARGE_QUOTA bit flag is not used by the routine.
Optional pointer to a minifilter-defined cleanup callback routine of type PFSRTL_EXTRA_CREATE_PARAMETER_CLEANUP_CALLBACK. The cleanup callback routine is called when the ECP context structure is deleted. Set this parameter to NULL if a cleanup callback routine is not applicable.
Pointer to an initialized lookaside list in which to attempt to allocate pool from (for the ECP context structure). To initialize the lookaside list, use the FltInitExtraCreateParameterLookasideList routine.
Receives a pointer to the allocated ECP context structure. If the routine failed to allocate sufficient pool for the ECP context structure, EcpContext will be NULL and the routine will return status code STATUS_INSUFFICIENT_RESOURCES.
The FltAllocateExtraCreateParameterFromLookasideList routine can return one of the following values:
||The FltAllocateExtraCreateParameterFromLookasideList routine was unable to allocate sufficient memory for an ECP context structure. In this case, EcpContext will be NULL.|
||The ECP context structure was successfully allocated. In this case, a pointer to the allocated structure is returned by the EcpContext parameter.|
This routine is available starting with Windows Vista.
The FltAllocateExtraCreateParameterFromLookasideList routine allocates memory pool for an ECP context structure from the given initialized paged or non-paged lookaside list. However, if the size of the ECP context structure (as defined by the SizeOfContext parameter) is larger than the lookaside list, the routine analogously allocates memory from paged or non-paged system pool.
Use the FltInitExtraCreateParameterLookasideList routine to initialize a paged or non-paged pool lookaside list. Use the FltAllocateExtraCreateParameterFromLookasideList routine to allocate an ECP context structure from the lookaside list, and the FltFreeExtraCreateParameter routine to deallocate the ECP context structure.
Use the FltDeleteExtraCreateParameterLookasideList routine to free a lookaside list.
Drivers must free all ECP context structures and lookaside lists they create before unloading.
For more information on using lookaside lists with drivers, see Using Lookaside Lists.
|Header||fltkernel.h (include Fltkernel.h)|