EngWideCharToMultiByte function (winddi.h)

The EngWideCharToMultiByte function converts a wide character string into an ANSI source string using the specified code page.

Syntax

ENGAPI INT EngWideCharToMultiByte(
  [in]            UINT   CodePage,
  [in, optional]  LPWSTR WideCharString,
  [in]            INT    BytesInWideCharString,
  [out, optional] LPSTR  MultiByteString,
  [in]            INT    BytesInMultiByteString
);

Parameters

[in] CodePage

Specifies the code page to use to perform the translation.

[in, optional] WideCharString

Pointer to a buffer containing the wide character string to be translated.

[in] BytesInWideCharString

Specifies the size, in bytes, of WideCharString.

[out, optional] MultiByteString

Pointer to a buffer into which the translated character string is to be copied

[in] BytesInMultiByteString

Specifies the number of bytes in MultiByteString. If MultiByteString is not large enough to contain the translation, EngWideCharToMultiByte truncates the string, and does not report an error.

Return value

EngWideCharToMultiByte returns the number of bytes converted into multibyte form, if successful. Otherwise, it returns -1.

Requirements

Requirement Value
Minimum supported client Available in Windows 2000 and later versions of the Windows operating systems.
Target Platform Universal
Header winddi.h (include Winddi.h)
Library Win32k.lib
DLL Win32k.sys

See also

EngMultiByteToWideChar

EngUnicodeToMultiByteN