Class InProcessDesktopHost
- Namespace
- VpnHood.AppUi.Hosting.Desktop
- Assembly
- VpnHood.AppUi.Hosting.Desktop.dll
Provides the app and its window in one process, as a host's whole job, for a desktop whose tunnel runs where the system starts it, as the Windows VPN plug-in's VPN host.
public static class InProcessDesktopHost
- Inheritance
-
InProcessDesktopHost
- Inherited Members
Remarks
It needs no service, and its window no service channel and no service commands. There is one window per person and session: a second launch brings it forward and builds no app.
Methods
Run(string[], DesktopInitParams, IInProcessDesktopPlatform)
Runs the app and its window until the window's run ends: the app on a worker thread, and the window on the calling thread, the host's main thread.
public static int Run(string[] args, DesktopInitParams initParams, IInProcessDesktopPlatform platform)
Parameters
argsstring[]The process's arguments:
--access-key, as avh:link passes, and--quick-launch, as the package's Quick Launch entry passes, are acted on; the log keeps them all, once this launch holds the window.initParamsDesktopInitParamsThe head's init params.
platformIInProcessDesktopPlatformWhat the platform says for itself.
Returns
- int
The process's exit code: 0, or 1 where the run failed or an access key it was given could not be read.
Remarks
A window's process ends with its window: nothing cancels it from outside. A second launch hands its access key or Quick Launch to the running one, and returns 0.