home *** CD-ROM | disk | FTP | other *** search
/ QBasic & Borland Pascal & C / Delphi5.iso / Runimage / Delphi50 / Demos / Ado / Rds / RDS_TLB.PAS < prev    next >
Encoding:
Pascal/Delphi Source File  |  1999-08-11  |  15.9 KB  |  281 lines

  1. unit RDS_TLB;
  2.  
  3. // ************************************************************************ //
  4. // WARNING                                                                    
  5. // -------                                                                    
  6. // The types declared in this file were generated from data read from a       
  7. // Type Library. If this type library is explicitly or indirectly (via        
  8. // another type library referring to this type library) re-imported, or the   
  9. // 'Refresh' command of the Type Library Editor activated while editing the   
  10. // Type Library, the contents of this file will be regenerated and all        
  11. // manual modifications will be lost.                                         
  12. // ************************************************************************ //
  13.  
  14. // PASTLWTR : $Revision:   1.76  $
  15. // File generated on 6/8/99 3:43:10 PM from Type Library described below.
  16.  
  17. // ************************************************************************ //
  18. // Type Lib: C:\PROGRAM FILES\COMMON FILES\SYSTEM\MSADC\MSADCO.DLL (1)
  19. // IID\LCID: {BD96C556-65A3-11D0-983A-00C04FC29E30}\0
  20. // Helpfile: C:\PROGRAM FILES\COMMON FILES\SYSTEM\MSADC\ado210.chm
  21. // DepndLst: 
  22. //   (1) v2.0 stdole, (C:\WINDOWS\SYSTEM\STDOLE2.TLB)
  23. //   (2) v4.0 StdVCL, (D:\TP\BIN\STDVCL40.DLL)
  24. // ************************************************************************ //
  25. interface
  26.  
  27. uses Windows, ActiveX, Classes, Graphics, OleServer, OleCtrls, StdVCL;
  28.  
  29. // *********************************************************************//
  30. // GUIDS declared in the TypeLibrary. Following prefixes are used:        
  31. //   Type Libraries     : LIBID_xxxx                                      
  32. //   CoClasses          : CLASS_xxxx                                      
  33. //   DISPInterfaces     : DIID_xxxx                                       
  34. //   Non-DISP interfaces: IID_xxxx                                        
  35. // *********************************************************************//
  36. const
  37.   // TypeLibrary Major and minor versions
  38.   RDSMajorVersion = 1;
  39.   RDSMinorVersion = 5;
  40.  
  41.   LIBID_RDS: TGUID = '{BD96C556-65A3-11D0-983A-00C04FC29E30}';
  42.  
  43.   DIID_IADCEvents: TGUID = '{24785B20-135E-11D1-A2A7-00A0C9082766}';
  44.   IID_IBindMgr: TGUID = '{BD96C556-65A3-11D0-983A-00C04FC29E31}';
  45.   CLASS_DataControl: TGUID = '{BD96C556-65A3-11D0-983A-00C04FC29E33}';
  46.   IID_IDataspace: TGUID = '{BD96C556-65A3-11D0-983A-00C04FC29E34}';
  47.   CLASS_DataSpace: TGUID = '{BD96C556-65A3-11D0-983A-00C04FC29E36}';
  48.  
  49. // *********************************************************************//
  50. // Declaration of Enumerations defined in Type Library                    
  51. // *********************************************************************//
  52. // ADCExecuteOptionEnum constants
  53. type
  54.   ADCExecuteOptionEnum = TOleEnum;
  55. const
  56.   adcExecSync = $00000001;
  57.   adcExecAsync = $00000002;
  58.  
  59. // ADCFetchOptionEnum constants
  60. type
  61.   ADCFetchOptionEnum = TOleEnum;
  62. const
  63.   adcFetchUpFront = $00000001;
  64.   adcFetchBackground = $00000002;
  65.   adcFetchAsync = $00000003;
  66.  
  67. // ADCReadyStateEnum constants
  68. type
  69.   ADCReadyStateEnum = TOleEnum;
  70. const
  71.   adcReadyStateLoaded = $00000002;
  72.   adcReadyStateInteractive = $00000003;
  73.   adcReadyStateComplete = $00000004;
  74.  
  75. type
  76.  
  77. // *********************************************************************//
  78. // Forward declaration of types defined in TypeLibrary                    
  79. // *********************************************************************//
  80.   IADCEvents = dispinterface;
  81.   IBindMgr = interface;
  82.   IBindMgrDisp = dispinterface;
  83.   IDataspace = interface;
  84.   IDataspaceDisp = dispinterface;
  85.  
  86. // *********************************************************************//
  87. // Declaration of CoClasses defined in Type Library                       
  88. // (NOTE: Here we map each CoClass to its Default Interface)              
  89. // *********************************************************************//
  90.   DataControl = IBindMgr;
  91.   DataSpace = IDataspace;
  92.  
  93.  
  94. // *********************************************************************//
  95. // Declaration of structures, unions and aliases.                         
  96. // *********************************************************************//
  97.   PWordBool1 = ^WordBool; {*}
  98.  
  99.  
  100. // *********************************************************************//
  101. // DispIntf:  IADCEvents
  102. // Flags:     (4112) Hidden Dispatchable
  103. // GUID:      {24785B20-135E-11D1-A2A7-00A0C9082766}
  104. // *********************************************************************//
  105.   IADCEvents = dispinterface
  106.     ['{24785B20-135E-11D1-A2A7-00A0C9082766}']
  107.     procedure onreadystatechange {Flags(1), (0/0) CC:0, INV:1, DBG:4}; dispid -609;
  108.     procedure onerror {Flags(1), (4/4) CC:0, INV:1, DBG:4}(SCode: {VT_2:0}Smallint; 
  109.                                                            const Description: {VT_8:0}WideString; 
  110.                                                            const Source: {VT_8:0}WideString; 
  111.                                                            var CancelDisplay: {VT_11:1}WordBool); dispid -608;
  112.   end;
  113.  
  114. // *********************************************************************//
  115. // Interface: IBindMgr
  116. // Flags:     (4432) Hidden Dual OleAutomation Dispatchable
  117. // GUID:      {BD96C556-65A3-11D0-983A-00C04FC29E31}
  118. // *********************************************************************//
  119.   IBindMgr = interface(IDispatch)
  120.     ['{BD96C556-65A3-11D0-983A-00C04FC29E31}']
  121.     function  Get_SQL {Flags(1), (1/0) CC:0, INV:2, DBG:6}: WideString; safecall;
  122.     procedure Set_SQL {Flags(1), (1/1) CC:0, INV:4, DBG:6}(const pbstrQuery: {VT_8:0}WideString); safecall;
  123.     function  Get_Server {Flags(1), (1/0) CC:0, INV:2, DBG:6}: WideString; safecall;
  124.     procedure Set_Server {Flags(1), (1/1) CC:0, INV:4, DBG:6}(const pbstrServer: {VT_8:0}WideString); safecall;
  125.     function  Get_DataSpace {Flags(1), (1/0) CC:0, INV:2, DBG:6}: WideString; safecall;
  126.     procedure Set_DataSpace {Flags(1), (1/1) CC:0, INV:4, DBG:6}(const pbstrDs: {VT_8:0}WideString); safecall;
  127.     procedure _Set_SourceRecordset {Flags(1), (1/1) CC:0, INV:4, DBG:6}(const Param1: {VT_9:0}IDispatch); safecall;
  128.     procedure Set_SourceRecordset {Flags(1), (1/1) CC:0, INV:8, DBG:6}(const Param1: {VT_9:0}IDispatch); safecall;
  129.     function  Get_Recordset {Flags(1), (1/0) CC:0, INV:2, DBG:6}: IDispatch; safecall;
  130.     function  Get_Connect {Flags(1), (1/0) CC:0, INV:2, DBG:6}: WideString; safecall;
  131.     procedure Set_Connect {Flags(1), (1/1) CC:0, INV:4, DBG:6}(const pbstrConnect: {VT_8:0}WideString); safecall;
  132.     function  Get_ExecuteOptions {Flags(1), (1/0) CC:0, INV:2, DBG:6}: Smallint; safecall;
  133.     procedure Set_ExecuteOptions {Flags(1), (1/1) CC:0, INV:4, DBG:6}(pshExecuteOptions: {VT_2:0}Smallint); safecall;
  134.     function  Get_FetchOptions {Flags(1), (1/0) CC:0, INV:2, DBG:6}: Smallint; safecall;
  135.     procedure Set_FetchOptions {Flags(1), (1/1) CC:0, INV:4, DBG:6}(pshFetchOptions: {VT_2:0}Smallint); safecall;
  136.     function  Get_ReadyState {Flags(1), (1/0) CC:0, INV:2, DBG:6}: Integer; safecall;
  137.     function  Get_SortColumn {Flags(1), (1/0) CC:0, INV:2, DBG:6}: WideString; safecall;
  138.     procedure Set_SortColumn {Flags(1), (1/1) CC:0, INV:4, DBG:6}(const pbstrSortColumn: {VT_8:0}WideString); safecall;
  139.     function  Get_SortDirection {Flags(1), (1/0) CC:0, INV:2, DBG:6}: WordBool; safecall;
  140.     procedure Set_SortDirection {Flags(1), (1/1) CC:0, INV:4, DBG:6}(pfSortAscending: {VT_11:0}WordBool); safecall;
  141.     function  Get_FilterValue {Flags(1), (1/0) CC:0, INV:2, DBG:6}: WideString; safecall;
  142.     procedure Set_FilterValue {Flags(1), (1/1) CC:0, INV:4, DBG:6}(const pbstrFilterValue: {VT_8:0}WideString); safecall;
  143.     function  Get_FilterCriterion {Flags(1), (1/0) CC:0, INV:2, DBG:6}: WideString; safecall;
  144.     procedure Set_FilterCriterion {Flags(1), (1/1) CC:0, INV:4, DBG:6}(const pbstrFilterCriterion: {VT_8:0}WideString); safecall;
  145.     function  Get_FilterColumn {Flags(1), (1/0) CC:0, INV:2, DBG:6}: WideString; safecall;
  146.     procedure Set_FilterColumn {Flags(1), (1/1) CC:0, INV:4, DBG:6}(const pbstrFilterColumn: {VT_8:0}WideString); safecall;
  147.     procedure Refresh {Flags(1), (0/0) CC:0, INV:1, DBG:6}; safecall;
  148.     procedure SubmitChanges {Flags(1), (0/0) CC:0, INV:1, DBG:6}; safecall;
  149.     procedure CancelUpdate {Flags(1), (0/0) CC:0, INV:1, DBG:6}; safecall;
  150.     function  CreateRecordSet {Flags(1), (2/1) CC:0, INV:1, DBG:6}(varColumnInfos: {VT_12:0}OleVariant): IDispatch; safecall;
  151.     procedure Reset {Flags(1), (1/1) CC:0, INV:1, DBG:6}(fRefilter: {VT_3:0}Integer); safecall;
  152.     procedure Cancel {Flags(1), (0/0) CC:0, INV:1, DBG:6}; safecall;
  153.     function  Get_Handler {Flags(1), (1/0) CC:0, INV:2, DBG:6}: WideString; safecall;
  154.     procedure Set_Handler {Flags(1), (1/1) CC:0, INV:4, DBG:6}(const pbstrHandler: {VT_8:0}WideString); safecall;
  155.     function  Get_InternetTimeout {Flags(1), (1/0) CC:0, INV:2, DBG:6}: Integer; safecall;
  156.     procedure Set_InternetTimeout {Flags(1), (1/1) CC:0, INV:4, DBG:6}(plInetTimeout: {VT_3:0}Integer); safecall;
  157.     property SQL: WideString read Get_SQL write Set_SQL;
  158.     property Server: WideString read Get_Server write Set_Server;
  159.     property DataSpace: WideString read Get_DataSpace write Set_DataSpace;
  160.     property SourceRecordset: IDispatch write _Set_SourceRecordset;
  161.     property Recordset: IDispatch read Get_Recordset;
  162.     property Connect: WideString read Get_Connect write Set_Connect;
  163.     property ExecuteOptions: Smallint read Get_ExecuteOptions write Set_ExecuteOptions;
  164.     property FetchOptions: Smallint read Get_FetchOptions write Set_FetchOptions;
  165.     property ReadyState: Integer read Get_ReadyState;
  166.     property SortColumn: WideString read Get_SortColumn write Set_SortColumn;
  167.     property SortDirection: WordBool read Get_SortDirection write Set_SortDirection;
  168.     property FilterValue: WideString read Get_FilterValue write Set_FilterValue;
  169.     property FilterCriterion: WideString read Get_FilterCriterion write Set_FilterCriterion;
  170.     property FilterColumn: WideString read Get_FilterColumn write Set_FilterColumn;
  171.     property Handler: WideString read Get_Handler write Set_Handler;
  172.     property InternetTimeout: Integer read Get_InternetTimeout write Set_InternetTimeout;
  173.   end;
  174.  
  175. // *********************************************************************//
  176. // DispIntf:  IBindMgrDisp
  177. // Flags:     (4432) Hidden Dual OleAutomation Dispatchable
  178. // GUID:      {BD96C556-65A3-11D0-983A-00C04FC29E31}
  179. // *********************************************************************//
  180.   IBindMgrDisp = dispinterface
  181.     ['{BD96C556-65A3-11D0-983A-00C04FC29E31}']
  182.     property SQL {Flags(2), (1/0) CC:0, INV:2, DBG:6}: WideString dispid 0;
  183.     property Server {Flags(2), (1/0) CC:0, INV:2, DBG:6}: WideString dispid 1;
  184.     property DataSpace {Flags(2), (1/0) CC:0, INV:2, DBG:6}: WideString dispid 144;
  185.     property SourceRecordset {Flags(2), (1/0) CC:0, INV:4, DBG:6}: IDispatch writeonly dispid 146;
  186.     property Recordset {Flags(2), (1/0) CC:0, INV:2, DBG:6}: IDispatch readonly dispid 149;
  187.     property Connect {Flags(2), (1/0) CC:0, INV:2, DBG:6}: WideString dispid 148;
  188.     property ExecuteOptions {Flags(2), (1/0) CC:0, INV:2, DBG:6}: Smallint dispid 18;
  189.     property FetchOptions {Flags(2), (1/0) CC:0, INV:2, DBG:6}: Smallint dispid 20;
  190.     property ReadyState {Flags(2), (1/0) CC:0, INV:2, DBG:6}: Integer readonly dispid -525;
  191.     property SortColumn {Flags(2), (1/0) CC:0, INV:2, DBG:6}: WideString dispid 11;
  192.     property SortDirection {Flags(2), (1/0) CC:0, INV:2, DBG:6}: WordBool dispid 12;
  193.     property FilterValue {Flags(2), (1/0) CC:0, INV:2, DBG:6}: WideString dispid 15;
  194.     property FilterCriterion {Flags(2), (1/0) CC:0, INV:2, DBG:6}: WideString dispid 14;
  195.     property FilterColumn {Flags(2), (1/0) CC:0, INV:2, DBG:6}: WideString dispid 13;
  196.     procedure Refresh {Flags(1), (0/0) CC:0, INV:1, DBG:4}; dispid 6;
  197.     procedure SubmitChanges {Flags(1), (0/0) CC:0, INV:1, DBG:4}; dispid 7;
  198.     procedure CancelUpdate {Flags(1), (0/0) CC:0, INV:1, DBG:4}; dispid 8;
  199.     function  CreateRecordSet {Flags(1), (2/1) CC:0, INV:1, DBG:4}(varColumnInfos: {VT_12:0}OleVariant): IDispatch; dispid 10;
  200.     procedure Reset {Flags(1), (1/1) CC:0, INV:1, DBG:4}(fRefilter: {VT_3:0}Integer); dispid 16;
  201.     procedure Cancel {Flags(1), (0/0) CC:0, INV:1, DBG:4}; dispid 17;
  202.     property Handler {Flags(2), (1/0) CC:0, INV:2, DBG:6}: WideString dispid 21;
  203.     property InternetTimeout {Flags(2), (1/0) CC:0, INV:2, DBG:6}: Integer dispid 22;
  204.   end;
  205.  
  206. // *********************************************************************//
  207. // Interface: IDataspace
  208. // Flags:     (4432) Hidden Dual OleAutomation Dispatchable
  209. // GUID:      {BD96C556-65A3-11D0-983A-00C04FC29E34}
  210. // *********************************************************************//
  211.   IDataspace = interface(IDispatch)
  212.     ['{BD96C556-65A3-11D0-983A-00C04FC29E34}']
  213.     function  CreateObject {Flags(1), (3/2) CC:0, INV:1, DBG:6}(const bstrProgid: {VT_8:0}WideString; 
  214.                                                                 const bstrConnection: {VT_8:0}WideString): OleVariant; safecall;
  215.     function  Get_InternetTimeout {Flags(1), (1/0) CC:0, INV:2, DBG:6}: Integer; safecall;
  216.     procedure Set_InternetTimeout {Flags(1), (1/1) CC:0, INV:4, DBG:6}(plInetTimeout: {VT_3:0}Integer); safecall;
  217.     property InternetTimeout: Integer read Get_InternetTimeout write Set_InternetTimeout;
  218.   end;
  219.  
  220. // *********************************************************************//
  221. // DispIntf:  IDataspaceDisp
  222. // Flags:     (4432) Hidden Dual OleAutomation Dispatchable
  223. // GUID:      {BD96C556-65A3-11D0-983A-00C04FC29E34}
  224. // *********************************************************************//
  225.   IDataspaceDisp = dispinterface
  226.     ['{BD96C556-65A3-11D0-983A-00C04FC29E34}']
  227.     function  CreateObject {Flags(1), (3/2) CC:0, INV:1, DBG:4}(const bstrProgid: {VT_8:0}WideString; 
  228.                                                                 const bstrConnection: {VT_8:0}WideString): OleVariant; dispid 1;
  229.     property InternetTimeout {Flags(2), (1/0) CC:0, INV:2, DBG:6}: Integer dispid 222;
  230.   end;
  231.  
  232. // *********************************************************************//
  233. // The Class CoDataControl provides a Create and CreateRemote method to          
  234. // create instances of the default interface IBindMgr exposed by              
  235. // the CoClass DataControl. The functions are intended to be used by             
  236. // clients wishing to automate the CoClass objects exposed by the         
  237. // server of this typelibrary.                                            
  238. // *********************************************************************//
  239.   CoDataControl = class
  240.     class function Create: IBindMgr;
  241.     class function CreateRemote(const MachineName: string): IBindMgr;
  242.   end;
  243.  
  244. // *********************************************************************//
  245. // The Class CoDataSpace provides a Create and CreateRemote method to          
  246. // create instances of the default interface IDataspace exposed by              
  247. // the CoClass DataSpace. The functions are intended to be used by             
  248. // clients wishing to automate the CoClass objects exposed by the         
  249. // server of this typelibrary.                                            
  250. // *********************************************************************//
  251.   CoDataSpace = class
  252.     class function Create: IDataspace;
  253.     class function CreateRemote(const MachineName: string): IDataspace;
  254.   end;
  255.  
  256. implementation
  257.  
  258. uses ComObj;
  259.  
  260. class function CoDataControl.Create: IBindMgr;
  261. begin
  262.   Result := CreateComObject(CLASS_DataControl) as IBindMgr;
  263. end;
  264.  
  265. class function CoDataControl.CreateRemote(const MachineName: string): IBindMgr;
  266. begin
  267.   Result := CreateRemoteComObject(MachineName, CLASS_DataControl) as IBindMgr;
  268. end;
  269.  
  270. class function CoDataSpace.Create: IDataspace;
  271. begin
  272.   Result := CreateComObject(CLASS_DataSpace) as IDataspace;
  273. end;
  274.  
  275. class function CoDataSpace.CreateRemote(const MachineName: string): IDataspace;
  276. begin
  277.   Result := CreateRemoteComObject(MachineName, CLASS_DataSpace) as IDataspace;
  278. end;
  279.  
  280. end.
  281.