RtlxUnicodeStringToAnsiSize function

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

Syntax

NTSYSAPI ULONG RtlxUnicodeStringToAnsiSize(
  PCUNICODE_STRING UnicodeString
);

Parameters

UnicodeString

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, RtlxUnicodeStringToAnsiSize returns the number of bytes required for an equivalent null-terminated ANSI string. Otherwise, it returns zero.

Remarks

The Unicode string is interpreted for the current system locale.

Requirements

   
Windows version Available starting with Windows 2000.
Target Platform Universal
Header wdm.h (include Wdm.h)
Library NtosKrnl.lib
DLL NtosKrnl.exe
IRQL PASSIVE_LEVEL

See Also

RtlUnicodeStringToAnsiSize