Export (0) Print
Expand All
Expand Minimize

FltCheckAndGrowNameControl routine

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 FltCheckAndGrowNameControl(
  _Inout_  PFLT_NAME_CONTROL NameCtrl,
  _In_     USHORT NewSize
);

Parameters

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.

Return value

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

Return codeDescription
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

Header

Fltkernel.h (include Fltkernel.h)

Library

FltMgr.lib

IRQL

<= APC_LEVEL

See also

FLT_NAME_CONTROL
FltGetFileNameFormat
FltGetFileNameInformation
FltGetFileNameInformationUnsafe
FltGetFileNameQueryMethod

 

 

Send comments about this topic to Microsoft

Show:
© 2014 Microsoft