RtlAnsiStringToUnicodeSize macro

The RtlAnsiStringToUnicodeSize routine returns the number of bytes required to hold an ANSI string converted into a Unicode string.

Syntax

void RtlAnsiStringToUnicodeSize(
   STRING
);

Parameters

STRING

Pointer to a buffer containing the ANSI string.

Return Value

RtlAnsiStringToUnicodeSize returns the necessary size in bytes for a Unicode string buffer.

Remarks

 Casting the return value of the RtlAnsiStringToUnicodeSize routine to USHORT might cause a loss of data. To avoid potential problems, callers of this routine should test the return value for arithmetic overflow. Note that RtlAnsiStringToUnicodeSize accounts for the trailing NULL.

Callers of RtlAnsiStringToUnicodeSize must be running at IRQL = PASSIVE_LEVEL.

Requirements

   
Minimum supported client Available starting with Windows 2000.
Target Platform Universal
Header wdm.h (include Wdm.h, Ntddk.h, Ntifs.h)
Library NtosKrnl.lib
DLL NtosKrnl.exe
IRQL PASSIVE_LEVEL

See Also

RtlAnsiStringToUnicodeString

RtlxAnsiStringToUnicodeSize