怎么将string转为_bstr_t啊?

怎么将string转为_bstr_t啊?

有那位知道那?我找了所有的好像没有啊?
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[技巧]:通过char*作为中介.

CString->std::string 例子:

CString strMfc=“test“;

std::string strStl;

strStl=strMfc.GetBuffer(0);

std::string->CString  例子:

CString strMfc;

std::string strStl=“test“;

strMfc=strStl.c_str();
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

你可能感兴趣的:(怎么将string转为_bstr_t啊?)