FsRtlIsNameInExpression function

The FsRtlIsNameInExpression routine determines whether a Unicode string matches the specified pattern.

Syntax

BOOLEAN FsRtlIsNameInExpression(
  PUNICODE_STRING Expression,
  PUNICODE_STRING Name,
  BOOLEAN         IgnoreCase,
  PWCH            UpcaseTable
);

Parameters

Expression

A pointer to the pattern string. Can contain wildcard characters. If IgnoreCase is TRUE, Expression must be uppercase.

Name

A pointer to the string to be compared against the pattern. Cannot contain wildcard characters.

IgnoreCase

Set to TRUE for case-insensitive matching, FALSE otherwise.

UpcaseTable

Optional pointer to uppercase character table to use for case-insensitive matching. If this value is not supplied, the default system uppercase character table is used.

Return value

FsRtlIsNameInExpression returns TRUE if the string matches the pattern, FALSE otherwise.

Remarks

The following wildcard characters can be used in the pattern string.

Wildcard character Meaning
* (asterisk) Matches zero or more characters.
? (question mark) Matches a single character.
DOS_DOT Matches either a period or zero characters beyond the name string.
DOS_QM Matches any single character or, upon encountering a period or end of name string, advances the expression to the end of the set of contiguous DOS_QMs.
DOS_STAR Matches zero or more characters until encountering and matching the final . in the name.

In low resource conditions, FsRtlIsNameInExpression can raise a structured exception with a code of STATUS_NO_MEMORY, which callers should be prepared to handle. For more information, see Structured Exception Handling.

Note

If only one of the string parameters has a length of zero, FsRtlIsNameInExpression returns FALSE. This means that "*" does not match a null string.

If both parameters are null strings, FsRtlIsNameInExpression returns TRUE.

Requirements

   
Minimum supported client This routine is available in Windows 2000 and later versions of the Windows operating system.
Target Platform Universal
Header ntifs.h (include FltKernel.h, Ntifs.h)
Library NtosKrnl.lib
DLL NtosKrnl.exe
IRQL PASSIVE_LEVEL

See also

FsRtlIsDbcsInExpression

UNICODE_STRING