CComBSTR::AppendBytes

更新 : 2007 年 11 月

指定したバイト数のデータを変換せずに m_str に追加します。

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

パラメータ

  • lpsz
    [入力] 追加するバイトの配列へのポインタ。

  • p
    [入力] 追加するバイト数。

戻り値

正常に終了した場合は、S_OK を返します。それ以外の場合は、標準の HRESULT エラー値を返します。

使用例

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

必要条件

ヘッダー : atlcomcli.h

参照

参照

CComBSTR クラス

CComBSTR::Append

CComBSTR::operator +=

CComBSTR::operator +=

その他の技術情報

CComBSTR のメンバ