CComBSTR::AppendBytes

追加指定的字节数。m_str,不进行转换。

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

参数

  • lpsz
    [out]一个指向附加指针字节。

  • p
    [in]追加的字节数。

返回值

在成功的S_OK,或者任何标准 HRESULT false值。

示例

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);   

要求

Header: atlbase.h

请参见

参考

CComBSTR 类

CComBSTR::Append

CComBSTR::operator +=

CComBSTR::operator +=