Call this member function to set the string to a particular type. The parameter vtSrc must be VT_BSTR (UNICODE) or VT_BSTRT (ANSI). 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.
void SetString( LPCTSTR lpszSrc, VARTYPE vtSrc );
Header file: | Afxdisp.h |
Platforms: | |
Versions: | 2.0 and later |
Complete documentation: | Visual C++ documentation |
COleVariant Overview, COleVariant Member Functions, Automation Types, COleVariant::COleVariant, VARIANT, VARTYPE