EngMultiByteToWideChar function (winddi.h)

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

Syntax

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

Parameters

[in] CodePage

Specifies the code page to use to perform the translation.

[out, optional] WideCharString

Pointer to the buffer into which the translated character string is copied.

[in] BytesInWideCharString

Specifies the size, in bytes, of WideCharString. If WideCharString is not large enough to contain the translation, EngMultiByteToWideChar truncates the string, and does not report an error.

[in, optional] MultiByteString

Pointer to the buffer containing the multibyte string to be translated.

[in] BytesInMultiByteString

Specifies the number of bytes in MultiByteString.

Return value

The EngMultiByteToWideChar function returns the number of bytes it converted to wide character form, if successful. Otherwise, the function 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

EngUnicodeToMultiByteN

EngWideCharToMultiByte