RtlUpcaseUnicodeToMultiByteN - NtDoc

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

/**
 * The RtlUpcaseUnicodeToMultiByteN routine translates the specified Unicode string into a new uppercase character string, using the current system ANSI code page (ACP).
 * The translated string is not necessarily from a multibyte character set.
 *
 * \param MultiByteString Pointer to a caller-allocated buffer to receive the translated string.
 * \param MaxBytesInMultiByteString Maximum number of bytes to be written at MultiByteString. If this value causes the translated string to be truncated, RtlUpcaseUnicodeToMultiByteN does not return an error status.
 * \param BytesInMultiByteString Pointer to a caller-allocated variable that receives the length, in bytes, of the translated string. This parameter can be NULL.
 * \param UnicodeString Pointer to the Unicode source string to be translated.
 * \param BytesInUnicodeString Size, in bytes, of the string at UnicodeString.
 * \return NTSTATUS Successful or errant status.
 * \sa https://learn.microsoft.com/en-us/windows-hardware/drivers/ddi/ntifs/nf-ntifs-rtlupcaseunicodetomultibyten
 */
NTSYSAPI
NTSTATUS
NTAPI
RtlUpcaseUnicodeToMultiByteN(
    _Out_writes_bytes_to_(MaxBytesInMultiByteString, *BytesInMultiByteString) PCHAR MultiByteString,
    _In_ ULONG MaxBytesInMultiByteString,
    _Out_opt_ PULONG BytesInMultiByteString,
    _In_reads_bytes_(BytesInUnicodeString) PCWCH UnicodeString,
    _In_ ULONG BytesInUnicodeString
    );

#endif

View code on GitHub
// ntifs.h

NTSYSAPI NTSTATUS RtlUpcaseUnicodeToMultiByteN(
  [out]           PCHAR  MultiByteString,
  [in]            ULONG  MaxBytesInMultiByteString,
  [out, optional] PULONG BytesInMultiByteString,
  [in]            PCWCH  UnicodeString,
  [in]            ULONG  BytesInUnicodeString
);

View the official Windows Driver Kit DDI reference

NtDoc

This function is documented in Windows Driver Kit.

Windows Driver Kit DDI reference (nf-ntifs-rtlupcaseunicodetomultibyten)

RtlUpcaseUnicodeToMultiByteN function

Description

The RtlUpcaseUnicodeToMultiByteN routine translates the specified Unicode string into a new uppercase character string, using the current system ANSI code page (ACP). The translated string is not necessarily from a multibyte character set.

Parameters

MultiByteString [out]

Pointer to a caller-allocated buffer to receive the translated string.

MaxBytesInMultiByteString [in]

Maximum number of bytes to be written at MultiByteString. If this value causes the translated string to be truncated, RtlUpcaseUnicodeToMultiByteN does not return an error status.

BytesInMultiByteString [out, optional]

Pointer to a caller-allocated variable that receives the length, in bytes, of the translated string. This parameter can be NULL.

UnicodeString [in]

Pointer to the Unicode source string to be translated.

BytesInUnicodeString [in]

Size, in bytes, of the string at UnicodeString.

Return value

RtlUpcaseUnicodeToMultiByteN returns STATUS_SUCCESS.

Remarks

RtlUpcaseUnicodeToMultiByteN translates the given Unicode string using the current system ANSI code page installed at system boot time and converts the translated string to uppercase.

This routine does not modify the source string. It returns a NULL-terminated ANSI string if the given BytesInUnicodeString included a NULL terminator and if the given MaxBytesInMultiByteString did not cause truncation.

For information about other string-handling routines, see Run-Time Library (RTL) Routines.

See also

RtlMultiByteToUnicodeN

RtlUnicodeToMultiByteN

RtlUnicodeToMultiByteSize