COleVariant::SetString

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.

Syntax

void SetString( LPCTSTR lpszSrc, VARTYPE vtSrc );

At a Glance

Header file: Afxdisp.h
Platforms:
Versions: 2.0 and later
Complete documentation: Visual C++ documentation

See Also

COleVariant Overview, COleVariant Member Functions, Automation Types, COleVariant::COleVariant, VARIANT, VARTYPE