The RtlUnicodeStringToAnsiString routine converts a given Unicode string into an ANSI string.
NTSTATUS
RtlUnicodeStringToAnsiString(
IN OUT PANSI_STRING DestinationString,
IN PUNICODE_STRING SourceString,
IN BOOLEAN AllocateDestinationString
);
If the conversion succeeds, RtlUnicodeStringToAnsiString returns STATUS_SUCCESS. Otherwise, no storage was allocated, and no conversion was done.
Declared in wdm.h and ntddk.h. Include wdm.h or ntddk.h.
The translation is done in accord with the current system-locale information.
Callers of RtUnicodeStringToAnsiString must be running at IRQL = PASSIVE_LEVEL.
ANSI_STRING, UNICODE_STRING, RtlAnsiStringToUnicodeString, RtlFreeAnsiString