Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

CComBSTR::AppendBytes

 

Appends the specified number of bytes to m_str without conversion.


      HRESULT AppendBytes(
   const char* lpsz,
   int nLen
) throw( );

lpsz

[in] A pointer to an array of bytes to append.

p

[in] The number of bytes to append.

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

Show: