Expand Minimize

RtlUnicodeStringToAnsiSize routine

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

Syntax


ULONG RtlUnicodeStringToAnsiSize(
  _In_  PUNICODE_STRING UnicodeString
);

Parameters

UnicodeString [in]

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

Target platform

Universal

Version

Available in Windows 2000 and later versions of Windows.

Header

Wdm.h (include Wdm.h, Ntddk.h, or Ntifs.h)

Library

Ntoskrnl.lib

IRQL

PASSIVE_LEVEL

See also

RtlxUnicodeStringToAnsiSize

 

 

Send comments about this topic to Microsoft

Show:
© 2015 Microsoft