CComBSTR::ByteLength

更新 : 2007 年 11 月

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

unsigned int ByteLength( ) const throw( );

戻り値

m_str メンバの長さ (バイト数) を返します。

解説

m_strNULL の場合は 0 を返します。

使用例

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

unsigned int len = bstrTemp.ByteLength();

ATLASSERT(len == 22);   

必要条件

ヘッダー : atlcomcli.h

参照

参照

CComBSTR クラス

CComBSTR::Length

その他の技術情報

CComBSTR のメンバ