RtlAnsiStringToUnicodeSize macro (wdm.h)
The RtlAnsiStringToUnicodeSize routine returns the number of bytes required to hold an ANSI string converted into a Unicode string.
Syntax
//
// NTSYSAPI
// ULONG
// NTAPI
// RtlAnsiStringToUnicodeSize(
// PANSI_STRING AnsiString
// );
//
#define RtlAnsiStringToUnicodeSize(STRING) ( \
RtlxAnsiStringToUnicodeSize(STRING) \
)
Parameters
[in] STRING
Pointer to a buffer containing the ANSI string.
Return value
None
Remarks
RtlAnsiStringToUnicodeSize returns a ULONG value containing the number of bytes required to hold an ANSI string converted into a Unicode string.
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
Requirement | Value |
---|---|
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 |