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

BSTR to std::string conversion ?

Yametazamwa mara 3
Ruka hadi kwenye ujumbe wa kwanza ambao haujasomwa

Fabian Büttner

hayajasomwa,
22 Mei 2000, 03:00:0022/05/2000
kwa
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

Ujumbe 0 mpya