RtlInt64ToUnicodeString(3w)

RtlInt64ToUnicodeString3w

Usage

NTSTATUS RtlInt64ToUnicodeString
(
ULONGLONG value,
ULONG base,
UNICODE_STRING* str
)

Params

value [In] Value to be converted.

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

str [Out] Destination for the converted value.

Overview

Convert a large unsigned integer to a ' ' terminated unicode string.

Returns

Success: STATUS_SUCCESS. str contains the converted number

Failure: STATUS_INVALID_PARAMETER, if base is not 0, 2, 8, 10 or 16. STATUS_BUFFER_OVERFLOW, if str is too small to hold the string (with the ' ' termination). In this case str->Length is set to the length, the string would have (which can be larger than the MaximumLength).

Notes

Instead of base 0 it uses 10 as base. If str is NULL it crashes, as the native function does.

Differences

- Accept base 0 as 10 instead of crashing as native function does.

- Do not return STATUS_BUFFER_OVERFLOW when the string is long enough. The native function does this when the string would be longer than 31 characters even when the string parameter is long enough.

- The native function does produce garbage or STATUS_BUFFER_OVERFLOW for base 2, 8 and 16 when the value is larger than 0xFFFFFFFF.

Implementation

Declared in "winternl.h".

Implemented in "dlls/ntdll/large_int.c".

Releases

4 releases since Debian 4.0 (Etch); the text changed 3 times.

  1. 4.0
  2. 5.0
  3. 6.0
  4. 7

From libwine-dev 1.4.1-4 in Debian 7 (Wheezy). Parsed by carta from the page's man source.