CComBSTR Members

Methods

Append

Appends a string to m_str.

AppendBSTR

Appends a BSTR to m_str.

AppendBytes

Appends a specified number of bytes to m_str.

ArrayToBSTR

Creates a BSTR from the first character of each element in the safearray and attaches it to the CComBSTR object.

AssignBSTR

Assigns a BSTR to m_str.

Attach

Attaches a BSTR to the CComBSTR object.

BSTRToArray

Creates a zero-based one-dimensional safearray, where each element of the array is a character from the CComBSTR object.

ByteLength

Returns the length of m_str in bytes.

CComBstr

The constructor.

~CComBstr

The destructor.

Copy

Returns a copy of m_str.

CopyTo

Returns a copy of m_str via an [out] parameter

Detach

Detaches m_str from the CComBSTR object.

Empty

Frees m_str.

Length

Returns the length of m_str.

LoadString

Loads a string resource.

ReadFromStream

Loads a BSTR object from a stream.

ToLower

Converts the string to lowercase.

ToUpper

Converts the string to uppercase.

WriteToStream

Saves m_str to a stream.

Operators

operator !

Returns true or false, depending on whether m_str is NULL.

operator !=

Compares a CComBSTR with a string.

operator &

Returns the address of m_str.

operator +=

Appends a CComBSTR to the object.

operator <

Compares a CComBSTR with a string.

operator =

Assigns a value to m_str.

operator ==

Compares a CComBSTR with a string.

operator >

Compares a CComBSTR with a string.

operator BSTR

Casts a CComBSTR object to a BSTR.

Data Members

m_str

Contains the BSTR associated with the CComBSTR object.

See Also

Reference

CComBSTR Class