RtlUnicodeStringToAnsiSize routine

The RtlMultiByteToUnicodeSize routine determines the number of bytes that are required to store the ANSI translation for the specified Unicode string.

Syntax


ULONG RtlUnicodeStringToAnsiSize(
   PUNICODE_STRING UnicodeString
);

Parameters

UnicodeString

Pointer to a caller-allocated Unicode string.

Return value

RtlUnicodeStringToAnsiSize returns the number of bytes that are required to contain a given Unicode string when it has been translated into an ANSI string.

Remarks

RtlUnicodeStringToAnsiSize can be called to determine how much memory to allocate when translating a Unicode string to ANSI with RtlUnicodeStringToAnsiString. The returned value includes space for a NULL terminator for the ANSI string.

For information about other string-handling routines, see Strings.

Requirements

Target platform

Universal

Header

Ntifs.h (include Ntifs.h)

Library

NtosKrnl.lib

DLL

NtosKrnl.exe

IRQL

< DISPATCH_LEVEL

See also

RtlAnsiStringToUnicodeSize
RtlUnicodeStringToAnsiString
UNICODE_STRING

 

 

Send comments about this topic to Microsoft

Show: