<code>

TCHAR szBuf[14];
szBuf[0]=0;
wsprintf(szBuf, _T("some string, %d", i=1);
ComBSTR bstrName = (BSTR)szBuf;

</code>

It seems wrong to allocate space for a wide-character string, get it into a buffer and then create a ComBSTR class to hold it. Is there a more optimal way to do this with just ComBSTR or, _bstr_t ?

-su