Modifier

Partager via


FsRtlIsNameInExpression function (ntifs.h)

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

Syntax

BOOLEAN FsRtlIsNameInExpression(
  [in]           PUNICODE_STRING Expression,
  [in]           PUNICODE_STRING Name,
  [in]           BOOLEAN         IgnoreCase,
  [in, optional] PWCH            UpcaseTable
);

Parameters

[in] Expression

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

[in] Name

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

[in] IgnoreCase

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

[in, optional] 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

Requirement Value
Minimum supported client This routine is Windows 2000
Target Platform Universal
Header ntifs.h (include FltKernel.h, Ntifs.h)
Library NtosKrnl.lib
DLL NtosKrnl.exe
IRQL PASSIVE_LEVEL
DDI compliance rules HwStorPortProhibitedDDIs(storport), PowerIrpDDis(wdm)

See also

FsRtlIsDbcsInExpression

UNICODE_STRING