CComBSTR( );
CComBSTR( int nSize );
CComBSTR( int nSize, LPCOLESTR sz );
CComBSTR( int nSize, LPCSTR sz );
CComBSTR( LPCOLESTR pSrc );
CComBSTR( LPCSTR pSrc );
CComBSTR( const CComBSTR& src );
Parameters
nSize
[in] The number of characters to copy from sz.
sz
[in] A string to copy. The Unicode version specifies an LPCOLESTR; the ANSI version specifies an LPCSTR. Only nSize characters will be copied. The default value is NULL.
pSrc
[in] A string to copy. The Unicode version specifies an LPCOLESTR; the ANSI version specifies an LPCSTR.
src
[in] A CComBSTR object.
Remarks
The default constructor sets the m_str member to NULL. The copy constructor sets m_str to a copy of the BSTR member of src.
The other four constructors set m_str to a copy of the specified string; however, if you pass a value for nSize, then only nSize characters will be copied, followed by a terminating null character.
The destructor frees the string pointed to by m_str.