CComBSTR::AppendBSTR
Appends the specified BSTR to m_str.
HRESULT AppendBSTR(
BSTR p
) throw( );
Parameters
- p
[in] A BSTR to append.
Return Value
S_OK on success, or any standard HRESULT error value.
Remarks
Do not pass an ordinary wide-character string to this method. The compiler cannot catch the error and run time errors will occur.
Example
CComBSTR bstrPre(OLESTR("Hello "));
CComBSTR bstrSuf(OLESTR("World!"));
HRESULT hr;
// Appends "World!" to "Hello "
hr = bstrPre.AppendBSTR(bstrSuf);
// Displays a message box with text "Hello World!"
::MessageBox(NULL, CW2CT(bstrPre), NULL, MB_OK);
Requirements
Header: atlcomcli.h