Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

BSTR to std::string conversion ?

3 views
Skip to first unread message

Fabian Büttner

unread,
May 22, 2000, 3:00:00 AM5/22/00
to
Use the compiler com support class _bstr_t :

#include <comdef.h>
#include <string>

// ...

BSTR bstrMyString;
std::string strMyString = _bstr_t(bstrMyString); // implicit cast from
_bstr_t to char*
___

Fabian

0 new messages