Hi,all
Who know how can convert several int to BSTR?
Thanks very much!
Printable View
Hi,all
Who know how can convert several int to BSTR?
Thanks very much!
If you want a BSTR representation of a number (as opposed to a char * representation), do this:
---BSTR bstrNumber ;
CString strNumber ;
sprintf(strNumber.GetBuffer(32),"%d", iMyNumber);
strNumber.ReleaseBuffer(); // Must do this!
bstrNumber = strNumber.AllocSysString();
---
Does this help?