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

# RtlCharToInteger(3w)

## NAME

**RtlCharToInteger** (NTDLL.@)

## SYNOPSIS

NTSTATUS RtlCharToInteger\
  (\
   PCSZ   *str*,\
   ULONG  *base*,\
   ULONG\* *value*\
  )

## PARAMS

*str* **\[In\]**  **' '** terminated single-byte string containing a number.

*base* **\[In\]**  Number *base* for conversion (allowed **0**,2,8,10 or **16**).

*value* **\[Out\]**  Destination for the converted *value*.

## DESCRIPTION

Converts a character string into its integer equivalent.

## RETURNS

**Success:** **STATUS\_SUCCESS**. *value* contains the converted number

**Failure:** **STATUS\_INVALID\_PARAMETER**, if *base* is not **0**, **2**, **8**, **10** or **16.** **STATUS\_ACCESS\_VIOLATION**, if *value* is **NULL**.

## NOTES

For *base* **0** it uses **10** as *base* and the string should be in the format **"{whitespace} \[+\|-\] \[0\[x\|o\|b\]\] {digits}"**. For other bases the string should be in the format **"{whitespace} \[+\|-\] {digits}"**. No check is made for *value* overflow, only the lower **32** bits are assigned. If *str* is **NULL** it crashes, as the native function does.

## DIFFERENCES

This function does not read garbage behind **' '** as the native version does.

## IMPLEMENTATION

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

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

Debug channel **"ntdll"**.
