This is what I tried but it didn't do anything.
Mult开发者_如何学GoiByteToWideChar(CP_ACP, MB_COMPOSITE, optarg, -1, localdir, 0);
in the start of the function add: "USES_CONVERSION;" and it allows you to use the macros: "A2T", "T2A" ... so you need A2T enjoy
Actually you can use many way: 1. wstreamstring << szYourCharStar;
- _bstr_t bstr = szYourCharStar;
Those way can minumize your effort of resource management, if you use other way, you might need to free up the resource.
For instance:
_com_util::Convert_To_WCHAR ?? forget the name.
精彩评论