A _bstr_t object encapsulates the BSTR data type. The class manages resource allocation and deallocation through function calls to SysAllocString and SysFreeString and other BSTR APIs when appropriate. The _bstr_t class uses reference counting to avoid excessive overhead.
Use the += operator of _bstr_t to append characters to the end.
if value is also declared as a type of _bstr_t then code can be re-written as,