The RtlAnsiStringToUnicodeSize routine returns the number of bytes required to hold an ANSI string converted into a Unicode string.
ULONG
RtlAnsiStringToUnicodeSize(
IN PANSI_STRING AnsiString
);
RtlAnsiStringToUnicodeSize returns the necessary size in bytes for a Unicode string buffer.
Declared in wdm.h and ntddk.h. Include wdm.h or ntddk.h.
Callers of RtlAnsiStringToUnicodeSize must be running at IRQL = PASSIVE_LEVEL.