This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
bug report
- From: <zhangming_1978 at sohu dot com>
- To: <gcc-bugs at gcc dot gnu dot org>
- Date: Mon, 23 Feb 2004 22:10:35 +0800 (CST)
- Subject: bug report
Platform : Windows98se
gcc version: 3.2.3 ( mingw special 20030504-1 )
I declare interface like this:
DECLARE_INTERFACE(IADORecordset)
{
...
STDMETHOD(CursorType)(THIS_ CursorTypeEnum plCursorType) PURE;
...
STDMETHOD(CursorLocation)(THIS_ CursorLocation plCursorLocation) PURE;
...
STDMETHOD(Open)(THIS_ VARIANT Source,VARIANT Activeconnection,CursorTypeEnum CursorType,LockTypeEnum LockType,long Options) PURE;
...
}
I Opera like this:
IADORecordset * rs =NULL;
HRESULT hr;
hr = CoCreateInstance(CLSID_ADORecordset,NULL,CLSCTX_INPROC_SERVER,IID_ADORecordset,(PVOID*)&rs);
if(hr== S_OK)
{
rs->CursorType(adOpenDynamic); //ado interface Opera
rs->CursorLocation(adUseClient); //Cursor type is User Client
rs->Open(sqltext,ctnstr,adOpenDynamic,adLockOptimistic,1);
//sqltext and ctnstr are BSTR type
rs->Close();
rs->Release();
}
...
error:
1. no matching function for call to "IADORecordset::Open(
2. candidates are: virtual HRESULT
why I get this error ? what can I do about it ?
I don't like use ODBC interface to develop software, what can I do ?