home *** CD-ROM | disk | FTP | other *** search
/ Chip 2002 March / Chip_2002-03_cd1.bin / zkuste / delphi / kompon / d5 / ADO.ZIP / src / MsDascInt.pas < prev   
Encoding:
Pascal/Delphi Source File  |  2001-12-23  |  25.0 KB  |  560 lines

  1. unit MsDascInt;
  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.88  $
  15. // File generated on 01-12-23 16:00:37 from Type Library described below.
  16.  
  17. // ************************************************************************ //
  18. // Type Lib: D:\Program Files\Common Files\System\OLE DB\oledb32.dll (1)
  19. // IID\LCID: {2206CEB0-19C1-11D1-89E0-00C04FD7A829}\0
  20. // Helpfile: 
  21. // DepndLst: 
  22. //   (1) v2.0 stdole, (D:\WINNT\System32\STDOLE2.TLB)
  23. //   (2) v4.0 StdVCL, (D:\WINNT\System32\STDVCL40.DLL)
  24. // Errors:
  25. //   Hint: Member 'type' of 'tagSTATSTG' changed to 'type_'
  26. // ************************************************************************ //
  27. {$TYPEDADDRESS OFF} // Unit must be compiled without type-checked pointers. 
  28. interface
  29.  
  30. uses Windows, ActiveX, Classes, Graphics, OleServer, OleCtrls, StdVCL;
  31.  
  32. // *********************************************************************//
  33. // GUIDS declared in the TypeLibrary. Following prefixes are used:        
  34. //   Type Libraries     : LIBID_xxxx                                      
  35. //   CoClasses          : CLASS_xxxx                                      
  36. //   DISPInterfaces     : DIID_xxxx                                       
  37. //   Non-DISP interfaces: IID_xxxx                                        
  38. // *********************************************************************//
  39. const
  40.   // TypeLibrary Major and minor versions
  41.   MSDASCMajorVersion = 1;
  42.   MSDASCMinorVersion = 0;
  43.  
  44.   LIBID_MSDASC: TGUID = '{2206CEB0-19C1-11D1-89E0-00C04FD7A829}';
  45.  
  46.   IID_IDataSourceLocator: TGUID = '{2206CCB2-19C1-11D1-89E0-00C04FD7A829}';
  47.   IID_IDBPromptInitialize: TGUID = '{2206CCB0-19C1-11D1-89E0-00C04FD7A829}';
  48.   IID_IDataInitialize: TGUID = '{2206CCB1-19C1-11D1-89E0-00C04FD7A829}';
  49.   CLASS_DataLinks: TGUID = '{2206CDB2-19C1-11D1-89E0-00C04FD7A829}';
  50.   CLASS_MSDAINITIALIZE: TGUID = '{2206CDB0-19C1-11D1-89E0-00C04FD7A829}';
  51.   IID_IPersist: TGUID = '{0000010C-0000-0000-C000-000000000046}';
  52.   IID_IPersistFile: TGUID = '{0000010B-0000-0000-C000-000000000046}';
  53.   CLASS_PDPO: TGUID = '{CCB4EC60-B9DC-11D1-AC80-00A0C9034873}';
  54.   IID_IBindResource: TGUID = '{0C733AB1-2A1C-11CE-ADE5-00AA0044773D}';
  55.   IID_ICreateRow: TGUID = '{0C733AB2-2A1C-11CE-ADE5-00AA0044773D}';
  56.   IID_IAuthenticate: TGUID = '{79EAC9D0-BAF9-11CE-8C82-00AA004BA90B}';
  57.   IID_IRegisterProvider: TGUID = '{0C733AB9-2A1C-11CE-ADE5-00AA0044773D}';
  58.   IID_IDBProperties: TGUID = '{0C733A8A-2A1C-11CE-ADE5-00AA0044773D}';
  59.   IID_IDBBinderProperties: TGUID = '{0C733AB3-2A1C-11CE-ADE5-00AA0044773D}';
  60.   IID_IMarshal: TGUID = '{00000003-0000-0000-C000-000000000046}';
  61.   IID_IErrorInfo: TGUID = '{1CF2B120-547D-101B-8E65-08002B2BD119}';
  62.   CLASS_RootBinder: TGUID = '{FF151822-B0BF-11D1-A80D-000000000000}';
  63.   IID_ISequentialStream: TGUID = '{0C733A30-2A1C-11CE-ADE5-00AA0044773D}';
  64.   IID_IStream: TGUID = '{0000000C-0000-0000-C000-000000000046}';
  65. type
  66.  
  67. // *********************************************************************//
  68. // Forward declaration of types defined in TypeLibrary                    
  69. // *********************************************************************//
  70.   IDataSourceLocator = interface;
  71.   IDataSourceLocatorDisp = dispinterface;
  72.   IDBPromptInitialize = interface;
  73.   IDataInitialize = interface;
  74.   IPersist = interface;
  75.   IPersistFile = interface;
  76.   IBindResource = interface;
  77.   ICreateRow = interface;
  78.   IAuthenticate = interface;
  79.   IRegisterProvider = interface;
  80.   IDBProperties = interface;
  81.   IDBBinderProperties = interface;
  82.   IMarshal = interface;
  83.   IErrorInfo = interface;
  84.   ISequentialStream = interface;
  85.   IStream = interface;
  86.  
  87. // *********************************************************************//
  88. // Declaration of CoClasses defined in Type Library                       
  89. // (NOTE: Here we map each CoClass to its Default Interface)              
  90. // *********************************************************************//
  91.   DataLinks = IDataSourceLocator;
  92.   MSDAINITIALIZE = IDataInitialize;
  93.   PDPO = IPersistFile;
  94.   RootBinder = IBindResource;
  95.  
  96.  
  97. // *********************************************************************//
  98. // Declaration of structures, unions and aliases.                         
  99. // *********************************************************************//
  100.   wireHWND = ^TGUID; 
  101.   PUINT1 = ^LongWord; {*}
  102.   PWord1 = ^Word; {*}
  103.   PUserType1 = ^TGUID; {*}
  104.   PUserType2 = ^TGUID; {*}
  105.   PPUserType1 = ^PUserType1; {*}
  106.   PUserType3 = ^TGUID; {*}
  107.   PUserType4 = ^TGUID; {*}
  108.   PUserType5 = ^TGUID; {*}
  109.   PByte1 = ^Byte; {*}
  110.  
  111.   LONG_PTR = Integer; 
  112.  
  113.   __MIDL_IWinTypes_0009 = record
  114.     case Integer of
  115.       0: (hInproc: Integer);
  116.       1: (hRemote: Integer);
  117.   end;
  118.  
  119.   _RemotableHandle = packed record
  120.     fContext: Integer;
  121.     u: __MIDL_IWinTypes_0009;
  122.   end;
  123.  
  124.   _COAUTHIDENTITY = packed record
  125.     User: ^Word;
  126.     UserLength: LongWord;
  127.     Domain: ^Word;
  128.     DomainLength: LongWord;
  129.     Password: ^Word;
  130.     PasswordLength: LongWord;
  131.     Flags: LongWord;
  132.   end;
  133.  
  134.   _COAUTHINFO = packed record
  135.     dwAuthnSvc: LongWord;
  136.     dwAuthzSvc: LongWord;
  137.     pwszServerPrincName: PWideChar;
  138.     dwAuthnLevel: LongWord;
  139.     dwImpersonationLevel: LongWord;
  140.     pAuthIdentityData: ^TGUID;
  141.     dwCapabilities: LongWord;
  142.   end;
  143.  
  144.   _COSERVERINFO = packed record
  145.     dwReserved1: LongWord;
  146.     pwszName: PWideChar;
  147.     pAuthInfo: ^TGUID;
  148.     dwReserved2: LongWord;
  149.   end;
  150.  
  151.   tagDBPROPIDSET = packed record
  152.     rgPropertyIDs: ^LongWord;
  153.     cPropertyIDs: LongWord;
  154.     guidPropertySet: TGUID;
  155.   end;
  156.  
  157.   __MIDL_DBStructureDefinitions_0001 = record
  158.     case Integer of
  159.       0: (guid: TGUID);
  160.       1: (pguid: ^TGUID);
  161.   end;
  162.  
  163.   __MIDL_DBStructureDefinitions_0002 = record
  164.     case Integer of
  165.       0: (pwszName: PWideChar);
  166.       1: (ulPropid: LongWord);
  167.   end;
  168.  
  169.   tagDBID = packed record
  170.     uGuid: __MIDL_DBStructureDefinitions_0001;
  171.     eKind: LongWord;
  172.     uName: __MIDL_DBStructureDefinitions_0002;
  173.   end;
  174.  
  175.   tagDBPROP = packed record
  176.     dwPropertyID: LongWord;
  177.     dwOptions: LongWord;
  178.     dwStatus: LongWord;
  179.     colid: TGUID;
  180.     vValue: OleVariant;
  181.   end;
  182.  
  183.   tagDBPROPSET = packed record
  184.     rgProperties: ^TGUID;
  185.     cProperties: LongWord;
  186.     guidPropertySet: TGUID;
  187.   end;
  188.  
  189.   tagDBPROPINFO = packed record
  190.     pwszDescription: PWideChar;
  191.     dwPropertyID: LongWord;
  192.     dwFlags: LongWord;
  193.     vtType: Word;
  194.     vValues: OleVariant;
  195.   end;
  196.  
  197.   tagDBPROPINFOSET = packed record
  198.     rgPropertyInfos: ^TGUID;
  199.     cPropertyInfos: LongWord;
  200.     guidPropertySet: TGUID;
  201.   end;
  202.  
  203.   _LARGE_INTEGER = packed record
  204.     QuadPart: Int64;
  205.   end;
  206.  
  207.   _ULARGE_INTEGER = packed record
  208.     QuadPart: Largeuint;
  209.   end;
  210.  
  211.   _FILETIME = packed record
  212.     dwLowDateTime: LongWord;
  213.     dwHighDateTime: LongWord;
  214.   end;
  215.  
  216.   tagSTATSTG = packed record
  217.     pwcsName: PWideChar;
  218.     type_: LongWord;
  219.     cbSize: TGUID;
  220.     mtime: TGUID;
  221.     ctime: TGUID;
  222.     atime: TGUID;
  223.     grfMode: LongWord;
  224.     grfLocksSupported: LongWord;
  225.     clsid: TGUID;
  226.     grfStateBits: LongWord;
  227.     reserved: LongWord;
  228.   end;
  229.  
  230.  
  231. // *********************************************************************//
  232. // Interface: IDataSourceLocator
  233. // Flags:     (4416) Dual OleAutomation Dispatchable
  234. // GUID:      {2206CCB2-19C1-11D1-89E0-00C04FD7A829}
  235. // *********************************************************************//
  236.   IDataSourceLocator = interface(IDispatch)
  237.     ['{2206CCB2-19C1-11D1-89E0-00C04FD7A829}']
  238.     function  Get_hWnd: LONG_PTR; safecall;
  239.     procedure Set_hWnd(phwndParent: LONG_PTR); safecall;
  240.     function  PromptNew: IDispatch; safecall;
  241.     function  PromptEdit(var ppADOConnection: IDispatch): WordBool; safecall;
  242.     property hWnd: LONG_PTR read Get_hWnd;
  243.   end;
  244.  
  245. // *********************************************************************//
  246. // DispIntf:  IDataSourceLocatorDisp
  247. // Flags:     (4416) Dual OleAutomation Dispatchable
  248. // GUID:      {2206CCB2-19C1-11D1-89E0-00C04FD7A829}
  249. // *********************************************************************//
  250.   IDataSourceLocatorDisp = dispinterface
  251.     ['{2206CCB2-19C1-11D1-89E0-00C04FD7A829}']
  252.     property hWnd: LONG_PTR readonly dispid 1610743808;
  253.     function  PromptNew: IDispatch; dispid 1610743810;
  254.     function  PromptEdit(var ppADOConnection: IDispatch): WordBool; dispid 1610743811;
  255.   end;
  256.  
  257. // *********************************************************************//
  258. // Interface: IDBPromptInitialize
  259. // Flags:     (512) Restricted
  260. // GUID:      {2206CCB0-19C1-11D1-89E0-00C04FD7A829}
  261. // *********************************************************************//
  262.   IDBPromptInitialize = interface(IUnknown)
  263.     ['{2206CCB0-19C1-11D1-89E0-00C04FD7A829}']
  264.     function  RemotePromptDataSource(const pUnkOuter: IUnknown; var hWndParent: TGUID; 
  265.                                      dwPromptOptions: LongWord; cSourceTypeFilter: LongWord; 
  266.                                      var rgSourceTypeFilter: LongWord; cchProviderFilter: LongWord; 
  267.                                      var pwszszzProviderFilter: Word; var riid: TGUID; 
  268.                                      var ppDataSource: IUnknown): HResult; stdcall;
  269.     function  PromptFileName(var hWndParent: TGUID; dwPromptOptions: LongWord; 
  270.                              pwszInitialDirectory: PWideChar; pwszInitialFile: PWideChar; 
  271.                              out ppwszSelectedFile: PWideChar): HResult; stdcall;
  272.   end;
  273.  
  274. // *********************************************************************//
  275. // Interface: IDataInitialize
  276. // Flags:     (0)
  277. // GUID:      {2206CCB1-19C1-11D1-89E0-00C04FD7A829}
  278. // *********************************************************************//
  279.   IDataInitialize = interface(IUnknown)
  280.     ['{2206CCB1-19C1-11D1-89E0-00C04FD7A829}']
  281.     function  GetDataSource(const pUnkOuter: IUnknown; dwClsCtx: LongWord; 
  282.                             pwszInitializationString: PWideChar; var riid: TGUID; 
  283.                             var ppDataSource: IUnknown): HResult; stdcall;
  284.     function  GetInitializationString(const pDataSource: IUnknown; fIncludePassword: Shortint; 
  285.                                       out ppwszInitString: PWideChar): HResult; stdcall;
  286.     function  CreateDBInstance(var clsidProvider: TGUID; const pUnkOuter: IUnknown; 
  287.                                dwClsCtx: LongWord; pwszReserved: PWideChar; var riid: TGUID; 
  288.                                out ppDataSource: IUnknown): HResult; stdcall;
  289.     function  RemoteCreateDBInstanceEx(var clsidProvider: TGUID; const pUnkOuter: IUnknown; 
  290.                                        dwClsCtx: LongWord; pwszReserved: PWideChar; 
  291.                                        var pServerInfo: TGUID; cmq: LongWord; rgpIID: PPUserType1; 
  292.                                        out rgpItf: IUnknown; out rghr: HResult): HResult; stdcall;
  293.     function  LoadStringFromStorage(pwszFileName: PWideChar; 
  294.                                     out ppwszInitializationString: PWideChar): HResult; stdcall;
  295.     function  WriteStringToStorage(pwszFileName: PWideChar; pwszInitializationString: PWideChar; 
  296.                                    dwCreationDisposition: LongWord): HResult; stdcall;
  297.   end;
  298.  
  299. // *********************************************************************//
  300. // Interface: IPersist
  301. // Flags:     (0)
  302. // GUID:      {0000010C-0000-0000-C000-000000000046}
  303. // *********************************************************************//
  304.   IPersist = interface(IUnknown)
  305.     ['{0000010C-0000-0000-C000-000000000046}']
  306.     function  GetClassID(out pClassID: TGUID): HResult; stdcall;
  307.   end;
  308.  
  309. // *********************************************************************//
  310. // Interface: IPersistFile
  311. // Flags:     (0)
  312. // GUID:      {0000010B-0000-0000-C000-000000000046}
  313. // *********************************************************************//
  314.   IPersistFile = interface(IPersist)
  315.     ['{0000010B-0000-0000-C000-000000000046}']
  316.     function  IsDirty: HResult; stdcall;
  317.     function  Load(pszFileName: PWideChar; dwMode: LongWord): HResult; stdcall;
  318.     function  Save(pszFileName: PWideChar; fRemember: Integer): HResult; stdcall;
  319.     function  SaveCompleted(pszFileName: PWideChar): HResult; stdcall;
  320.     function  GetCurFile(out ppszFileName: PWideChar): HResult; stdcall;
  321.   end;
  322.  
  323. // *********************************************************************//
  324. // Interface: IBindResource
  325. // Flags:     (0)
  326. // GUID:      {0C733AB1-2A1C-11CE-ADE5-00AA0044773D}
  327. // *********************************************************************//
  328.   IBindResource = interface(IUnknown)
  329.     ['{0C733AB1-2A1C-11CE-ADE5-00AA0044773D}']
  330.     function  RemoteBind(const pUnkOuter: IUnknown; pwszURL: PWideChar; dwBindURLFlags: LongWord; 
  331.                          var rguid: TGUID; var riid: TGUID; const pAuthenticate: IAuthenticate; 
  332.                          const pSessionUnkOuter: IUnknown; var piid: TGUID; 
  333.                          var ppSession: IUnknown; var pdwBindStatus: LongWord; out ppUnk: IUnknown): HResult; stdcall;
  334.   end;
  335.  
  336. // *********************************************************************//
  337. // Interface: ICreateRow
  338. // Flags:     (0)
  339. // GUID:      {0C733AB2-2A1C-11CE-ADE5-00AA0044773D}
  340. // *********************************************************************//
  341.   ICreateRow = interface(IUnknown)
  342.     ['{0C733AB2-2A1C-11CE-ADE5-00AA0044773D}']
  343.     function  RemoteCreateRow(const pUnkOuter: IUnknown; pwszURL: PWideChar; 
  344.                               dwBindURLFlags: LongWord; var rguid: TGUID; var riid: TGUID; 
  345.                               const pAuthenticate: IAuthenticate; const pSessionUnkOuter: IUnknown; 
  346.                               var piid: TGUID; var ppSession: IUnknown; 
  347.                               var pdwBindStatus: LongWord; var ppwszNewURL: PWideChar; 
  348.                               out ppUnk: IUnknown): HResult; stdcall;
  349.   end;
  350.  
  351. // *********************************************************************//
  352. // Interface: IAuthenticate
  353. // Flags:     (0)
  354. // GUID:      {79EAC9D0-BAF9-11CE-8C82-00AA004BA90B}
  355. // *********************************************************************//
  356.   IAuthenticate = interface(IUnknown)
  357.     ['{79EAC9D0-BAF9-11CE-8C82-00AA004BA90B}']
  358.     function  Authenticate(out phwnd: wireHWND; out pszUsername: PWideChar; 
  359.                            out pszPassword: PWideChar): HResult; stdcall;
  360.   end;
  361.  
  362. // *********************************************************************//
  363. // Interface: IRegisterProvider
  364. // Flags:     (0)
  365. // GUID:      {0C733AB9-2A1C-11CE-ADE5-00AA0044773D}
  366. // *********************************************************************//
  367.   IRegisterProvider = interface(IUnknown)
  368.     ['{0C733AB9-2A1C-11CE-ADE5-00AA0044773D}']
  369.     function  RemoteGetURLMapping(pwszURL: PWideChar; dwReserved: LongWord; 
  370.                                   out pclsidProvider: TGUID): HResult; stdcall;
  371.     function  SetURLMapping(pwszURL: PWideChar; dwReserved: LongWord; var rclsidProvider: TGUID): HResult; stdcall;
  372.     function  UnregisterProvider(pwszURL: PWideChar; dwReserved: LongWord; var rclsidProvider: TGUID): HResult; stdcall;
  373.   end;
  374.  
  375. // *********************************************************************//
  376. // Interface: IDBProperties
  377. // Flags:     (0)
  378. // GUID:      {0C733A8A-2A1C-11CE-ADE5-00AA0044773D}
  379. // *********************************************************************//
  380.   IDBProperties = interface(IUnknown)
  381.     ['{0C733A8A-2A1C-11CE-ADE5-00AA0044773D}']
  382.     function  RemoteGetProperties(cPropertyIDSets: LongWord; var rgPropertyIDSets: TGUID; 
  383.                                   var pcPropertySets: LongWord; out prgPropertySets: PUserType4; 
  384.                                   out ppErrorInfoRem: IErrorInfo): HResult; stdcall;
  385.     function  RemoteGetPropertyInfo(cPropertyIDSets: LongWord; var rgPropertyIDSets: TGUID; 
  386.                                     var pcPropertyInfoSets: LongWord; 
  387.                                     out prgPropertyInfoSets: PUserType5; var pcOffsets: LongWord; 
  388.                                     out prgDescOffsets: PUINT1; var pcbDescBuffer: LongWord; 
  389.                                     var ppDescBuffer: PWord1; out ppErrorInfoRem: IErrorInfo): HResult; stdcall;
  390.     function  RemoteSetProperties(cPropertySets: LongWord; var rgPropertySets: TGUID; 
  391.                                   cTotalProps: LongWord; out rgPropStatus: LongWord; 
  392.                                   out ppErrorInfoRem: IErrorInfo): HResult; stdcall;
  393.   end;
  394.  
  395. // *********************************************************************//
  396. // Interface: IDBBinderProperties
  397. // Flags:     (0)
  398. // GUID:      {0C733AB3-2A1C-11CE-ADE5-00AA0044773D}
  399. // *********************************************************************//
  400.   IDBBinderProperties = interface(IDBProperties)
  401.     ['{0C733AB3-2A1C-11CE-ADE5-00AA0044773D}']
  402.     function  Reset: HResult; stdcall;
  403.   end;
  404.  
  405. // *********************************************************************//
  406. // Interface: IMarshal
  407. // Flags:     (0)
  408. // GUID:      {00000003-0000-0000-C000-000000000046}
  409. // *********************************************************************//
  410.   IMarshal = interface(IUnknown)
  411.     ['{00000003-0000-0000-C000-000000000046}']
  412.     function  GetUnmarshalClass(var riid: TGUID; var pv: Pointer; dwDestContext: LongWord; 
  413.                                 var pvDestContext: Pointer; mshlflags: LongWord; out pCid: TGUID): HResult; stdcall;
  414.     function  GetMarshalSizeMax(var riid: TGUID; var pv: Pointer; dwDestContext: LongWord; 
  415.                                 var pvDestContext: Pointer; mshlflags: LongWord; out pSize: LongWord): HResult; stdcall;
  416.     function  MarshalInterface(const pstm: IStream; var riid: TGUID; var pv: Pointer; 
  417.                                dwDestContext: LongWord; var pvDestContext: Pointer; 
  418.                                mshlflags: LongWord): HResult; stdcall;
  419.     function  UnmarshalInterface(const pstm: IStream; var riid: TGUID; out ppv: Pointer): HResult; stdcall;
  420.     function  ReleaseMarshalData(const pstm: IStream): HResult; stdcall;
  421.     function  DisconnectObject(dwReserved: LongWord): HResult; stdcall;
  422.   end;
  423.  
  424. // *********************************************************************//
  425. // Interface: IErrorInfo
  426. // Flags:     (0)
  427. // GUID:      {1CF2B120-547D-101B-8E65-08002B2BD119}
  428. // *********************************************************************//
  429.   IErrorInfo = interface(IUnknown)
  430.     ['{1CF2B120-547D-101B-8E65-08002B2BD119}']
  431.     function  GetGUID(out pguid: TGUID): HResult; stdcall;
  432.     function  GetSource(out pBstrSource: WideString): HResult; stdcall;
  433.     function  GetDescription(out pBstrDescription: WideString): HResult; stdcall;
  434.     function  GetHelpFile(out pBstrHelpFile: WideString): HResult; stdcall;
  435.     function  GetHelpContext(out pdwHelpContext: LongWord): HResult; stdcall;
  436.   end;
  437.  
  438. // *********************************************************************//
  439. // Interface: ISequentialStream
  440. // Flags:     (0)
  441. // GUID:      {0C733A30-2A1C-11CE-ADE5-00AA0044773D}
  442. // *********************************************************************//
  443.   ISequentialStream = interface(IUnknown)
  444.     ['{0C733A30-2A1C-11CE-ADE5-00AA0044773D}']
  445.     function  RemoteRead(out pv: Byte; cb: LongWord; out pcbRead: LongWord): HResult; stdcall;
  446.     function  RemoteWrite(var pv: Byte; cb: LongWord; out pcbWritten: LongWord): HResult; stdcall;
  447.   end;
  448.  
  449. // *********************************************************************//
  450. // Interface: IStream
  451. // Flags:     (0)
  452. // GUID:      {0000000C-0000-0000-C000-000000000046}
  453. // *********************************************************************//
  454.   IStream = interface(ISequentialStream)
  455.     ['{0000000C-0000-0000-C000-000000000046}']
  456.     function  RemoteSeek(dlibMove: TGUID; dwOrigin: LongWord; out plibNewPosition: TGUID): HResult; stdcall;
  457.     function  SetSize(libNewSize: TGUID): HResult; stdcall;
  458.     function  RemoteCopyTo(const pstm: IStream; cb: TGUID; out pcbRead: TGUID; out pcbWritten: TGUID): HResult; stdcall;
  459.     function  Commit(grfCommitFlags: LongWord): HResult; stdcall;
  460.     function  Revert: HResult; stdcall;
  461.     function  LockRegion(libOffset: TGUID; cb: TGUID; dwLockType: LongWord): HResult; stdcall;
  462.     function  UnlockRegion(libOffset: TGUID; cb: _ULARGE_INTEGER; dwLockType: LongWord): HResult; stdcall;
  463.     function  Stat(out pstatstg: TGUID; grfStatFlag: LongWord): HResult; stdcall;
  464.     function  Clone(out ppstm: IStream): HResult; stdcall;
  465.   end;
  466.  
  467. // *********************************************************************//
  468. // The Class CoDataLinks provides a Create and CreateRemote method to          
  469. // create instances of the default interface IDataSourceLocator exposed by              
  470. // the CoClass DataLinks. The functions are intended to be used by             
  471. // clients wishing to automate the CoClass objects exposed by the         
  472. // server of this typelibrary.                                            
  473. // *********************************************************************//
  474.   CoDataLinks = class
  475.     class function Create: IDataSourceLocator;
  476.     class function CreateRemote(const MachineName: string): IDataSourceLocator;
  477.   end;
  478.  
  479. // *********************************************************************//
  480. // The Class CoMSDAINITIALIZE provides a Create and CreateRemote method to          
  481. // create instances of the default interface IDataInitialize exposed by              
  482. // the CoClass MSDAINITIALIZE. The functions are intended to be used by             
  483. // clients wishing to automate the CoClass objects exposed by the         
  484. // server of this typelibrary.                                            
  485. // *********************************************************************//
  486.   CoMSDAINITIALIZE = class
  487.     class function Create: IDataInitialize;
  488.     class function CreateRemote(const MachineName: string): IDataInitialize;
  489.   end;
  490.  
  491. // *********************************************************************//
  492. // The Class CoPDPO provides a Create and CreateRemote method to          
  493. // create instances of the default interface IPersistFile exposed by              
  494. // the CoClass PDPO. The functions are intended to be used by             
  495. // clients wishing to automate the CoClass objects exposed by the         
  496. // server of this typelibrary.                                            
  497. // *********************************************************************//
  498.   CoPDPO = class
  499.     class function Create: IPersistFile;
  500.     class function CreateRemote(const MachineName: string): IPersistFile;
  501.   end;
  502.  
  503. // *********************************************************************//
  504. // The Class CoRootBinder provides a Create and CreateRemote method to          
  505. // create instances of the default interface IBindResource exposed by              
  506. // the CoClass RootBinder. The functions are intended to be used by             
  507. // clients wishing to automate the CoClass objects exposed by the         
  508. // server of this typelibrary.                                            
  509. // *********************************************************************//
  510.   CoRootBinder = class
  511.     class function Create: IBindResource;
  512.     class function CreateRemote(const MachineName: string): IBindResource;
  513.   end;
  514.  
  515. implementation
  516.  
  517. uses ComObj;
  518.  
  519. class function CoDataLinks.Create: IDataSourceLocator;
  520. begin
  521.   Result := CreateComObject(CLASS_DataLinks) as IDataSourceLocator;
  522. end;
  523.  
  524. class function CoDataLinks.CreateRemote(const MachineName: string): IDataSourceLocator;
  525. begin
  526.   Result := CreateRemoteComObject(MachineName, CLASS_DataLinks) as IDataSourceLocator;
  527. end;
  528.  
  529. class function CoMSDAINITIALIZE.Create: IDataInitialize;
  530. begin
  531.   Result := CreateComObject(CLASS_MSDAINITIALIZE) as IDataInitialize;
  532. end;
  533.  
  534. class function CoMSDAINITIALIZE.CreateRemote(const MachineName: string): IDataInitialize;
  535. begin
  536.   Result := CreateRemoteComObject(MachineName, CLASS_MSDAINITIALIZE) as IDataInitialize;
  537. end;
  538.  
  539. class function CoPDPO.Create: IPersistFile;
  540. begin
  541.   Result := CreateComObject(CLASS_PDPO) as IPersistFile;
  542. end;
  543.  
  544. class function CoPDPO.CreateRemote(const MachineName: string): IPersistFile;
  545. begin
  546.   Result := CreateRemoteComObject(MachineName, CLASS_PDPO) as IPersistFile;
  547. end;
  548.  
  549. class function CoRootBinder.Create: IBindResource;
  550. begin
  551.   Result := CreateComObject(CLASS_RootBinder) as IBindResource;
  552. end;
  553.  
  554. class function CoRootBinder.CreateRemote(const MachineName: string): IBindResource;
  555. begin
  556.   Result := CreateRemoteComObject(MachineName, CLASS_RootBinder) as IBindResource;
  557. end;
  558.  
  559. end.
  560.