RtlUpcaseUnicodeStringToOemString function

The RtlUpcaseUnicodeStringToOemString routine translates a given Unicode source string into an uppercase OEM string using the current system OEM code page.

Syntax

NTSYSAPI NTSTATUS RtlUpcaseUnicodeStringToOemString(
  POEM_STRING      DestinationString,
  PCUNICODE_STRING SourceString,
  BOOLEAN          AllocateDestinationString
);

Parameters

DestinationString

Pointer to a caller-allocated buffer to receive the counted OEM string. If AllocateDestinationString is FALSE, the caller must also allocate a buffer for the Buffer member of DestinationString to hold the OEM data. If AllocateDestinationString is TRUE, RtlUpcaseUnicodeStringToOemString allocates a buffer large enough to hold the string, passes a pointer to it in Buffer, and updates the length and maximum length members of DestinationString accordingly.

SourceString

Pointer to the Unicode string to be translated.

AllocateDestinationString

Set to TRUE if RtlUpcaseUnicodeStringToOemString should allocate the buffer space for the DestinationString, FALSE otherwise. If this parameter is TRUE, the caller is responsible for freeing the buffer when it is no longer needed by calling RtlFreeOemString.

Return Value

RtlUpcaseUnicodeStringToOemString returns STATUS_SUCCESS if the string at DestinationString is translated. Otherwise, no storage was allocated, nor was any conversion performed.

Remarks

RtlUpcaseUnicodeStringToOemString translates the given source string using the OEM code page that was installed as the current system code page at system boot time, and converts the OEM string to uppercase.

This routine can substitute a default character in the destination string for all source string characters that it cannot map to the current code page and, then, return STATUS_SUCCESS.

This routine does not modify the source string. It returns a null-terminated OEM string.

For information about other string-handling routines, see Strings.

Requirements

   
Target Platform Universal
Header ntifs.h (include Ntifs.h)
Library NtosKrnl.lib
DLL NtosKrnl.exe
IRQL "< DISPATCH_LEVEL"

See Also

OEM_STRING

RtlFreeOemString

RtlUnicodeStringToCountedOemString

RtlUnicodeStringToOemSize

RtlUnicodeStringToOemString

RtlUpcaseUnicodeToOemN

UNICODE_STRING