RtlAnsiStringToUnicodeString converts the given ANSI source string into a Unicode string.
NTSTATUS
RtlAnsiStringToUnicodeString(
IN OUT PUNICODE_STRING DestinationString,
IN PANSI_STRING SourceString,
IN BOOLEAN AllocateDestinationString
);
If the conversion succeeds, RtlAnsiStringToUnicodeString returns STATUS_SUCCESS. On failure, the routine does not allocate any memory.
Declared in wdm.h and ntddk.h. Include wdm.h or ntddk.h.
The translation conforms to the current system locale information.
If caller sets AllocateDestinationString to TRUE, the routine replaces the Buffer member of DestinationString with a pointer to the buffer it allocates. The old value can be overwritten even when the routine returns an error status code.
Callers of RtlAnsiStringToUnicodeString must be running at IRQL = PASSIVE_LEVEL.
ANSI_STRING, UNICODE_STRING, RtlAnsiStringToUnicodeSize, RtlFreeUnicodeString, RtlInitAnsiString, RtlUnicodeStringToAnsiString