#ifndef _NTRTL_H
NTSYSAPI
NTSTATUS
NTAPI
RtlCharToInteger(
_In_z_ PCSTR String,
_In_opt_ ULONG Base,
_Out_ PULONG Value
);
View code on GitHub// ntddk.h
NTSYSAPI NTSTATUS RtlCharToInteger(
[in] PCSZ String,
[in, optional] ULONG Base,
[out] PULONG Value
);
View the official Windows Driver Kit DDI reference// winternl.h
NTSTATUS RtlCharToInteger(
[in] PCSZ String,
[in, optional] ULONG Base,
[out] PULONG Value
);
View the official Win32 API referenceThis function is documented in Windows Driver Kit.
The RtlCharToInteger routine converts a single-byte character string to an integer value in the specified base.
String [in]Pointer to a null-terminated, single-byte character string.
Base [in, optional]Specifies decimal, binary, octal, or hexadecimal base. If this parameter is not given, the routine will look for 0x, 0o, and 0b prefixes in the input string to determine if the base should be decimal (default), binary, octal, or hexadecimal.
Value [out]Pointer to a location to which the converted value is returned.
RtlCharToInteger returns STATUS_SUCCESS if the given character string is converted. Otherwise, it can return STATUS_INVALID_PARAMETER.
RtlCharToInteger converts ANSI alphanumeric characters.
Converts a character string to an integer.
String [in]A pointer to the string to convert. The format of the string is as follows:
[whitespace] [{+ | -}] [0 [{x | o | b}]] [digits]
Base [in, optional]ULONG that contains the number base to use for the conversion, such as base 10. Only base 2, 8, 10, and 16 are supported.
Value [out]A pointer to a ULONG that receives the integer that resulted from the conversion.
If the function succeeds, the function returns STATUS_SUCCESS.
When converting strings to integers the preferred function to use is strtol, wcstol.
There is no import library for this function. Use GetProcAddress rather than linking to the function directly.