On 05/18/17 18:54, Stefan Dösinger wrote:
Am 2017-05-18 um 14:35 schrieb Piotr Caban:
You don't need to allocate dest_w dynamically. Its length is limited to ~MAX_PATH anyway.
I'd have to duplicate the length check from the wchar version to make sure of that though. Either way works for me, just tell me what you prefer.
I think it's better if it's not allocated dynamically. Also I don't think you need to duplicate the error checking. You should check if MultiByteToWideChar fails when converting dest to dest_w anyway.