else if (VT_BSTR == pVarResult.vt)
{
//wprintf_s(L"%s", pVarResult.bstrVal);
wcout <<"pVarResult.bstrVal: " << pVarResult.bstrVal << endl;
wstring wstring1 = pVarResult.bstrVal;
wcout << "wstring1: " << wstring1 << endl;
string retstr;
retstr.assign(wstring1.begin(), wstring1.end());
cout << "string1: " << retstr << endl;
}
가장 위에는 bstr 문자열을 wcout으로 출력하고
그다음은bstr문자열을 wstring에 넣어서 출력하고
마지막은 wstring을 string에 넣어서 출력하는 코드입니다
pVarResult.bstrVal 의 값이
A123456 이라는 문자열은 세가지 방법 모두 똑같이 출력을하는데
한글을 받아올때는 출력을 못합니다
어떤걸 수정해야하나요 ??
해당 댓글은 삭제되었습니다.
감사합니다
https://stackoverflow.com/questions/57131654/using-utf-8-encoding-chcp-65001-in-command-prompt-windows-powershell-window
레지스트리 수정하거나 intl.cpl ? 이거 옵션 바꾸라는데 일단 보류함 더 알아보고 수정해보려고