草庐IT

c++ - 如何将 std::string 转换为 BSTR*?

如何将std::string转换为BSTR*?STDMETHODIMPCMyRESTApp::rest(BSTRdata,BSTR*restr){RESTClientrestclient;RESTClient::responseresp=restclient.get(data);Log("ResponseStatuscode:%s",resp.code);Log("ResponseBody:%s",resp.body);*restr=//herereturnS_OK;}我需要转换resp.body,然后将其返回给此处的*restr。 最佳答案