RtlFreeUnicodeString - NtDoc

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

/**
 * The RtlFreeUnicodeString routine releases storage that was allocated by RtlAnsiStringToUnicodeString or RtlUpcaseUnicodeString.
 *
 * \param UnicodeString A pointer to the string buffer.
 * \sa https://learn.microsoft.com/en-us/windows-hardware/drivers/ddi/wdm/nf-wdm-rtlfreeunicodestring
 */
NTSYSAPI
VOID
NTAPI
RtlFreeUnicodeString(
    _Inout_ _At_(UnicodeString->Buffer, _Frees_ptr_opt_) PUNICODE_STRING UnicodeString
    );

#endif

View code on GitHub
// wdm.h

NTSYSAPI VOID RtlFreeUnicodeString(
  [in, out] PUNICODE_STRING UnicodeString
);

View the official Windows Driver Kit DDI reference
// winternl.h

VOID RtlFreeUnicodeString(
  [in, out] PUNICODE_STRING UnicodeString
);

View the official Win32 API reference

NtDoc

This function is documented in Windows Driver Kit.

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

RtlFreeUnicodeString function

Description

The RtlFreeUnicodeString routine releases storage that was allocated by RtlAnsiStringToUnicodeString or RtlUpcaseUnicodeString.

Parameters

UnicodeString [in, out]

Pointer to the Unicode string buffer previously allocated by RtlAnsiStringToUnicodeString or RtlUpcaseUnicodeString.

Return value

None

Remarks

This routine does not release the ANSI string buffer passed to RtlAnsiStringToUnicodeString.

See also

RtlAnsiStringToUnicodeString

RtlUpcaseUnicodeString


Win32 API reference (nf-winternl-rtlfreeunicodestring)

RtlFreeUnicodeString function

Description

Frees the string buffer allocated by RtlAnsiStringToUnicodeString or by RtlUpcaseUnicodeString.

Parameters

UnicodeString [in, out]

A pointer to the Unicode string whose buffer was previously allocated by RtlAnsiStringToUnicodeString.

Remarks

This routine does not release the ANSI string buffer passed to RtlAnsiStringToUnicodeString or RtlUpcaseUnicodeString.

Because there is no import library for this function, you must use GetProcAddress.