This method sets the string to a particular type. The parameter vtSrc must be VT_BSTR (UNICODE) or VT_BSTRT (ASCII) . SetString is typically used to set strings to ANSI, since the default for the COleVariant::COleVariant constructor with a string or string pointer parameter and no VARTYPE is UNICODE.
Header file: | Afxdisp.h |
Platforms: | H/PC 2.0, H/PC Pro |
Windows CE versions: | 2.0 and later |
Complete documentation: | Visual C++ documentation |
void SetString( LPCTSTR lpszSrc, VARTYPE vtSrc );
COleVariant::COleVariant, VARIANT, VARTYPE