_bstr_t::operator =

 

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::operator =.

Microsoft Specific**

Assigns a new value to an existing _bstr_t object.

  
      _bstr_t& operator=(  
   const _bstr_t& s1   
) throw ( );  
_bstr_t& operator=(  
   const char* s2   
);  
_bstr_t& operator=(  
   const wchar_t* s3   
);  
_bstr_t& operator=(  
   const _variant_t& var   
);  

Parameters

s1
A _bstr_t object to be assigned to an existing _bstr_t object.

s2
A multibyte string to be assigned to an existing _bstr_t object.

s3
A Unicode string to be assigned to an existing _bstr_t object.

var
A _variant_t object to be assigned to an existing _bstr_t object.

END Microsoft Specific

See _bstr_t::Assign for an example of using operator=.

_bstr_t Class

Show: