Disclosure Statement: This site contains affiliate links, which means that I may receive a commission if you make a purchase using these links. As an eBay Partner, I earn from qualifying purchases.
If you find these projects useful please consider becoming a sponsor with Patreon, GitHub or Liberapay.

CEF4 Windows Service

Post Reply
chemapa
Posts: 5
Joined: Sat Sep 21, 2019 4:06 pm

CEF4 Windows Service

Post 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
User avatar
salvadordf
Posts: 4575
Joined: Thu Feb 02, 2017 12:24 pm
Location: Spain
Contact:

Re: CEF4 Windows Service

Post 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. ;)
Post Reply