다음을 통해 공유


CComBSTR::AppendBytes

지정 된 바이트 수가 추가 m_str 변환 하지 않고.

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

매개 변수

  • lpsz
    [in] 추가 하는 바이트 배열에 대 한 포인터입니다.

  • p
    [in] 추가 바이트 수입니다.

반환 값

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

요구 사항

헤더: atlbase.h

참고 항목

참조

CComBSTR 클래스

CComBSTR::Append

CComBSTR::operator +=

CComBSTR::operator +=