_bstr_t::Attach
Visual Studio 2015
The new home for Visual Studio documentation is Visual Studio 2017 Documentation on docs.microsoft.com.
The latest version of this topic can be found at _bstr_t::Attach.
Microsoft Specific**
Links a _bstr_t wrapper to a BSTR.
void Attach(
BSTR s
);
Parameters
s
A BSTR to be associated with, or assigned to, the _bstr_t variable.
If the _bstr_t was previously attached to another BSTR, the _bstr_t will clean up the BSTR resource, if no other _bstr_t variables are using the BSTR.
See _bstr_t::Assign for an example using Attach.
END Microsoft Specific
Show: