void Append( const CComBSTR& bstrSrc );
void Append( LPCOLESTR lpsz );
void Append( LPCSTR lpsz );
void Append( LPCOLESTR lpsz, int nLen );
Parameters
bstrSrc
[in] A CComBSTR object.
lpsz
[in] A character string. The Unicode version specifies an LPCOLESTR; the ANSI version specifies an LPCSTR.
nLen
[in] The number of characters from lpsz to append.
Remarks
Appends either lpsz or the BSTR member of bstrSrc to m_str.
Example
//BOOL bASP, bHTM, bISAPI;
CComBSTR bstrURL = "http://SomeSite/";
CComBSTR bstrDEF = "/OtherSite";
CComBSTR bstrASP = "default.asp";
if (bASP)
//bstrURL is 'http://SomeSite/default.asp'
bstrURL.Append(bstrASP);
else if (bHTM)
//bstrURL is 'http://SomeSite/default.htm'
bstrURL.Append("default.htm");
else if (bISAPI)
//bstrURL is 'http://SomeSite/default.dll?func'
bstrURL.Append(OLESTR("default.dll?func"));
else
{
CComBSTR bstrTemp;
//bstrTemp is 'http://'
bstrTemp.Append(bstrURL, 7);
//bstrURL is 'http://OtherSite'
bstrURL = bstrTemp.Append(bstrDEF);
}
CComBSTR Overview | Class Members
See Also CComBSTR::AppendBSTR, CComBSTR::operator +=