C++: Convert wchar_t* to BSTR?

前端 未结 3 853
执念已碎
执念已碎 2021-01-13 05:42

I\'m trying to convert a wchar_t * to BSTR.

#include 
#include 

using namespace std;

int main()
         


        
3条回答
  •  梦谈多话
    2021-01-13 06:41

    I think easiest is either to use

    CString

    or

    CComBSTR

    both have methods that do what Charles mentioned

提交回复
热议问题