Subversion Repositories simple_log_event

Rev

Rev 3 | Blame | Compare with Previous | Last modification | View Log | RSS feed

  1. unit ViaThinkSoftSimpleLogEvent_TLB;
  2.  
  3. // ************************************************************************ //
  4. // WARNUNG
  5. // -------
  6. // Die in dieser Datei deklarierten Typen wurden aus Daten einer Typbibliothek
  7. // generiert. Wenn diese Typbibliothek explizit oder indirekt (über eine
  8. // andere Typbibliothek) reimportiert wird oder wenn der Befehl
  9. // 'Aktualisieren' im Typbibliotheks-Editor während des Bearbeitens der
  10. // Typbibliothek aktiviert ist, wird der Inhalt dieser Datei neu generiert und
  11. // alle manuell vorgenommenen Änderungen gehen verloren.
  12. // ************************************************************************ //
  13.  
  14. // $Rev: 52393 $
  15. // Datei am 03.05.2020 21:20:05 erzeugt aus der unten beschriebenen Typbibliothek.
  16.  
  17. // ************************************************************************  //
  18. // Typbib.: C:\Users\DELL User\SVN\SimpleLogEvent\trunk\TLB\ViaThinkSoftSimpleLogEvent (1)
  19. // LIBID: {D7654BA7-41D0-4FF9-8543-C3A4DA936856}
  20. // LCID: 0
  21. // Hilfedatei:
  22. // Hilfe-String: ViaThinkSoftSimpleLogEvent Library
  23. // Liste der Abhäng.:
  24. //   (1) v2.0 stdole, (C:\Windows\SysWOW64\stdole2.tlb)
  25. // SYS_KIND: SYS_WIN32
  26. // ************************************************************************ //
  27. {$TYPEDADDRESS OFF} // Unit muss ohne Typüberprüfung für Zeiger compiliert werden.
  28. {$WARN SYMBOL_PLATFORM OFF}
  29. {$WRITEABLECONST ON}
  30. {$VARPROPSETTER ON}
  31. {$ALIGN 4}
  32.  
  33. interface
  34.  
  35. uses Winapi.Windows, System.Classes, System.Variants, System.Win.StdVCL, Vcl.Graphics, Vcl.OleServer, Winapi.ActiveX;
  36.  
  37. // *********************************************************************//
  38. // In der Typbibliothek deklarierte GUIDS. Die folgenden Präfixe werden verwendet:
  39. //   Typbibliotheken      : LIBID_xxxx
  40. //   CoClasses            : CLASS_xxxx
  41. //   DISPInterfaces       : DIID_xxxx
  42. //   Nicht-DISP-Interfaces: IID_xxxx
  43. // *********************************************************************//
  44. const
  45.   // Haupt- und Nebenversionen der Typbibliothek
  46.   ViaThinkSoftSimpleLogEventMajorVersion = 1;
  47.   ViaThinkSoftSimpleLogEventMinorVersion = 0;
  48.  
  49.   LIBID_ViaThinkSoftSimpleLogEvent: TGUID = '{D7654BA7-41D0-4FF9-8543-C3A4DA936856}';
  50.  
  51.   IID_IViaThinkSoftSimpleEventLog: TGUID = '{4094657E-8199-460F-A3DD-5BB63B6B0F65}';
  52.   CLASS_ViaThinkSoftSimpleEventLog: TGUID = '{E4270053-A217-498C-B395-9EF33187E8C2}';
  53.  
  54. // *********************************************************************//
  55. // Deklaration von in der Typbibliothek definierten Aufzählungen
  56. // *********************************************************************//
  57. // Konstanten für enum LogEventType
  58. type
  59.   LogEventType = TOleEnum;
  60. const
  61.   Success = $00000000;
  62.   Informational = $00000001;
  63.   Warning = $00000002;
  64.   Error = $00000003;
  65.  
  66. type
  67.  
  68. // *********************************************************************//
  69. // Forward-Deklaration von in der Typbibliothek definierten Typen
  70. // *********************************************************************//
  71.   IViaThinkSoftSimpleEventLog = interface;
  72.   IViaThinkSoftSimpleEventLogDisp = dispinterface;
  73.  
  74. // *********************************************************************//
  75. // Deklaration von in der Typbibliothek definierten CoClasses
  76. // (HINWEIS: Hier wird jede CoClass ihrem Standard-Interface zugewiesen)
  77. // *********************************************************************//
  78.   ViaThinkSoftSimpleEventLog = IViaThinkSoftSimpleEventLog;
  79.  
  80.  
  81. // *********************************************************************//
  82. // Interface: IViaThinkSoftSimpleEventLog
  83. // Flags:     (4416) Dual OleAutomation Dispatchable
  84. // GUID:      {4094657E-8199-460F-A3DD-5BB63B6B0F65}
  85. // *********************************************************************//
  86.   IViaThinkSoftSimpleEventLog = interface(IDispatch)
  87.     ['{4094657E-8199-460F-A3DD-5BB63B6B0F65}']
  88.     procedure LogEvent(const SourceName: WideString; EventType: LogEventType;
  89.                        const LogMsg: WideString); safecall;
  90.     procedure LogSimulate(const SourceName: WideString; EventType: LogEventType;
  91.                           const LogMsg: WideString; out Reason: OleVariant); safecall;
  92.   end;
  93.  
  94. // *********************************************************************//
  95. // DispIntf:  IViaThinkSoftSimpleEventLogDisp
  96. // Flags:     (4416) Dual OleAutomation Dispatchable
  97. // GUID:      {4094657E-8199-460F-A3DD-5BB63B6B0F65}
  98. // *********************************************************************//
  99.   IViaThinkSoftSimpleEventLogDisp = dispinterface
  100.     ['{4094657E-8199-460F-A3DD-5BB63B6B0F65}']
  101.     procedure LogEvent(const SourceName: WideString; EventType: LogEventType;
  102.                        const LogMsg: WideString); dispid 201;
  103.     procedure LogSimulate(const SourceName: WideString; EventType: LogEventType;
  104.                           const LogMsg: WideString; out Reason: OleVariant); dispid 202;
  105.   end;
  106.  
  107. // *********************************************************************//
  108. // Die Klasse CoViaThinkSoftSimpleEventLog stellt die Methoden Create und CreateRemote zur
  109. // Verfügung, um Instanzen des Standard-Interface IViaThinkSoftSimpleEventLog, dargestellt
  110. // von CoClass ViaThinkSoftSimpleEventLog, zu erzeugen. Diese Funktionen können
  111. // von einem Client verwendet werden, der die CoClasses automatisieren
  112. // will, die von dieser Typbibliothek dargestellt werden.
  113. // *********************************************************************//
  114.   CoViaThinkSoftSimpleEventLog = class
  115.     class function Create: IViaThinkSoftSimpleEventLog;
  116.     class function CreateRemote(const MachineName: string): IViaThinkSoftSimpleEventLog;
  117.   end;
  118.  
  119. implementation
  120.  
  121. uses System.Win.ComObj;
  122.  
  123. class function CoViaThinkSoftSimpleEventLog.Create: IViaThinkSoftSimpleEventLog;
  124. begin
  125.   Result := CreateComObject(CLASS_ViaThinkSoftSimpleEventLog) as IViaThinkSoftSimpleEventLog;
  126. end;
  127.  
  128. class function CoViaThinkSoftSimpleEventLog.CreateRemote(const MachineName: string): IViaThinkSoftSimpleEventLog;
  129. begin
  130.   Result := CreateRemoteComObject(MachineName, CLASS_ViaThinkSoftSimpleEventLog) as IViaThinkSoftSimpleEventLog;
  131. end;
  132.  
  133. end.
  134.  
  135.