NTSTATUS
RtlUnicodeStringToAnsiString(
IN OUT PANSI_STRING DestinationString, /* optional */
IN PUNICODE_STRING SourceString,
IN BOOLEAN AllocateDestinationString
);
RtlUnicodeStringToAnsiString converts a given Unicode string into an ANSI string. The translation is done in accord with the current system-locale information.
If the conversion succeeds, RtlUnicodeStringToAnsiString returns STATUS_SUCCESS. Otherwise, no storage was allocated, and no conversion was done.
Callers of RtUnicodeStringToAnsiString must be running at IRQL PASSIVE_LEVEL.