开发者

How do I convert a *char to _TCHAR?

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;

  1. _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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜