Expand Minimize

FsRtlAllocateExtraCreateParameterList routine

The FsRtlAllocateExtraCreateParameterList routine allocates paged pool memory for an ECP_LIST structure and generates a pointer to that structure.

Syntax


NTSTATUS FsRtlAllocateExtraCreateParameterList(
  _In_   FSRTL_ALLOCATE_ECPLIST_FLAGS Flags,
  _Out_  PECP_LIST *EcpList
);

Parameters

Flags [in]

Defines pool allocation options. If the FSRTL_ALLOCATE_ECPLIST_FLAG_CHARGE_QUOTA flag is combined with the Flags parameter by using a bitwise OR operation, any pool allocated by FsRtlAllocateExtraCreateParameterList will be charged against the current process' memory quota.

EcpList [out]

Receives a pointer to an initialized ECP list structure. If FsRtlAllocateExtraCreateParameterList failed to allocate sufficient pool, *EcpList will be NULL and FsRtlAllocateExtraCreateParameterList will return status code STATUS_INSUFFICIENT_RESOURCES.

Return value

FsRtlAllocateExtraCreateParameterList can return one of the following values:

Return codeDescription
STATUS_INSUFFICIENT_RESOURCES

FsRtlAllocateExtraCreateParameterList was unable to allocate sufficient memory for an ECP list structure. In this case, *EcpList will be NULL.

STATUS_SUCCESS

The memory for the ECP_LIST structure was successfully allocated and initialized. In this case, a pointer to the initialized list structure is returned in the EcpList parameter.

 

Remarks

Whether the operating system automatically frees memory that FsRtlAllocateExtraCreateParameterList allocates depends on when FsRtlAllocateExtraCreateParameterList is called, as shown in the following situations:

  • A caller can invoke FsRtlAllocateExtraCreateParameterList to allocate the ECP_LIST and add one or more ECP context structures before the caller invokes the IoCreateFileEx routine. In this situation, the operating system does not free any of the ECP context structures. Therefore, the caller can make multiple calls to IoCreateFileEx with the same ECP set. When the caller is done with the ECP_LIST, the caller must call the FsRtlFreeExtraCreateParameterList routine to free the ECP_LIST.

  • While a file system or file system filter driver processes an IRP_MJ_CREATE request, the file system or file system filter driver can call FsRtlInsertExtraCreateParameter to attach an ECP to an existing ECP_LIST. If the ECP_LIST does not exist, the caller must call FsRtlAllocateExtraCreateParameterList to create the ECP_LIST. In this situation, the ECP_LIST and the ECP context structure are automatically cleaned up by the I/O manager when the create operation completes. This allows a file system's or filter driver's ECP to be properly propagated across the processing of reparse points. This process might require multiple IRP_MJ_CREATE requests to be generated.

If the FSRTL_ALLOCATE_ECPLIST_FLAG_CHARGE_QUOTA flag is used with the Flags parameter, a pageable pool is allocated. Otherwise, a pageable pool is allocated by using an internal lookaside list.

Requirements

Version

The FsRtlAllocateExtraCreateParameterList routine is available starting with Windows Vista.

Header

Ntifs.h (include Ntifs.h)

Library

Ntoskrnl.lib

IRQL

<= APC_LEVEL

See also

ECP_LIST
FltAllocateExtraCreateParameter
FltAllocateExtraCreateParameterFromLookasideList
FltCreateFileEx2
FltFreeExtraCreateParameter
FltFreeExtraCreateParameterList
FltGetEcpListFromCallbackData
FltInsertExtraCreateParameter
FltRemoveExtraCreateParameter
FltSetEcpListIntoCallbackData
IoCreateFileEx

 

 

Send comments about this topic to Microsoft

Show:
© 2014 Microsoft