Поделиться через


UnicodeToBytes function

Deprecated. Converts Unicode characters to GB18030 bytes.

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

 

Syntax

DWORD UnicodeToBytes(
  _In_ LPWSTR lpWideCharStr,
  _In_ UINT   cchWideChar,
  _In_ LPSTR  lpMultiByteStr,
  _In_ UINT   cchMultiByte
);

Parameters

  • lpWideCharStr [in]
    Pointer to the Unicode string to convert.

  • cchWideChar [in]
    Character count of the Unicode string to convert.

  • lpMultiByteStr [in]
    Pointer to the target multibyte buffer. If lpMultiByteStr is 0, the byte count of the GB18030 result is returned, and no conversion is done.

  • cchMultiByte [in]
    Byte count of the target multibyte buffer. If cchMultiByte is 0, the byte count of the GB18030 result is returned, and no conversion is done.

Return value

Returns the byte count of the multibyte characters that are generated, if successful.

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