Export (0) Print
Expand All
Expand Minimize

RtlAnsiStringToUnicodeSize routine

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

Syntax


ULONG RtlAnsiStringToUnicodeSize(
  _In_  PANSI_STRING AnsiString
);

Parameters

AnsiString [in]

Pointer to a buffer containing the ANSI string.

Return value

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

Remarks

Note  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

Version

Available starting with Windows 2000.

Header

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

Library

Ntoskrnl.lib

IRQL

PASSIVE_LEVEL

See also

RtlAnsiStringToUnicodeString
RtlxAnsiStringToUnicodeSize

 

 

Send comments about this topic to Microsoft

Show:
© 2014 Microsoft