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.
NTSTATUS FltCheckAndGrowNameControl( _Inout_ PFLT_NAME_CONTROL NameCtrl, _In_ USHORT NewSize );
- NameCtrl [in, out]
Pointer to a FLT_NAME_CONTROL structure containing file name information.
- NewSize [in]
Required size, in bytes, of the new name control buffer.
FltCheckAndGrowNameControl returns STATUS_SUCCESS or an appropriate NTSTATUS value such as the following:
There is insufficient memory in the free pool to satisfy the request.
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.