_bstr_t::copy
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::copy.
Microsoft Specific**
Constructs a copy of the encapsulated BSTR.
BSTR copy(
bool fCopy = true
) const;
Parameters
fCopy
If true, copy returns a copy of the contained BSTR, otherwise copy returns the actual BSTR.
Returns a newly allocated copy of the encapsulated BSTR object.
STDMETHODIMP CAlertMsg::get_ConnectionStr(BSTR *pVal){ // m_bsConStr is _bstr_t
*pVal = m_bsConStr.copy();
}
END Microsoft Specific
Show: