RtlPrefixUnicodeString - NtDoc

Native API online documentation, based on the System Informer (formerly Process Hacker) phnt headers
#ifndef _NTRTL_H

/**
 * The RtlPrefixUnicodeString routine compares two Unicode strings to determine whether one string is a prefix of the other.
 *
 * \param[in] String1 Pointer to the first string, which might be a prefix of the buffered Unicode string at String2.
 * \param[in] String2 Pointer to the second string.
 * \param[in] CaseInSensitive TRUE, case should be ignored when doing the comparison.
 * \return TRUE if String1 is a prefix of String2.
 * \sa https://learn.microsoft.com/en-us/windows-hardware/drivers/ddi/ntddk/nf-ntddk-rtlprefixunicodestring
 */
_Must_inspect_result_
NTSYSAPI
BOOLEAN
NTAPI
RtlPrefixUnicodeString(
    _In_ PCUNICODE_STRING String1,
    _In_ PCUNICODE_STRING String2,
    _In_ BOOLEAN CaseInSensitive
    );

#endif

View code on GitHub
// ntddk.h

NTSYSAPI BOOLEAN RtlPrefixUnicodeString(
  [in] PCUNICODE_STRING String1,
  [in] PCUNICODE_STRING String2,
  [in] BOOLEAN          CaseInSensitive
);
View the official Windows Driver Kit DDI reference
// ntddk.h

BOOLEAN RtlPrefixUnicodeString(
  _In_ PCUNICODE_STRING String1,
  _In_ PCUNICODE_STRING String2,
  _In_ BOOLEAN          CaseInSensitive
);
View the official Win32 development documentation

NtDoc

This function is documented in Windows Driver Kit.

Windows Driver Kit DDI reference (nf-ntddk-rtlprefixunicodestring)

RtlPrefixUnicodeString function

Description

The RtlPrefixUnicodeString routine compares two Unicode strings to determine whether one string is a prefix of the other.

Parameters

String1 [in]

Pointer to the first string, which might be a prefix of the buffered Unicode string at String2.

String2 [in]

Pointer to the second string.

CaseInSensitive [in]

If TRUE, case should be ignored when doing the comparison.

Return value

RtlPrefixUnicodeString returns TRUE if String1 is a prefix of String2.

See also

RtlCompareUnicodeString


Win32 development documentation (rtlprefixunicodestring)

RtlPrefixUnicodeString function

Compares two Unicode strings to determine whether one string is a prefix of the other.

Parameters

String1 [in]

Pointer to the first string, which might be a prefix of the buffered Unicode string at String2.

String2 [in]

Pointer to the second string.

CaseInSensitive [in]

If TRUE, case should be ignored when doing the comparison.

Return value

TRUE if String1 is a prefix of String2.

Requirements

Requirement Value
Minimum supported client
Windows 2000 Professional [desktop apps only]
Minimum supported server
Windows 2000 Server [desktop apps only]
Target platform
Universal
Header
Ntddk.h (include Ntddk.h)
Library
Ntdll.lib
DLL
Ntdll.dll

See also

RtlCompareUnicodeString