I have several projects where I need to append strings to a BSTR/CComBSTR/_bstr_t object (e.g. building a dynamic SQL statement). Is there an out-of-the-box type in the WinAPI to buffer the concatenation (like StringBuilder in .NET), or do I have to write my own? From what I know about the append methods, they perform re-allocation.
I have several projects where I need to append strings to a BSTR/CComBSTR/_bstr_t object
Share
Copy the BSTR into a CString, do all the modifications there and then copy it back into the BSTR/CComBSTR. CString’s allocations are faster than SysAllocStringLen.