CComBSTR::Length

unsigned int Length( ) const;

Return Value

The length of the m_str member.

Remarks

Returns the number of characters in m_str, excluding the terminating null character.

Example

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

unsigned int len = bstrTemp.Length();

_ASSERTE(len == 11);

CComBSTR OverviewClass Members