CComBSTR::AppendBSTR

Aggiunge BSTR specificato a m_str.

HRESULT AppendBSTR(
   BSTR p 
) throw( );

Parametri

  • p
    [in] A BSTR da aggiungere.

Valore restituito

S_OK su positivo, o qualsiasi valore di errore standard HRESULT.

Note

Non passare una stringa di caratteri estesi comune a questo metodo.Il compilatore non può intercettare l'errore e gli errori di runtime si verificano.

Esempio

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

Requisiti

Header: atlbase.h

Vedere anche

Riferimenti

CComBSTR (classe)

CComBSTR::Append

CComBSTR::operator +=

Concetti

Macro per la conversione delle stringhe MFC e ATL