CComBSTR::ByteLength

Restituisce il numero di byte in m_str, escluso il carattere di terminazione null.

unsigned int ByteLength( ) const throw( );

Valore restituito

La lunghezza del membro m_str in byte.

Note

Restituisce 0 se m_str è NULL.

Esempio

// string with 11 chars (22 bytes)
CComBSTR bstrTemp(OLESTR("Hello World"));

unsigned int len = bstrTemp.ByteLength();

ATLASSERT(len == 22);   

Requisiti

Header: atlbase.h

Vedere anche

Riferimenti

CComBSTR (classe)

CComBSTR::Length