BSTR bstrPath = SysAllocStringByteLen(inBuff, bytes*2); MultiByteToWideChar(CP_ACP,0,inBuff,bytes, bstrPath, bytes*2);