Skip to content

Latest commit

 

History

History
41 lines (28 loc) · 854 Bytes

bstr-t-copy.md

File metadata and controls

41 lines (28 loc) · 854 Bytes
description title ms.date f1_keywords helpviewer_keywords
Learn more about: _bstr_t::copy
_bstr_t::copy
02/02/2021
_bstr_t::copy
Copy method [C++]
BSTR object [C++], copy

_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, or the encapsulated object itself, depending on the parameter.

Example

STDMETHODIMP CAlertMsg::get_ConnectionStr(BSTR *pVal){ //  m_bsConStr is _bstr_t
   *pVal = m_bsConStr.copy();
}

END Microsoft Specific

See also

_bstr_t class