Bewerken

Delen via


FltCheckAndGrowNameControl function (fltkernel.h)

The FltCheckAndGrowNameControl routine checks whether the buffer in a FLT_NAME_CONTROL structure is large enough to hold the specified number of bytes. If not, FltCheckAndGrowNameControl replaces it with a larger system-allocated buffer.

Syntax

NTSTATUS FLTAPI FltCheckAndGrowNameControl(
  [in, out] PFLT_NAME_CONTROL NameCtrl,
  [in]      USHORT            NewSize
);

Parameters

[in, out] NameCtrl

Pointer to a FLT_NAME_CONTROL structure containing file name information.

[in] NewSize

Required size, in bytes, of the new name control buffer.

Return value

FltCheckAndGrowNameControl returns STATUS_SUCCESS or an appropriate NTSTATUS value such as the following:

Return code Description
STATUS_INSUFFICIENT_RESOURCES
There is insufficient memory in the free pool to satisfy the request.

Remarks

Minifilter drivers must not attempt to free or replace the buffer in the Name member of a FLT_NAME_CONTROL structure directly. Instead, minifilter drivers should call FltCheckAndGrowNameControl to obtain a larger name buffer.

If the size, in bytes, of the buffer in the NameCtrl structure is less than the value of the NewSize parameter, FltCheckAndGrowNameControl replaces it with a larger system-allocated buffer. FltCheckAndGrowNameControl copies the contents of the old buffer into the new one and frees the old buffer.

If the size, in bytes, of the buffer in the NameCtrl structure is greater than or equal to the value of the NewSize parameter, FltCheckAndGrowNameControl returns STATUS_SUCCESS and does not replace the buffer.

Requirements

Requirement Value
Target Platform Universal
Header fltkernel.h (include Fltkernel.h)
Library FltMgr.lib
IRQL <= APC_LEVEL

See also

FLT_NAME_CONTROL

FltGetFileNameFormat

FltGetFileNameInformation

FltGetFileNameInformationUnsafe

FltGetFileNameQueryMethod