Previous Next

RtlUnicodeStringToAnsiSize

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

ULONG
  RtlUnicodeStringToAnsiSize(
    PUNICODE_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, RtlUnicodeStringToAnsiSize returns the number of bytes required for an equivalent NULL-terminated ANSI string. Otherwise, RtlUnicodeStringToAnsiSize returns zero.

Headers

Declared in wdm.h. Include wdm.h.

Comments

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.

RtlUnicodeStringToAnsiSize runs at IRQL = PASSIVE_LEVEL.

See Also

RtlxUnicodeStringToAnsiSize