
Posted by Rodrigo S. Novelli on June 01, 204 at 21:03:00:
In Reply to: How to convert from CString to BSTR and LPSTR posted by Iman on May 17, 204 at 11:05:17:
: Does anyone know how to convert from CString to BSTR and LPSTR
: regards
: Iman
To convert from a CString to BSTR:
CString str = "Hello";
BSTR bstr = str.AllocSysString();
// Do whetever you want...
// Free the bstr
::SysFreeString( bstr );
Hope this help.
Regards,
Rodrigo.