From 4e3887d85dabf28261bfea3e3083fac3d7e0f802 Mon Sep 17 00:00:00 2001 From: amaitland Date: Fri, 6 Mar 2020 15:50:17 +1000 Subject: [PATCH] BrowserSubprocess - Add Main method for .Net Core Needed to test out my idea outlined in https://github.com/cefsharp/CefSharp/issues/2795#issuecomment-592441989 --- .../BrowserSubprocessExecutable.h | 23 +++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/CefSharp.BrowserSubprocess.Core/BrowserSubprocessExecutable.h b/CefSharp.BrowserSubprocess.Core/BrowserSubprocessExecutable.h index 03d4068a3..2b42c6244 100644 --- a/CefSharp.BrowserSubprocess.Core/BrowserSubprocessExecutable.h +++ b/CefSharp.BrowserSubprocess.Core/BrowserSubprocessExecutable.h @@ -29,6 +29,29 @@ namespace CefSharp } + /// + /// This function should be called from the application entry point function (typically Program.Main) + /// to execute a secondary process e.g. gpu, plugin, renderer, utility + /// This overload is specifically used for .Net Core. For hosting your own BrowserSubProcess + /// it's preferable to use the Main method provided by this class. + /// - Obtains the command line args via a call to Environment::GetCommandLineArgs + /// - Calls CefEnableHighDPISupport before any other processing + /// + /// + /// If called for the browser process (identified by no "type" command-line value) it will return immediately + /// with a value of -1. If called for a recognized secondary process it will block until the process should exit + /// and then return the process exit code. + /// Main(args, nullptr); + } + /// /// This function should be called from the application entry point function (typically Program.Main) /// to execute a secondary process e.g. gpu, plugin, renderer, utility