Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
RtlUnicodeStringToOemString

RtlUnicodeStringToOemString function

Converts the specified Unicode source string into an OEM string. The translation is done with respect to the OEM code page (OCP).

Syntax


NTSTATUS WINAPI RtlUnicodeStringToOemString(
  _Out_ POEM_STRING     DestinationString,
  _In_  PUNICODE_STRING SourceString,
  _In_  BOOLEAN         AllocateDestinationString
);

Parameters

DestinationString [out]

A pointer to an OEM_STRING structure that is contains the OEM equivalent to the Unicode source string. The MaximumLength field is set if AllocateDestinationString is TRUE.

SourceString [in]

A pointer to an UNICODE_STRING structure that is to be converted to OEM.

AllocateDestinationString [in]

Controls allocation of the buffer space for the destination string.

TRUE

Buffer space is allocated for DestinationString. If set to TRUE, the buffer must be deallocated using RtlFreeUnicodeString.

FALSE

Buffer space is not allocated for DestinationString.

Return value

The various NTSTATUS values are defined in NTSTATUS.H, which is distributed with the Windows DDK.

Return codeDescription
STATUS_SUCCESS

The Unicode string was converted to OEM. Otherwise, no storage was allocated, and no conversion was done.

 

Remarks

This routine allocates a buffer for the DestinationString only.

Requirements

Minimum supported client

Windows 2000 Professional [desktop apps only]

Minimum supported server

Windows 2000 Server [desktop apps only]

Header

Winternl.h

DLL

Ntdll.dll

 

 

Community Additions

ADD
Show:
© 2015 Microsoft