The default constructor sets the m_str data member to NULL. The copy constructor copies the BSTR member of pSrc to m_str. The other four constructors copy the specified string to m_str; however, if you pass a value for nSize, the constructor will only copy the nSize characters, followed by a terminating null character.The destructor frees the string pointed to by m_str.
At a Glance
Header file: | Atlbase.h |
Windows CE versions: | 2.0 and later |
Complete documentation: | Visual C++ documentation |
Syntax
CComBSTR( );
CComBSTR( int nSize, LPCOLESTR sz = NULL );
CComBSTR( int nSize, LPCSTR sz = NULL );
CComBSTR( LPCOLESTR pSrc );
CComBSTR( LPCSTR pSrc );
CComBSTR( const CComBSTR& src );