Page 1 of 1

CEF4 Windows Service

Posted: Sat Apr 25, 2020 5:16 pm
by chemapa
Hello.

I have designed a win32 application with CEF4 that works correctly.

I need to convert this app into Windows service.

I write in source:

Code: Select all

program TestMeridasrv;

uses
  SvcMgr,
  uCEFApplication,
  UTestMerida in 'UTestMerida.pas' {TestMerida: TService},
  UGlobalCef in 'UGlobalCef.pas';

{$R *.RES}

begin


  CreateGlobalCEFApp;

  if GlobalCEFApp.StartMainProcess then
    begin
    if not Application.DelayInitialize or Application.Installing then
      Application.Initialize;
    Application.CreateForm(TTestMerida, TestMerida);
    Application.Run;
    end;

  GlobalCEFApp.Free;

end.
The service never start.


I can't find any example of CEF4Dephi with windows service

How can I dO?

Thanks

Re: CEF4 Windows Service

Posted: Sat Apr 25, 2020 8:42 pm
by salvadordf
Hi,

I've never done any Windows Service and I don't know all the details about them but you probably need to use a different EXE for te subproceses.

I guess you will end up doing something very similar to the ConsoleBrowser demo.

Feel free to share the details or create a pull request with a simple Service demo. ;)