how can I call the put_ConnectionS tring correctly?
when I do the following I got compile error
BSTR bstr = "aaa";
hr.put_Connecti onString(bstr);
############### ############### #####
HRESULT CEPGLibApp::Loa dXMLData(LPCTST R tszXMLFileName)
{
HRESULT hr = S_OK;
CComPtr<ISQLXML BulkLoadpIXMLBu lkLoad;
hr = CoCreateInstanc e(CLSID_SQLXMLB ulkLoad3, NULL,
CLSCTX_INPROC_S ERVER, IID_ISQLXMLBulk Load, (void **)&pIXMLBulkLo ad);
if (SUCCEEDED(hr)) {
BSTR bstr = "aaa";
hr.put_Connecti onString(bstr);
}
if (SUCCEEDED(hr)) {
}
if (SUCCEEDED(hr)) {
}
return hr;
}
############### ############### ########
ISQLXMLBulkLoad : public IDispatch
{
public:
virtual /* [helpstring][id][propget] */ HRESULT
STDMETHODCALLTY PE get_ConnectionS tring(
/* [retval][out] */ BSTR *pbstrConnectio nString) = 0;
virtual /* [helpstring][id][propput] */ HRESULT
STDMETHODCALLTY PE put_ConnectionS tring(
/* [in] */ BSTR bstrConnectionS tring) = 0;
############### ############### ##
typedef /* [wire_marshal] */ OLECHAR *BSTR;
############### ############### ###
typedef WCHAR OLECHAR;
############### ############### ##
when I do the following I got compile error
BSTR bstr = "aaa";
hr.put_Connecti onString(bstr);
############### ############### #####
HRESULT CEPGLibApp::Loa dXMLData(LPCTST R tszXMLFileName)
{
HRESULT hr = S_OK;
CComPtr<ISQLXML BulkLoadpIXMLBu lkLoad;
hr = CoCreateInstanc e(CLSID_SQLXMLB ulkLoad3, NULL,
CLSCTX_INPROC_S ERVER, IID_ISQLXMLBulk Load, (void **)&pIXMLBulkLo ad);
if (SUCCEEDED(hr)) {
BSTR bstr = "aaa";
hr.put_Connecti onString(bstr);
}
if (SUCCEEDED(hr)) {
}
if (SUCCEEDED(hr)) {
}
return hr;
}
############### ############### ########
ISQLXMLBulkLoad : public IDispatch
{
public:
virtual /* [helpstring][id][propget] */ HRESULT
STDMETHODCALLTY PE get_ConnectionS tring(
/* [retval][out] */ BSTR *pbstrConnectio nString) = 0;
virtual /* [helpstring][id][propput] */ HRESULT
STDMETHODCALLTY PE put_ConnectionS tring(
/* [in] */ BSTR bstrConnectionS tring) = 0;
############### ############### ##
typedef /* [wire_marshal] */ OLECHAR *BSTR;
############### ############### ###
typedef WCHAR OLECHAR;
############### ############### ##