CComBSTR::Length

返回字符数。m_str的,不包括终止null字符)。

unsigned int Length( ) const throw( );

返回值

m_str 成员的长度。

示例

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

unsigned int len = bstrTemp.Length();

ATLASSERT(len == 11);

要求

Header: atlbase.h

请参见

参考

CComBSTR 类