|
In stdafx.h
#pragma warning(disable: 4146)
#import "c:\program files\common files\system\ado\msado15.dll" no_namespace rename( "EOF", "adoEOF")
#pragma warning(default: 4146)
In xxx.odl
library XCOMBOXLib
{
importlib(STDOLE_TLB);
importlib(STDTYPE_TLB);
//------------------------------Add the following, if the system is not installed in the c drive, change c: to other That's it
importlib("c:\program files\common files\system\ado\msado15.dll");
//[id(30)] IDispatch* DataSourceOfRst; Change IDispatch* to _Recordset* to expose the automation of the DataSourceOfRst property in VB, delphi, or put a point after DataSourceOfRst, ADO record-level methods and properties are not Will be listed automatically
[id(30)] _Recordset* DataSourceOfRst;//You cannot write _Recordset* as _RecordsetPtr here, because _RecordsetPtr is a macro definition of _Recordset*, but it is not defined in odl, so an error will be reported |
|