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


AtlUnicodeToUTF8

Call this function to convert a Unicode string to UTF-8.

ATL_NOINLINE inline int AtlUnicodeToUTF8(
   LPCWSTR wszSrc,
   int nSrc,
   LPSTR szDest,
   int nDest 
) throw( );

Параметры

  • wszSrc
    The Unicode string to be converted

  • nSrc
    The length in characters of the Unicode string.

  • szDest
    Caller-allocated buffer to receive the converted string.

  • nDest
    The length in bytes of the buffer.

Возвращаемое значение

Returns the number of characters for the converted string.

Заметки

To determine the size of the buffer required for the converted string, call this function passing 0 for szDest and nDest.

Требования

Header: atlenc.h

См. также

Основные понятия

ATL Concepts

ATL Reference

ATL Functions Alphabetical Reference