#ifndef _NTRTL_H
/**
* The RtlCreateUnicodeString routine creates a new counted Unicode string.
*
* \param DestinationString Pointer to the newly allocated and initialized Unicode string.
* \param SourceString Pointer to a null-terminated Unicode string with which to initialize the new string.
* \return TRUE if the Unicode string was successfully created, FALSE otherwise.
* \sa https://learn.microsoft.com/en-us/windows-hardware/drivers/ddi/ntifs/nf-ntifs-rtlcreateunicodestring
*/
_Success_(return != 0)
_Must_inspect_result_
NTSYSAPI
BOOLEAN
NTAPI
RtlCreateUnicodeString(
_Out_ PUNICODE_STRING DestinationString,
_In_z_ PCWSTR SourceString
);
View code on GitHub// ntifs.h
NTSYSAPI BOOLEAN RtlCreateUnicodeString(
[out] PUNICODE_STRING DestinationString,
[in] PCWSTR SourceString
);
View the official Windows Driver Kit DDI referenceThis function is documented in Windows Driver Kit.
The RtlCreateUnicodeString routine creates a new counted Unicode string.
DestinationString [out]Pointer to the newly allocated and initialized Unicode string.
SourceString [in]Pointer to a null-terminated Unicode string with which to initialize the new string.
RtlCreateUnicodeString returns TRUE if the Unicode string was successfully created, FALSE otherwise.
The DestinationString is allocated from paged pool. The caller is responsible for freeing the DestinationString by calling RtlFreeUnicodeString.
For information about other string-handling routines, see the string manipulation functions in Run-Time Library (RTL) Routines.