RtlInitUTF8String - NtDoc

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

NTSYSAPI
VOID
NTAPI
RtlInitUTF8String(
    _Out_ PUTF8_STRING DestinationString,
    _In_opt_z_ PCSZ SourceString
    );

#endif
#endif

View code on GitHub
// wdm.h

NTSYSAPI VOID RtlInitUTF8String(
  PUTF8_STRING          DestinationString,
  __drv_aliasesMem PCSZ SourceString
);
View the official Windows Driver Kit DDI reference

NtDoc

This function is documented in Windows Driver Kit.

Windows Driver Kit DDI reference (nf-wdm-rtlinitutf8string)

RtlInitUTF8String function

Description

The RtlInitUTF8String function initializes a counted string of UTF-8 characters.

Parameters

DestinationString

A pointer to UTF8_STRING (STRING) structure to be initialized.

SourceString

Optional pointer to a null-terminated character string. This string is used to initialize the counted string pointed to by DestinationString.

Return value

None

Remarks

The routine copies the SourceString pointer value to the Buffer member of the UTF8_STRING structure pointed to by DestinationString. The Length member of this structure is set to the length, in bytes, of the source string, excluding the terminating null. The MaximumLength member of the structure is set to the length, in bytes, of the source string, including the terminating null. If SourceString is NULL, Length and MaximumLength are both set to zero.

RtlInitUTF8String does not alter the source string pointed to by SourceString.

See also

RtlInitAnsiString