For the latest documentation on Visual Studio 2017 RC, see Visual Studio 2017 RC Documentation.
This class is used by the string conversion macros
CT2CWEX, and the typedef
This class and its members cannot be used in applications that execute in the Windows Runtime.
template<int t_nBufferLength = 128> class CW2CWEX
The size of the buffer used in the translation process. The default length is 128 bytes.
|CW2CWEX::operator LPCWSTR||Conversion operator.|
|CW2CWEX::m_psz||The data member that stores the source string.|
Unless extra functionality is required, use
CW2W in your code.
This class is safe to use in loops and won't overflow the stack. By default, the ATL conversion classes and macros use the current thread's ANSI code page for the conversion.
The following macros are based on this class:
The following typedef is based on this class:
For a discussion of these text conversion macros, see ATL and MFC String Conversion Macros.
See ATL and MFC String Conversion Macros for an example of using these string conversion macros.
CW2CWEX(LPCWSTR psz, UINT nCodePage) throw(...); CW2CWEX(LPCWSTR psz) throw(...);
The text string to be converted.
The code page. Not used in this class.
Allocates the buffer used in the translation process.
Frees the allocated buffer.
The data member that stores the source string.
operator LPCWSTR() const throw();
Returns the text string as type LPCWSTR.