RtlUnicodeStringToAnsiSize macro

The RtlUnicodeStringToAnsiSize routine returns the number of bytes required for a null-terminated ANSI string that is equivalent to a specified Unicode string.

Syntax

void RtlUnicodeStringToAnsiSize(
   STRING
);

Parameters

STRING

Pointer to the Unicode string for which to compute the number of bytes required for an equivalent null-terminated ANSI string.

Return Value

If the Unicode string can be translated into an ANSI string using the current system locale information, RtlUnicodeStringToAnsiSize returns the number of bytes required for an equivalent null-terminated ANSI string. Otherwise, RtlUnicodeStringToAnsiSize returns zero.

Remarks

The Unicode string is interpreted for the current system locale.

RtlUnicodeStringToAnsiSize performs the same operation as RtlxUnicodeStringToAnsiSize, but executes faster if the system does not use multibyte code pages.

Requirements

   
Minimum supported client Available in Windows 2000 and later versions of Windows.
Target Platform Universal
Header wdm.h (include Wdm.h, Ntddk.h, Ntifs.h)
Library NtosKrnl.lib
DLL NtosKrnl.exe
IRQL PASSIVE_LEVEL

See Also

RtlxUnicodeStringToAnsiSize