CComBSTR::AppendBytes

Aggiunge il numero specificato di byte a m_str senza conversione.

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

Parametri

  • lpsz
    [in] puntatore A una matrice di byte da aggiungere.

  • p
    [in] numero di byte da aggiungere.

Valore restituito

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

Esempio

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

Requisiti

Header: atlbase.h

Vedere anche

Riferimenti

CComBSTR (classe)

CComBSTR::Append

CComBSTR::operator +=

CComBSTR::operator +=