CComBSTR::Length

CComBSTR::Length

 

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


unsigned int Length( ) const throw( );

The length of the m_str member.

Example

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

unsigned int len = bstrTemp.Length();

ATLASSERT(len == 11);

Requirements

Header: atlbase.h

Show:
© 2016 Microsoft