how do i convert Bstr to char ?
please give me an example.
Printable View
how do i convert Bstr to char ?
please give me an example.
That's not really easy since a BSTR is a string of multiple wide characters while a char is a single non-wide character. What exactly do you want to do?
This thread could also be helpful: http://www.codeguru.com/forum/showth...highlight=BSTR
Check out the ATL string conversion macros.
The link recommends using CComBSTR class and the COLE2T macro.
http://msdn.microsoft.com/en-us/libr...=vs.80%29.aspxCode:char* __stdcall ConvertBSTRToString( BSTR pSrc );