May 5, 2003 #1 richsb Technical User Aug 2, 2001 34 NO Hi, Any clues as to what I should be using to change the type of a VARIANT into a CString ? Cheers Rich
Hi, Any clues as to what I should be using to change the type of a VARIANT into a CString ? Cheers Rich
May 5, 2003 #2 palbano Programmer Oct 9, 1998 4,341 US use _varaint_t and _bstr_t. Once you have a _bstr_t you can use the LPCTSTR conversion operator to copy the data into a CString. Code: VARIANT v = ....; _bstr_t bstr(v); CString str((LPCTSTR)bstr); -pete I just can't seem to get back my IntelliSense Upvote 0 Downvote
use _varaint_t and _bstr_t. Once you have a _bstr_t you can use the LPCTSTR conversion operator to copy the data into a CString. Code: VARIANT v = ....; _bstr_t bstr(v); CString str((LPCTSTR)bstr); -pete I just can't seem to get back my IntelliSense