BytesToUnicode function

Deprecated. Converts GB18030 bytes to Unicode characters.

Note  When converting GB18030 bytes to Unicode characters, an application to run on Windows Vista and later should use the MultiByteToWideChar function.

 

Syntax

DWORD BytesToUnicode(
  _In_  BYTE   *lpMultiByteStr,
  _In_  UINT   cchMultiByte,
  _Out_ UINT   *pcchLeftOverBytes,
  _In_  LPWSTR lpWideCharStr,
  _In_  UINT   cchWideChar
);

Parameters

  • lpMultiByteStr [in]
    Pointer to the multibyte string to convert.

  • cchMultiByte [in]
    Byte count of the multibyte string to convert.

  • pcchLeftOverBytes [out]
    Pointer to a UINT that contains GB18030 bytes at the end of the buffer that cannot be converted. These bytes could be the leading bytes of valid GB18030 bytes in the next incoming GB18030 bytes.

  • lpWideCharStr [in]
    Pointer to the target Unicode buffer. The application can set this parameter to 0 to return the required size of the GB18030 result without doing any conversion.

  • cchWideChar [in]
    Size of the target Unicode buffer. The application can set this parameter to 0 to return the required size of the GB18030 result without doing any conversion.

Return value

Returns the character count of the Unicode characters that are converted.

Requirements

Minimum supported client

Windows XP [desktop apps only]

Minimum supported server

Windows Server 2003 [desktop apps only]

Header

Gb18030.h

DLL

C_g18030.dll

See also

WideCharToMultiByte

MultiByteToWideChar