Server_TLB.pas
上传用户:psxgmh
上传日期:2013-04-08
资源大小:15112k
文件大小:6k
源码类别:

Delphi/CppBuilder

开发平台:

Delphi

  1. unit Server_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 : $Revision:   1.130  $
  13. // File generated on 2002-3-10 21:22:44 from Type Library described below.
  14. // ************************************************************************  //
  15. // Type Lib: E:论文第七章 三层应用程序创建code7-3Server.tlb (1)
  16. // LIBID: {24601136-658B-4865-8B8E-B758B38C1155}
  17. // LCID: 0
  18. // Helpfile: 
  19. // DepndLst: 
  20. //   (1) v2.0 stdole, (D:WINNTSystem32stdole2.tlb)
  21. //   (2) v4.0 StdVCL, (D:WINNTSystem32stdvcl40.dll)
  22. //   (3) v1.0 Midas, (D:WINNTSystem32midas.dll)
  23. // ************************************************************************ //
  24. {$TYPEDADDRESS OFF} // Unit must be compiled without type-checked pointers. 
  25. {$WARN SYMBOL_PLATFORM OFF}
  26. {$WRITEABLECONST ON}
  27. interface
  28. uses ActiveX, Classes, Graphics, Midas, StdVCL, Variants, Windows;
  29.   
  30. // *********************************************************************//
  31. // GUIDS declared in the TypeLibrary. Following prefixes are used:        
  32. //   Type Libraries     : LIBID_xxxx                                      
  33. //   CoClasses          : CLASS_xxxx                                      
  34. //   DISPInterfaces     : DIID_xxxx                                       
  35. //   Non-DISP interfaces: IID_xxxx                                        
  36. // *********************************************************************//
  37. const
  38.   // TypeLibrary Major and minor versions
  39.   ServerMajorVersion = 1;
  40.   ServerMinorVersion = 0;
  41.   LIBID_Server: TGUID = '{24601136-658B-4865-8B8E-B758B38C1155}';
  42.   IID_ICorrectServer: TGUID = '{442435E7-9268-43FA-A9F2-BCC568A2A825}';
  43.   CLASS_CorrectServer: TGUID = '{3E1FA103-9C10-4C10-A0DB-1D725802BAE2}';
  44. type
  45. // *********************************************************************//
  46. // Forward declaration of types defined in TypeLibrary                    
  47. // *********************************************************************//
  48.   ICorrectServer = interface;
  49.   ICorrectServerDisp = dispinterface;
  50. // *********************************************************************//
  51. // Declaration of CoClasses defined in Type Library                       
  52. // (NOTE: Here we map each CoClass to its Default Interface)              
  53. // *********************************************************************//
  54.   CorrectServer = ICorrectServer;
  55. // *********************************************************************//
  56. // Interface: ICorrectServer
  57. // Flags:     (4416) Dual OleAutomation Dispatchable
  58. // GUID:      {442435E7-9268-43FA-A9F2-BCC568A2A825}
  59. // *********************************************************************//
  60.   ICorrectServer = interface(IAppServer)
  61.     ['{442435E7-9268-43FA-A9F2-BCC568A2A825}']
  62.     procedure GetServerName(var vName: OleVariant); safecall;
  63.     procedure GetSystemTime(var vTime: OleVariant); safecall;
  64.   end;
  65. // *********************************************************************//
  66. // DispIntf:  ICorrectServerDisp
  67. // Flags:     (4416) Dual OleAutomation Dispatchable
  68. // GUID:      {442435E7-9268-43FA-A9F2-BCC568A2A825}
  69. // *********************************************************************//
  70.   ICorrectServerDisp = dispinterface
  71.     ['{442435E7-9268-43FA-A9F2-BCC568A2A825}']
  72.     procedure GetServerName(var vName: OleVariant); dispid 1;
  73.     procedure GetSystemTime(var vTime: OleVariant); dispid 2;
  74.     function  AS_ApplyUpdates(const ProviderName: WideString; Delta: OleVariant; 
  75.                               MaxErrors: Integer; out ErrorCount: Integer; var OwnerData: OleVariant): OleVariant; dispid 20000000;
  76.     function  AS_GetRecords(const ProviderName: WideString; Count: Integer; out RecsOut: Integer; 
  77.                             Options: Integer; const CommandText: WideString; 
  78.                             var Params: OleVariant; var OwnerData: OleVariant): OleVariant; dispid 20000001;
  79.     function  AS_DataRequest(const ProviderName: WideString; Data: OleVariant): OleVariant; dispid 20000002;
  80.     function  AS_GetProviderNames: OleVariant; dispid 20000003;
  81.     function  AS_GetParams(const ProviderName: WideString; var OwnerData: OleVariant): OleVariant; dispid 20000004;
  82.     function  AS_RowRequest(const ProviderName: WideString; Row: OleVariant; RequestType: Integer; 
  83.                             var OwnerData: OleVariant): OleVariant; dispid 20000005;
  84.     procedure AS_Execute(const ProviderName: WideString; const CommandText: WideString; 
  85.                          var Params: OleVariant; var OwnerData: OleVariant); dispid 20000006;
  86.   end;
  87. // *********************************************************************//
  88. // The Class CoCorrectServer provides a Create and CreateRemote method to          
  89. // create instances of the default interface ICorrectServer exposed by              
  90. // the CoClass CorrectServer. The functions are intended to be used by             
  91. // clients wishing to automate the CoClass objects exposed by the         
  92. // server of this typelibrary.                                            
  93. // *********************************************************************//
  94.   CoCorrectServer = class
  95.     class function Create: ICorrectServer;
  96.     class function CreateRemote(const MachineName: string): ICorrectServer;
  97.   end;
  98. implementation
  99. uses ComObj;
  100. class function CoCorrectServer.Create: ICorrectServer;
  101. begin
  102.   Result := CreateComObject(CLASS_CorrectServer) as ICorrectServer;
  103. end;
  104. class function CoCorrectServer.CreateRemote(const MachineName: string): ICorrectServer;
  105. begin
  106.   Result := CreateRemoteComObject(MachineName, CLASS_CorrectServer) as ICorrectServer;
  107. end;
  108. end.