Expand Minimize

EngWideCharToMultiByte function

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

Syntax


INT EngWideCharToMultiByte(
  _In_      UINT   CodePage,
  _In_opt_  LPWSTR WideCharString,
  _In_      INT    BytesInWideCharString,
  _Out_opt_ LPSTR  MultiByteString,
  _In_      INT    BytesInMultiByteString
);

Parameters

CodePage [in]

Specifies the code page to use to perform the translation.

WideCharString [in, optional]

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

BytesInWideCharString [in]

Specifies the size, in bytes, of WideCharString.

MultiByteString [out, optional]

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

BytesInMultiByteString [in]

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

Target platform

Universal

Version

Available in Windows 2000 and later versions of the Windows operating systems.

Header

Winddi.h (include Winddi.h)

Library

Win32k.lib

DLL

Win32k.sys

See also

EngMultiByteToWideChar
EngUnicodeToMultiByteN

 

 

Send comments about this topic to Microsoft

Show:
© 2015 Microsoft