CComBSTR::Length

終端の NULL 文字を除いた m_str の文字数を返します。

unsigned int Length( ) const throw( );

戻り値

m_str メンバーの長さを返します。

使用例

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

unsigned int len = bstrTemp.Length();

ATLASSERT(len == 11);

必要条件

ヘッダー: atlbase.h

参照

関連項目

CComBSTR クラス