#ifndef _NTRTL_H
/**
* The RtlCopyUnicodeString routine copies a source string to a destination string.
*
* \param[in] DestinationString A pointer to the destination string buffer.
* \param[in] SourceString A pointer to the source string buffer.
* \sa https://learn.microsoft.com/en-us/windows-hardware/drivers/ddi/wdm/nf-wdm-rtlcopyunicodestring
*/
NTSYSAPI
VOID
NTAPI
RtlCopyUnicodeString(
_In_ PCUNICODE_STRING DestinationString,
_In_opt_ PCUNICODE_STRING SourceString
);
View code on GitHub// wdm.h
NTSYSAPI VOID RtlCopyUnicodeString(
[in, out] PUNICODE_STRING DestinationString,
[in, optional] PCUNICODE_STRING SourceString
);
View the official Windows Driver Kit DDI referenceThis function is documented in Windows Driver Kit.
The RtlCopyUnicodeString routine copies a source string to a destination string.
DestinationString [in, out]A pointer to the destination string buffer. This parameter points to a UNICODE_STRING structure.
SourceString [in, optional]A pointer to the source string buffer. This parameter points to a UNICODE_STRING structure.
None
If SourceString is NULL, this routine sets the Length field of the structure pointed to by DestinationString to zero.
This routine does not modify the MaximumLength and Buffer fields of the structure pointed to by DestinationString.
The number of bytes copied from the source string is either the source string length (specified by the Length member of the structure pointed to by SourceString) or the maximum length of the destination string (specified by the MaximumLength member of the structure pointed to by DestinationString), whichever is smaller.
The caller must properly initialize all members of the structure pointed to by DestinationString before calling RtlCopyUnicodeString. Failure to initialize the Length or the MaximumLength member before calling this routine can cause a buffer overrun.
The DestinationString and SourceString buffers must be resident if the caller is running at IRQL >= DISPATCH_LEVEL.