mirror of
https://github.com/cefsharp/CefSharp.git
synced 2026-12-04 10:22:55 +00:00
31 lines
1012 B
C#
31 lines
1012 B
C#
// Copyright © 2010-2016 The CefSharp Authors. All rights reserved.
|
|
//
|
|
// Use of this source code is governed by a BSD-style license that can be found in the LICENSE file.
|
|
|
|
using System;
|
|
|
|
namespace CefSharp.Wpf.Example
|
|
{
|
|
public static class Program
|
|
{
|
|
[STAThread]
|
|
public static int Main(string[] args)
|
|
{
|
|
//Until https://bitbucket.org/chromiumembedded/cef/issues/1995/ is resolved it's nessicary to
|
|
//deal with the spawning of the crashpad process here as it's not possible to configure which exe it uses
|
|
//When running from within VS and using the vshost process you'll see an error in the log and this won't get called.
|
|
var crashpadHandlerExitCode = Cef.ExecuteProcess();
|
|
|
|
//crashpadHandlerExitCode will be -1 for normal process execution, only when running as a subprocess will it be greater
|
|
if (crashpadHandlerExitCode >= 0)
|
|
{
|
|
return crashpadHandlerExitCode;
|
|
}
|
|
|
|
var application = new App();
|
|
application.InitializeComponent();
|
|
return application.Run();
|
|
}
|
|
}
|
|
}
|