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

# RtlAnsiStringToUnicodeString(3w)

## NAME

**RtlAnsiStringToUnicodeString** (NTDLL.@)

## SYNOPSIS

NTSTATUS RtlAnsiStringToUnicodeString\
  (\
   PUNICODE\_STRING *uni*,\
   PCANSI\_STRING   *ansi*,\
   BOOLEAN         *doalloc*\
  )

## PARAMS

*uni* **\[In/Out\]**  Destination for the unicode string.

*ansi* **\[In\]**  Ansi string to be converted.

*doalloc* **\[In\]**  **TRUE**=Allocate new buffer for *uni*,**FALSE**=Use existing buffer.

## DESCRIPTION

Converts an *ansi* string to a unicode string.

## RETURNS

**Success:** **STATUS\_SUCCESS**. *uni* contains the converted string

**Failure:** **STATUS\_BUFFER\_OVERFLOW**, if *doalloc* is **FALSE** and *ansi* is too small. **STATUS\_NO\_MEMORY**, if *doalloc* is **TRUE** and the allocation fails. **STATUS\_INVALID\_PARAMETER\_2**, if the unicode string would be larger than **65535.**

## NOTES

This function always writes a terminating **' '**.

## IMPLEMENTATION

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

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

Debug channel **"ntdll"**.
