Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
The latest version of this topic can be found at _bstr_t::copy.
Microsoft Specific**
Constructs a copy of the encapsulated BSTR.
Syntax
BSTR copy(
bool fCopy = true
) const;
Parameters
fCopy
If true, copy returns a copy of the contained BSTR, otherwise copy returns the actual BSTR.
Remarks
Returns a newly allocated copy of the encapsulated BSTR object.
Example
STDMETHODIMP CAlertMsg::get_ConnectionStr(BSTR *pVal){ // m_bsConStr is _bstr_t
*pVal = m_bsConStr.copy();
}
END Microsoft Specific