CComBSTR::ByteLength

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

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);   

要求

Header: atlbase.h

请参见

参考

CComBSTR 类

CComBSTR::Length