다음을 통해 공유


CComBSTR::AppendBSTR

지정 된 추가 BSTRm_str.

HRESULT AppendBSTR( 
   BSTR p  
) throw( );

매개 변수

  • p
    [in] A BSTR 를 추가 합니다.

반환 값

S_OK성공, 또는 표준 HRESULT 오류 값입니다.

설명

일반 와이드 문자 문자열을이 메서드에 전달 하지 않습니다. 컴파일러 오류를 catch 수 없으며 런타임 오류가 발생 합니다.

예제

CComBSTR bstrPre(OLESTR("Hello "));
CComBSTR bstrSuf(OLESTR("World!"));
HRESULT hr;

// Appends "World!" to "Hello "
hr = bstrPre.AppendBSTR(bstrSuf);

// Displays a message box with text "Hello World!"
::MessageBox(NULL, CW2CT(bstrPre), NULL, MB_OK);   

요구 사항

헤더: atlbase.h

참고 항목

참조

CComBSTR 클래스

CComBSTR::Append

CComBSTR::operator +=

개념

ATL and MFC String Conversion Macros