| title |
_bstr_t Class | Microsoft Docs |
| ms.custom |
|
| ms.date |
11/04/2016 |
| ms.reviewer |
|
| ms.suite |
|
| ms.technology |
|
| ms.tgt_pltfrm |
|
| ms.topic |
language-reference |
| f1_keywords |
|
| dev_langs |
|
| helpviewer_keywords |
BSTR object |
_bstr_t class |
BSTR object, COM encapsulation |
|
| ms.assetid |
58841fef-fe21-4a84-aab9-780262b5201f |
| caps.latest.revision |
9 |
| author |
mikeblome |
| ms.author |
mblome |
| manager |
ghogen |
| translation.priority.ht |
cs-cz |
de-de |
es-es |
fr-fr |
it-it |
ja-jp |
ko-kr |
pl-pl |
pt-br |
ru-ru |
tr-tr |
zh-cn |
zh-tw |
|
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.
|
|
| _bstr_t |
Constructs a _bstr_t object. |
|
|
| 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 (see /Zc:wchar_t (wchar_t Is Native Type) for more information)
Compiler COM Support Classes