Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > C++ > calling functio...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 1 of 2 Topic 44059 of 47563
Post > Topic >>

calling function

by June Lee <iiuu66@[EMAIL PROTECTED] > Mar 21, 2008 at 08:00 PM

how can I call the  put_ConnectionString correctly?

when I do the following I got compile error
                           BSTR bstr = "aaa";
		hr.put_ConnectionString(bstr);


###################################

HRESULT CEPGLibApp::LoadXMLData(LPCTSTR tszXMLFileName)
{
	HRESULT hr = S_OK;

	CComPtr<ISQLXMLBulkLoad> pIXMLBulkLoad;
	hr = CoCreateInstance(CLSID_SQLXMLBulkLoad3, NULL,
CLSCTX_INPROC_SERVER, IID_ISQLXMLBulkLoad, (void **)&pIXMLBulkLoad);

	if (SUCCEEDED(hr)) {
                           BSTR bstr = "aaa";
		hr.put_ConnectionString(bstr);
	}

	if (SUCCEEDED(hr)) {
	}

	if (SUCCEEDED(hr)) {
	}

	return hr;
}

######################################

    ISQLXMLBulkLoad : public IDispatch
    {
    public:
        virtual /* [helpstring][id][propget] */ HRESULT
STDMETHODCALLTYPE get_ConnectionString( 
            /* [retval][out] */ BSTR *pbstrConnectionString) = 0;
        
        virtual /* [helpstring][id][propput] */ HRESULT
STDMETHODCALLTYPE put_ConnectionString( 
            /* [in] */ BSTR bstrConnectionString) = 0;
        

################################


typedef /* [wire_marshal] */ OLECHAR *BSTR;

#################################

typedef WCHAR OLECHAR;

################################
 




 2 Posts in Topic:
calling function
June Lee <iiuu66@[EMAI  2008-03-21 20:00:45 
Re: calling function
Alan Johnson <awjcs@[E  2008-03-21 23:06:57 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Sun Sep 7 8:24:35 CDT 2008.