Microsoft Specific
A _bstr_t object encapsulates the BSTR data type. The class manages resource allocation and deallocation through function calls to SysAllocString and SysFreeString and other BSTR APIs when appropriate. The _bstr_t class uses reference counting to avoid excessive overhead.
| Constructor | Description |
|---|---|
_bstr_t |
Constructs a _bstr_t object. |
| Function | Description |
|---|---|
Assign |
Copies a BSTR into the BSTR wrapped by a _bstr_t. |
Attach |
Links a _bstr_t wrapper to a BSTR. |
copy |
Constructs a copy of the encapsulated BSTR. |
Detach |
Returns the BSTR wrapped by a _bstr_t and detaches the BSTR from the _bstr_t. |
GetAddress |
Points to the BSTR wrapped by a _bstr_t. |
GetBSTR |
Points to the beginning of the BSTR wrapped by the _bstr_t. |
length |
Returns the number of characters in the _bstr_t. |
END Microsoft Specific
Header: <comutil.h>
Lib: comsuppw.lib or comsuppwd.lib (For more information, see /Zc:wchar_t (wchar_t is native type))
