CComBSTR::AppendBytes
Appends the specified number of bytes to m_str without conversion.
HRESULT AppendBytes(
const char* lpsz,
int nLen
) throw( );
Parameters
lpsz
[in] A pointer to an array of bytes to append.p
[in] The number of bytes to append.
Return Value
S_OK on success, or any standard HRESULT error value.
Example
CComBSTR bstrPre(OLESTR("Hello "));
HRESULT hr;
// Appends "Wo" to "Hello " (4 bytes == 2 characters)
hr = bstrPre.AppendBytes(reinterpret_cast<char*>(OLESTR("World!")), 4);
// Displays a message box with text "Hello Wo"
::MessageBox(NULL, CW2CT(bstrPre), NULL, MB_OK);
Requirements
Header: atlbase.h