|
-
June 28th, 1999, 01:47 AM
#1
Convert int to BSTR
Hi,all
Who know how can convert several int to BSTR?
Thanks very much!
-
June 28th, 1999, 01:59 AM
#2
Re: Convert int to BSTR
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?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|