char inBuff[58]; ... // присвоение inBuff bytes - символов CComBSTR buf = SysAllocStringByteLen( inBuff, bytes);