MultiByteToWideChar(3w)

MultiByteToWideChar3w

Usage

INT MultiByteToWideChar
(
UINT page,
DWORD flags,
LPCSTR src,
INT srclen,
LPWSTR dst,
INT dstlen
)

Overview

Convert a multibyte character string into a Unicode string.

Params

page [In] Codepage character set to convert from.

flags [In] Character mapping flags.

src [In] Source string buffer.

srclen [In] Length of src (in bytes), or -1 if src is NUL terminated.

dst [Out] Destination buffer.

dstlen [In] Length of dst (in WCHARs), or 0 to compute the required length.

Returns

Success: If dstlen > 0, the number of characters written to dst. If dstlen == 0, the number of characters needed to perform the conversion. In both cases the count includes the terminating NUL.

Failure: 0. Use GetLastError(3w) to determine the cause. Possible errors are ERROR_INSUFFICIENT_BUFFER, if not enough space is available in dst and dstlen != 0; ERROR_INVALID_PARAMETER, if an invalid parameter is passed, and ERROR_NO_UNICODE_TRANSLATION if no translation is possible for src.

Implementation

Declared in "winnls.h".

Implemented in "dlls/kernel32/locale.c".

Debug channel "nls".

Releases

6 releases since Debian 2.0 (Hamm); the text changed 5 times.

  1. 2.0
  2. 2.1
  3. 4.0
  4. 5.0
  5. 6.0
  6. 7

From libwine-dev 1.4.1-4 in Debian 7 (Wheezy). Parsed by carta from the page's man source.