---
name: "RtlDuplicateUnicodeString"
section: "3w"
platform: "linux"
package: "libwine-dev"
version: "1.4.1-4"
release: "Debian 7 (Wheezy)"
platforms: ["linux"]
url: "https://new.carta.tech/RtlDuplicateUnicodeString"
---

# RtlDuplicateUnicodeString(3w)

## NAME

**RtlDuplicateUnicodeString** (NTDLL.@)

## SYNOPSIS

NTSTATUS RtlDuplicateUnicodeString\
  (\
   int                   *add\_nul*,\
   const UNICODE\_STRING\* *source*,\
   UNICODE\_STRING\*       *destination*\
  )

## PARAMS

*add\_nul* **\[In\]**  flag.

*source* **\[In\]**  Unicode string to be duplicated.

*destination* **\[Out\]**  *destination* for the duplicated unicode string.

## DESCRIPTION

Duplicates a unicode string.

## RETURNS

**Success:** **STATUS\_SUCCESS**. *destination* contains the duplicated unicode string.

**Failure:** **STATUS\_INVALID\_PARAMETER**, if one of the parameters is illegal. **STATUS\_NO\_MEMORY**, if the allocation fails.

## NOTES

For *add\_nul* there are several possible values: 0 = *destination* will not be **' '** terminated, 1 = *destination* will be **' '** terminated, 3 = like **1** but for an empty *source* string produce **' '** terminated empty Buffer instead of assigning **NULL** to the Buffer. Other *add\_nul* values are invalid.

## IMPLEMENTATION

Declared in **"winternl.h"**.

Implemented in **"dlls/ntdll/rtlstr.c"**.

Debug channel **"ntdll"**.
