Einzelnen Beitrag anzeigen

Benutzerbild von baumina
baumina

Registriert seit: 5. Mai 2008
Ort: Oberschwaben
1.275 Beiträge
 
Delphi 11 Alexandria
 
#15

AW: Delphi 7 - Dienst - Startet seit ca. März 2015 nicht mehr

  Alt 2. Sep 2015, 13:26
Wenn ich Unter Delphi XE eine Service-Application beginne, kommt bei mir folgender Hinweis in der Program-Datei, keine Ahnung ob dich das weiter bringt, hab mich nicht näher damit befasst.

Delphi-Quellcode:
program Project20;

uses
  SvcMgr,
  Unit28 in 'Unit28.pas{Service28: TService};

{$R *.RES}

begin
  // Windows 2003 Server requires StartServiceCtrlDispatcher to be
  // called before CoRegisterClassObject, which can be called indirectly
  // by Application.Initialize. TServiceApplication.DelayInitialize allows
  // Application.Initialize to be called from TService.Main (after
  // StartServiceCtrlDispatcher has been called).
  //
  // Delayed initialization of the Application object may affect
  // events which then occur prior to initialization, such as
  // TService.OnCreate. It is only recommended if the ServiceApplication
  // registers a class object with OLE and is intended for use with
  // Windows 2003 Server.
  //
  // Application.DelayInitialize := True;
  //
  if not Application.DelayInitialize or Application.Installing then
    Application.Initialize;
  Application.CreateForm(TService28, Service28);
  Application.Run;
end.
Hinter dir gehts abwärts und vor dir steil bergauf ! (Wolfgang Ambros)
  Mit Zitat antworten Zitat