#ifndef _NTRTL_H
/**
* The RtlUpcaseUnicodeString routine converts a counted Unicode string to uppercase.
*
* \param DestinationString A pointer to the destination Unicode string. If AllocateDestinationString is `TRUE`, the buffer is allocated by the routine.
* \param SourceString A pointer to the source Unicode string.
* \param AllocateDestinationString If `TRUE`, the routine allocates the destination string buffer.
* \return NTSTATUS Successful or errant status.
* \sa https://learn.microsoft.com/en-us/windows-hardware/drivers/ddi/ntifs/nf-ntifs-rtlupcaseunicodestring
*/
NTSYSAPI
NTSTATUS
NTAPI
RtlUpcaseUnicodeString(
_When_(AllocateDestinationString, _Out_) _When_(!AllocateDestinationString, _In_) PUNICODE_STRING DestinationString,
_In_ PCUNICODE_STRING SourceString,
_In_ BOOLEAN AllocateDestinationString
);
View code on GitHub// ntddk.h
NTSYSAPI NTSTATUS RtlUpcaseUnicodeString(
[in, out] PUNICODE_STRING DestinationString,
[in] PCUNICODE_STRING SourceString,
[in] BOOLEAN AllocateDestinationString
);
View the official Windows Driver Kit DDI referenceThis function is documented in Windows Driver Kit.
The RtlUpcaseUnicodeString routine converts a copy of the source string to uppercase and writes the converted string in the destination buffer.
DestinationString [in, out]Pointer to a caller-allocated buffer for the converted Unicode string.
SourceString [in]Pointer to the source Unicode string to be converted to uppercase.
AllocateDestinationString [in]Specifies if RtlUpcaseUnicodeString is to allocate the buffer space for the DestinationString. If it does, the buffer must be deallocated by calling RtlFreeUnicodeString.
If the operation succeeds, RtlUpcaseUnicodeString returns STATUS_SUCCESS. Otherwise, no storage was allocated, and no conversion was done.