I have been trying to find a correct and easy solution for performing a string conversion in C++; a conversion from BSTR to Char*. I need this conversion for writing a wrapper using GSOAP.
I googled but could not find a way to solve the problem. Finally I understood how _bstr_t class did the conversion and managed to find an easier solution defined in comutil.h
The conversion goes like this.
char* resultString = _com_util::ConvertBSTRToString(BSTR stringToConvert);
This works amazingly for me.