SvrObj_Orders_TLB.pas
上传用户:etonglee
上传日期:2014-03-01
资源大小:698k
文件大小:7k
源码类别:

Internet/IE编程

开发平台:

Delphi

  1. unit SvrObj_Orders_TLB;
  2. // ************************************************************************ //
  3. // WARNING                                                                    
  4. // -------                                                                    
  5. // The types declared in this file were generated from data read from a       
  6. // Type Library. If this type library is explicitly or indirectly (via        
  7. // another type library referring to this type library) re-imported, or the   
  8. // 'Refresh' command of the Type Library Editor activated while editing the   
  9. // Type Library, the contents of this file will be regenerated and all        
  10. // manual modifications will be lost.                                         
  11. // ************************************************************************ //
  12. // PASTLWTR : 1.2
  13. // File generated on 2005-11-19 21:31:21 from Type Library described below.
  14. // ************************************************************************  //
  15. // Type Lib: E:ʵսCOM+DemoServerSvrObj_Orders.tlb (1)
  16. // LIBID: {ED33E15C-8864-4B83-B2EA-59A9D1E7889E}
  17. // LCID: 0
  18. // Helpfile: 
  19. // HelpString: SvrObj_Orders Library
  20. // DepndLst: 
  21. //   (1) v1.0 Midas, (C:WINNTsystem32midas.dll)
  22. //   (2) v2.0 stdole, (C:WINNTSystem32stdole2.tlb)
  23. // ************************************************************************ //
  24. {$TYPEDADDRESS OFF} // Unit must be compiled without type-checked pointers. 
  25. {$WARN SYMBOL_PLATFORM OFF}
  26. {$WRITEABLECONST ON}
  27. {$VARPROPSETTER ON}
  28. interface
  29. uses Windows, ActiveX, Classes, Graphics, Midas, StdVCL, Variants;
  30.   
  31. // *********************************************************************//
  32. // GUIDS declared in the TypeLibrary. Following prefixes are used:        
  33. //   Type Libraries     : LIBID_xxxx                                      
  34. //   CoClasses          : CLASS_xxxx                                      
  35. //   DISPInterfaces     : DIID_xxxx                                       
  36. //   Non-DISP interfaces: IID_xxxx                                        
  37. // *********************************************************************//
  38. const
  39.   // TypeLibrary Major and minor versions
  40.   SvrObj_OrdersMajorVersion = 1;
  41.   SvrObj_OrdersMinorVersion = 0;
  42.   LIBID_SvrObj_Orders: TGUID = '{ED33E15C-8864-4B83-B2EA-59A9D1E7889E}';
  43.   IID_IOrders: TGUID = '{29277AE5-33EA-4768-B0D4-C497AF55C1DA}';
  44.   CLASS_Orders: TGUID = '{821B5C18-4076-431D-8290-0DD86F1D7363}';
  45. type
  46. // *********************************************************************//
  47. // Forward declaration of types defined in TypeLibrary                    
  48. // *********************************************************************//
  49.   IOrders = interface;
  50.   IOrdersDisp = dispinterface;
  51. // *********************************************************************//
  52. // Declaration of CoClasses defined in Type Library                       
  53. // (NOTE: Here we map each CoClass to its Default Interface)              
  54. // *********************************************************************//
  55.   Orders = IOrders;
  56. // *********************************************************************//
  57. // Interface: IOrders
  58. // Flags:     (4416) Dual OleAutomation Dispatchable
  59. // GUID:      {29277AE5-33EA-4768-B0D4-C497AF55C1DA}
  60. // *********************************************************************//
  61.   IOrders = interface(IAppServer)
  62.     ['{29277AE5-33EA-4768-B0D4-C497AF55C1DA}']
  63.     procedure GetOrders(BeginDate: TDateTime; EndDate: TDateTime; var RetData: OleVariant); safecall;
  64.     procedure GetOrder(OrderID: Integer; var RetData: OleVariant); safecall;
  65.     procedure GetOrderDetail(OrderID: Integer; var RetData: OleVariant); safecall;
  66.     procedure GetOtherData(var RetData: OleVariant); safecall;
  67.     procedure UpdateOrder(OrderID: Integer; OrderDelta: OleVariant; OrderDetailDelta: OleVariant; 
  68.                           var IsOk: WordBool; var ErrorMsg: WideString); safecall;
  69.   end;
  70. // *********************************************************************//
  71. // DispIntf:  IOrdersDisp
  72. // Flags:     (4416) Dual OleAutomation Dispatchable
  73. // GUID:      {29277AE5-33EA-4768-B0D4-C497AF55C1DA}
  74. // *********************************************************************//
  75.   IOrdersDisp = dispinterface
  76.     ['{29277AE5-33EA-4768-B0D4-C497AF55C1DA}']
  77.     procedure GetOrders(BeginDate: TDateTime; EndDate: TDateTime; var RetData: OleVariant); dispid 301;
  78.     procedure GetOrder(OrderID: Integer; var RetData: OleVariant); dispid 302;
  79.     procedure GetOrderDetail(OrderID: Integer; var RetData: OleVariant); dispid 303;
  80.     procedure GetOtherData(var RetData: OleVariant); dispid 304;
  81.     procedure UpdateOrder(OrderID: Integer; OrderDelta: OleVariant; OrderDetailDelta: OleVariant; 
  82.                           var IsOk: WordBool; var ErrorMsg: WideString); dispid 305;
  83.     function AS_ApplyUpdates(const ProviderName: WideString; Delta: OleVariant; MaxErrors: Integer; 
  84.                              out ErrorCount: Integer; var OwnerData: OleVariant): OleVariant; dispid 20000000;
  85.     function AS_GetRecords(const ProviderName: WideString; Count: Integer; out RecsOut: Integer; 
  86.                            Options: Integer; const CommandText: WideString; var Params: OleVariant; 
  87.                            var OwnerData: OleVariant): OleVariant; dispid 20000001;
  88.     function AS_DataRequest(const ProviderName: WideString; Data: OleVariant): OleVariant; dispid 20000002;
  89.     function AS_GetProviderNames: OleVariant; dispid 20000003;
  90.     function AS_GetParams(const ProviderName: WideString; var OwnerData: OleVariant): OleVariant; dispid 20000004;
  91.     function AS_RowRequest(const ProviderName: WideString; Row: OleVariant; RequestType: Integer; 
  92.                            var OwnerData: OleVariant): OleVariant; dispid 20000005;
  93.     procedure AS_Execute(const ProviderName: WideString; const CommandText: WideString; 
  94.                          var Params: OleVariant; var OwnerData: OleVariant); dispid 20000006;
  95.   end;
  96. // *********************************************************************//
  97. // The Class CoOrders provides a Create and CreateRemote method to          
  98. // create instances of the default interface IOrders exposed by              
  99. // the CoClass Orders. The functions are intended to be used by             
  100. // clients wishing to automate the CoClass objects exposed by the         
  101. // server of this typelibrary.                                            
  102. // *********************************************************************//
  103.   CoOrders = class
  104.     class function Create: IOrders;
  105.     class function CreateRemote(const MachineName: string): IOrders;
  106.   end;
  107. implementation
  108. uses ComObj;
  109. class function CoOrders.Create: IOrders;
  110. begin
  111.   Result := CreateComObject(CLASS_Orders) as IOrders;
  112. end;
  113. class function CoOrders.CreateRemote(const MachineName: string): IOrders;
  114. begin
  115.   Result := CreateRemoteComObject(MachineName, CLASS_Orders) as IOrders;
  116. end;
  117. end.