RtlxUnicodeStringToAnsiSize function (wdm.h)

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(
  [in] PCUNICODE_STRING UnicodeString
);

Parameters

[in] 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

Requirement Value
Minimum supported client 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